[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:
@@ -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);
|
||||
|
||||
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user