From e9c03a5161c67b40a6cda679290c51d7e1c3a00b Mon Sep 17 00:00:00 2001 From: Jacob Laursen Date: Fri, 28 Jul 2023 10:01:36 +0200 Subject: [PATCH] Fix ArrayStoreException (#15320) Fixes #15313 Partially reverts #13967 Signed-off-by: Jacob Laursen --- .../java/org/openhab/binding/bluetooth/BluetoothUtils.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) 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 23229affe03..2b75d337626 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,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; }