[infrastructure] add external null-annotations (#8848)
Signed-off-by: Jan N. Klug <jan.n.klug@rub.de>
This commit is contained in:
@@ -221,9 +221,12 @@ public class HueBridge {
|
||||
ArrayList<T> lightList = new ArrayList<>();
|
||||
|
||||
for (String id : lightMap.keySet()) {
|
||||
@Nullable
|
||||
T light = lightMap.get(id);
|
||||
light.setId(id);
|
||||
lightList.add(light);
|
||||
if (light != null) {
|
||||
light.setId(id);
|
||||
lightList.add(light);
|
||||
}
|
||||
}
|
||||
|
||||
return lightList;
|
||||
|
||||
@@ -144,7 +144,8 @@ public class Scene {
|
||||
if (getGroupId() == null) {
|
||||
return getLightIds().stream().allMatch(id -> group.getLightIds().contains(id));
|
||||
} else {
|
||||
return group.getId().contentEquals(getGroupId());
|
||||
String groupId = getGroupId();
|
||||
return groupId != null ? group.getId().contentEquals(groupId) : false;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user