mirror of
https://github.com/openhab/openhab-addons.git
synced 2025-01-10 15:11:59 +01:00
[bluetooth.bluez] Fix NullPointerException
during discovery (#15347)
Signed-off-by: lsiepel <leosiepel@gmail.com>
This commit is contained in:
parent
c3a7f38930
commit
0a503307d1
@ -469,7 +469,7 @@ public class BlueZBluetoothDevice extends BaseBluetoothDevice implements BlueZEv
|
||||
@Override
|
||||
public CompletableFuture<byte[]> 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"));
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user