From d499f2c777b58fe1d54c2fbad322aa893ec9507d Mon Sep 17 00:00:00 2001 From: lsiepel Date: Tue, 1 Aug 2023 10:24:25 +0200 Subject: [PATCH] [bluetooth.bluez] Fix `NullPointerException` during discovery (#15347) Signed-off-by: lsiepel --- .../binding/bluetooth/bluez/internal/BlueZBluetoothDevice.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bundles/org.openhab.binding.bluetooth.bluez/src/main/java/org/openhab/binding/bluetooth/bluez/internal/BlueZBluetoothDevice.java b/bundles/org.openhab.binding.bluetooth.bluez/src/main/java/org/openhab/binding/bluetooth/bluez/internal/BlueZBluetoothDevice.java index 95bcebeda36..5eba04c9b88 100644 --- a/bundles/org.openhab.binding.bluetooth.bluez/src/main/java/org/openhab/binding/bluetooth/bluez/internal/BlueZBluetoothDevice.java +++ b/bundles/org.openhab.binding.bluetooth.bluez/src/main/java/org/openhab/binding/bluetooth/bluez/internal/BlueZBluetoothDevice.java @@ -469,7 +469,7 @@ public class BlueZBluetoothDevice extends BaseBluetoothDevice implements BlueZEv @Override public CompletableFuture readCharacteristic(BluetoothCharacteristic characteristic) { BluetoothDevice dev = device; - if (dev == null || !dev.isConnected()) { + if (dev == null || !Boolean.TRUE.equals(dev.isConnected())) { return CompletableFuture .failedFuture(new IllegalStateException("DBusBlueZ device is not set or not connected")); }