Commit c8c64e88 authored by Karsten Loesing's avatar Karsten Loesing
Browse files

Replace addAll with parameterized constructor call.

parent 81b186c3
...@@ -88,8 +88,7 @@ public class UptimeHistory implements Comparable<UptimeHistory> { ...@@ -88,8 +88,7 @@ public class UptimeHistory implements Comparable<UptimeHistory> {
} }
SortedSet<String> flags = null; SortedSet<String> flags = null;
if (parts[0].equals("R")) { if (parts[0].equals("R")) {
flags = new TreeSet<>(); flags = new TreeSet<>(Arrays.asList(parts).subList(3, parts.length));
flags.addAll(Arrays.asList(parts).subList(3, parts.length));
} }
return new UptimeHistory(relay, startMillis, uptimeHours, flags); return new UptimeHistory(relay, startMillis, uptimeHours, flags);
} }
......
...@@ -52,8 +52,8 @@ public class DummyDescriptorSource extends DescriptorSource { ...@@ -52,8 +52,8 @@ public class DummyDescriptorSource extends DescriptorSource {
@Override @Override
public void readDescriptors() { public void readDescriptors() {
Set<DescriptorType> descriptorTypes = new HashSet<>(); Set<DescriptorType> descriptorTypes = new HashSet<>(
descriptorTypes.addAll(this.descriptorListeners.keySet()); this.descriptorListeners.keySet());
for (DescriptorType descriptorType : descriptorTypes) { for (DescriptorType descriptorType : descriptorTypes) {
boolean relay; boolean relay;
switch (descriptorType) { switch (descriptorType) {
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment