diff --git a/bundles/org.openhab.binding.bluetooth/src/main/java/org/openhab/binding/bluetooth/BluetoothUtils.java b/bundles/org.openhab.binding.bluetooth/src/main/java/org/openhab/binding/bluetooth/BluetoothUtils.java index 33c9e8b32783e..456c35e7369b1 100644 --- a/bundles/org.openhab.binding.bluetooth/src/main/java/org/openhab/binding/bluetooth/BluetoothUtils.java +++ b/bundles/org.openhab.binding.bluetooth/src/main/java/org/openhab/binding/bluetooth/BluetoothUtils.java @@ -47,7 +47,10 @@ public class BluetoothUtils { */ public static int[] toIntArray(byte[] value) { int[] ret = new int[value.length]; - System.arraycopy(value, 0, ret, 0, value.length); + // System.arraycopy cannot be used as it throws ArrayStoreException + for (int i = 0; i < value.length; i++) { + ret[i] = value[i]; + } return ret; }