From: h.sandeep Date: Wed, 15 Mar 2017 04:36:16 +0000 (+0530) Subject: Fix Svace Issue X-Git-Tag: accepted/tizen/common/20170316.161932^0 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=refs%2Fchanges%2F75%2F118975%2F2;p=platform%2Fcore%2Fcsapi%2Fbluetooth.git Fix Svace Issue Fixed the Svace issue with WGID: 183099 Change-Id: I4daf39febf1d7127f2e52dd21f46a6d343eaaa4d Signed-off-by: h.sandeep --- diff --git a/Tizen.Network.Bluetooth/Tizen.Network.Bluetooth/BluetoothGatt.cs b/Tizen.Network.Bluetooth/Tizen.Network.Bluetooth/BluetoothGatt.cs index 1329b76..8411a30 100755 --- a/Tizen.Network.Bluetooth/Tizen.Network.Bluetooth/BluetoothGatt.cs +++ b/Tizen.Network.Bluetooth/Tizen.Network.Bluetooth/BluetoothGatt.cs @@ -857,10 +857,9 @@ namespace Tizen.Network.Bluetooth /// Throws excetion if value is null public void SetValue(string value) { -/* Fix svace issue: 183099 (UNREACHABLE_CODE) - if (value.Equals(null)) + if (string.IsNullOrEmpty(value)) GattUtil.ThrowForError((int)BluetoothError.InvalidParameter, "value should not be null"); -*/ + byte[] val = Encoding.UTF8.GetBytes(value); Impl.SetValue(val); }