Skip to content

Commit

Permalink
[Bluetooth] re-fix ArrayStoreException (openhab#15891)
Browse files Browse the repository at this point in the history
Signed-off-by: Leo Siepel <[email protected]>
  • Loading branch information
lsiepel authored Nov 13, 2023
1 parent beade55 commit 2b39369
Showing 1 changed file with 4 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

Expand Down

0 comments on commit 2b39369

Please sign in to comment.