[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:
@@ -18,6 +18,7 @@ import static org.openhab.binding.shelly.internal.util.ShellyUtils.*;
|
||||
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
import java.util.Objects;
|
||||
|
||||
import org.eclipse.jdt.annotation.NonNullByDefault;
|
||||
import org.openhab.binding.shelly.internal.api.ShellyApiJsonDTO.ShellySettingsDimmer;
|
||||
@@ -103,7 +104,7 @@ public class ShellyDeviceProfile {
|
||||
try {
|
||||
initFromThingType(thingType);
|
||||
settingsJson = json;
|
||||
settings = gson.fromJson(json, ShellySettingsGlobal.class);
|
||||
settings = Objects.requireNonNull(gson.fromJson(json, ShellySettingsGlobal.class));
|
||||
} catch (IllegalArgumentException | JsonSyntaxException e) {
|
||||
throw new ShellyApiException(
|
||||
thingName + ": Unable to transform settings JSON " + e.toString() + ", json='" + json + "'", e);
|
||||
|
||||
@@ -17,10 +17,7 @@ import static org.openhab.binding.shelly.internal.coap.ShellyCoapJSonDTO.*;
|
||||
import static org.openhab.binding.shelly.internal.util.ShellyUtils.*;
|
||||
|
||||
import java.net.UnknownHostException;
|
||||
import java.util.LinkedHashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.TreeMap;
|
||||
import java.util.*;
|
||||
|
||||
import org.eclipse.californium.core.CoapClient;
|
||||
import org.eclipse.californium.core.coap.CoAP.Code;
|
||||
@@ -389,6 +386,7 @@ public class ShellyCoapHandler implements ShellyCoapListener {
|
||||
continue;
|
||||
}
|
||||
CoIotDescrSen sen = sensorMap.get(s.id);
|
||||
Objects.requireNonNull(sen);
|
||||
// find matching sensor definition from device description, use the Link ID as index
|
||||
sen = coiot.fixDescription(sen, blkMap);
|
||||
if (!blkMap.containsKey(sen.links)) {
|
||||
|
||||
Reference in New Issue
Block a user