[infrastructure] move infered nullness warnings to error and update EEA (#8949)
Signed-off-by: Jan N. Klug <jan.n.klug@rub.de>
This commit is contained in:
@@ -14,6 +14,7 @@ package org.openhab.binding.bluetooth;
|
||||
|
||||
import java.time.ZonedDateTime;
|
||||
import java.util.Map;
|
||||
import java.util.Objects;
|
||||
import java.util.Set;
|
||||
import java.util.concurrent.ConcurrentHashMap;
|
||||
import java.util.concurrent.CopyOnWriteArraySet;
|
||||
@@ -186,7 +187,7 @@ public abstract class AbstractBluetoothBridgeHandler<BD extends BaseBluetoothDev
|
||||
@Override
|
||||
public BD getDevice(BluetoothAddress address) {
|
||||
synchronized (devices) {
|
||||
return devices.computeIfAbsent(address, this::createDevice);
|
||||
return Objects.requireNonNull(devices.computeIfAbsent(address, this::createDevice));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -13,6 +13,7 @@
|
||||
package org.openhab.binding.bluetooth;
|
||||
|
||||
import java.util.Map;
|
||||
import java.util.Objects;
|
||||
import java.util.concurrent.ConcurrentHashMap;
|
||||
|
||||
import org.eclipse.jdt.annotation.NonNullByDefault;
|
||||
@@ -59,7 +60,7 @@ public class MockBluetoothAdapter implements BluetoothAdapter {
|
||||
|
||||
@Override
|
||||
public MockBluetoothDevice getDevice(BluetoothAddress address) {
|
||||
return devices.computeIfAbsent(address, addr -> new MockBluetoothDevice(this, addr));
|
||||
return Objects.requireNonNull(devices.computeIfAbsent(address, addr -> new MockBluetoothDevice(this, addr)));
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
Reference in New Issue
Block a user