mirror of
https://github.com/openhab/openhab-addons.git
synced 2025-01-10 15:11:59 +01:00
[bluetooth.generic] Fix build (#9115)
* use Objects.requireNonNull Signed-off-by: Connor Petty <mistercpp2000+gitsignoff@gmail.com>
This commit is contained in:
parent
fd7aa9f9c1
commit
89e0771884
@ -16,6 +16,7 @@ import java.util.ArrayList;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Objects;
|
||||
import java.util.UUID;
|
||||
import java.util.concurrent.ConcurrentHashMap;
|
||||
import java.util.concurrent.ScheduledFuture;
|
||||
@ -183,7 +184,7 @@ public class GenericBluetoothHandler extends ConnectedBluetoothHandler {
|
||||
}
|
||||
|
||||
private CharacteristicHandler getCharacteristicHandler(BluetoothCharacteristic characteristic) {
|
||||
return charHandlers.computeIfAbsent(characteristic, CharacteristicHandler::new);
|
||||
return Objects.requireNonNull(charHandlers.computeIfAbsent(characteristic, CharacteristicHandler::new));
|
||||
}
|
||||
|
||||
private boolean readCharacteristic(BluetoothCharacteristic characteristic) {
|
||||
|
Loading…
Reference in New Issue
Block a user