[infrastructure] add external null-annotations (#8848)
Signed-off-by: Jan N. Klug <jan.n.klug@rub.de>
This commit is contained in:
@@ -531,8 +531,17 @@ public class LxServerHandler extends BaseThingHandler implements LxServerHandler
|
||||
channels.addAll(getThing().getChannels());
|
||||
}
|
||||
channels.sort((c1, c2) -> {
|
||||
String label = c1.getLabel();
|
||||
return label == null ? 1 : label.compareTo(c2.getLabel());
|
||||
String label1 = c1.getLabel();
|
||||
String label2 = c2.getLabel();
|
||||
if (label1 == null && label2 != null) {
|
||||
return 1;
|
||||
} else if (label1 != null && label2 == null) {
|
||||
return -1;
|
||||
} else if (label1 == null && label2 == null) {
|
||||
return 0;
|
||||
} else {
|
||||
return label1.compareTo(label2);
|
||||
}
|
||||
});
|
||||
ThingBuilder builder = editThing();
|
||||
builder.withChannels(channels);
|
||||
|
||||
Reference in New Issue
Block a user