[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

@@ -414,6 +414,10 @@ public class EcobeeActions implements ThingActions {
EventDTO event = new EventDTO();
for (String key : params.keySet()) {
Object value = params.get(key);
if (value == null) {
LOGGER.warn("Event field '{}' has null value, ignored.", key);
continue;
}
switch (key) {
case "isOccupied":
event.isOccupied = ((Boolean) value);

View File

@@ -165,9 +165,13 @@ public class SelectionDTO {
}
public void setThermostats(Set<String> thermostatIds) {
boolean isRegistered = thermostatIds == null || thermostatIds.isEmpty();
selectionType = isRegistered ? SelectionType.REGISTERED : SelectionType.THERMOSTATS;
selectionMatch = isRegistered ? "" : String.join(",", thermostatIds);
if (thermostatIds == null || thermostatIds.isEmpty()) {
selectionType = SelectionType.REGISTERED;
selectionMatch = "";
} else {
selectionType = SelectionType.THERMOSTATS;
selectionMatch = String.join(",", thermostatIds);
}
}
public void setSelectionType(SelectionType selectionType) {