Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
The Tor Project
Network Health
Metrics
Onionoo
Commits
c8c64e88
Commit
c8c64e88
authored
Aug 20, 2018
by
Karsten Loesing
Browse files
Replace addAll with parameterized constructor call.
parent
81b186c3
Changes
2
Show whitespace changes
Inline
Side-by-side
src/main/java/org/torproject/onionoo/docs/UptimeHistory.java
View file @
c8c64e88
...
...
@@ -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
);
}
...
...
src/test/java/org/torproject/onionoo/updater/DummyDescriptorSource.java
View file @
c8c64e88
...
...
@@ -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
)
{
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment