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> {
}
SortedSet<String> flags = null;
if (parts[0].equals("R")) {
flags = new TreeSet<>();
flags.addAll(Arrays.asList(parts).subList(3, parts.length));
flags = new TreeSet<>(Arrays.asList(parts).subList(3, parts.length));
}
return new UptimeHistory(relay, startMillis, uptimeHours, flags);
}
......
......@@ -52,8 +52,8 @@ public class DummyDescriptorSource extends DescriptorSource {
@Override
public void readDescriptors() {
Set<DescriptorType> descriptorTypes = new HashSet<>();
descriptorTypes.addAll(this.descriptorListeners.keySet());
Set<DescriptorType> descriptorTypes = new HashSet<>(
this.descriptorListeners.keySet());
for (DescriptorType descriptorType : descriptorTypes) {
boolean relay;
switch (descriptorType) {
......
Markdown is supported
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