[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:
J-N-K
2020-11-12 21:07:11 +01:00
committed by GitHub
parent 0856a0b3f2
commit ba4c96d99d
155 changed files with 644 additions and 632 deletions

View File

@@ -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);

View File

@@ -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)) {