]> git.basschouten.com Git - openhab-addons.git/commitdiff
Fix ArrayStoreException (#15320)
authorJacob Laursen <jacob-github@vindvejr.dk>
Fri, 28 Jul 2023 08:01:36 +0000 (10:01 +0200)
committerGitHub <noreply@github.com>
Fri, 28 Jul 2023 08:01:36 +0000 (10:01 +0200)
Fixes #15313

Partially reverts #13967

Signed-off-by: Jacob Laursen <jacob-github@vindvejr.dk>
bundles/org.openhab.binding.bluetooth/src/main/java/org/openhab/binding/bluetooth/BluetoothUtils.java

index 23229affe03c14a64ce5657a7047405c5666480e..2b75d337626b15dffeb566f275f82b96c1600d9c 100644 (file)
@@ -47,7 +47,9 @@ public class BluetoothUtils {
      */
     public static int[] toIntArray(byte[] value) {
         int[] ret = new int[value.length];
-        System.arraycopy(value, 0, ret, 0, value.length);
+        for (int i = 0; i < value.length; i++) {
+            ret[i] = value[i];
+        }
         return ret;
     }