[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:
@@ -150,9 +150,11 @@ public class LeapDeviceDiscoveryService extends AbstractDiscoveryService
|
||||
} else {
|
||||
areaName = "Occupancy Group";
|
||||
}
|
||||
logger.debug("Discovered occupancy group: {} areas: {} area name: {}", groupNum,
|
||||
oGroup.associatedAreas.length, areaName);
|
||||
notifyDiscovery(THING_TYPE_OGROUP, groupNum, areaName);
|
||||
if (areaName != null) {
|
||||
logger.debug("Discovered occupancy group: {} areas: {} area name: {}", groupNum,
|
||||
oGroup.associatedAreas.length, areaName);
|
||||
notifyDiscovery(THING_TYPE_OGROUP, groupNum, areaName);
|
||||
}
|
||||
}
|
||||
}
|
||||
this.areaMap = null;
|
||||
|
||||
@@ -14,6 +14,7 @@ package org.openhab.binding.lutron.internal.protocol.leap;
|
||||
|
||||
import java.util.LinkedList;
|
||||
import java.util.List;
|
||||
import java.util.Objects;
|
||||
|
||||
import org.eclipse.jdt.annotation.NonNullByDefault;
|
||||
import org.eclipse.jdt.annotation.Nullable;
|
||||
@@ -212,6 +213,7 @@ public class LeapMessageParser {
|
||||
try {
|
||||
if (messageBody.has(memberName)) {
|
||||
JsonObject jsonObject = messageBody.get(memberName).getAsJsonObject();
|
||||
@Nullable
|
||||
T obj = gson.fromJson(jsonObject, type);
|
||||
return obj;
|
||||
} else {
|
||||
@@ -233,7 +235,7 @@ public class LeapMessageParser {
|
||||
|
||||
for (JsonElement element : jsonArray) {
|
||||
JsonObject jsonObject = element.getAsJsonObject();
|
||||
T obj = gson.fromJson(jsonObject, type);
|
||||
T obj = Objects.requireNonNull(gson.fromJson(jsonObject, type));
|
||||
objList.add(obj);
|
||||
}
|
||||
return objList;
|
||||
|
||||
Reference in New Issue
Block a user