[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
[tor-commits] [metrics-lib/release] Use diamond operator in a few more places.
commit 7fcc7e79c8cc4ce007030cdd9cddf5c559d0784b
Author: Karsten Loesing <karsten.loesing@xxxxxxx>
Date: Tue Aug 21 09:43:48 2018 +0200
Use diamond operator in a few more places.
---
src/main/java/org/torproject/descriptor/index/IndexNode.java | 2 +-
.../java/org/torproject/descriptor/index/DirectoryNodeTest.java | 6 +++---
2 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/src/main/java/org/torproject/descriptor/index/IndexNode.java b/src/main/java/org/torproject/descriptor/index/IndexNode.java
index 6852681..b6855e3 100644
--- a/src/main/java/org/torproject/descriptor/index/IndexNode.java
+++ b/src/main/java/org/torproject/descriptor/index/IndexNode.java
@@ -48,7 +48,7 @@ public class IndexNode {
/** An empty node, which is not added to JSON output. */
public static final IndexNode emptyNode = new IndexNode("", "",
- new TreeSet<FileNode>(), new TreeSet<DirectoryNode>());
+ new TreeSet<>(), new TreeSet<>());
private static ObjectMapper objectMapper = new ObjectMapper()
.setPropertyNamingStrategy(PropertyNamingStrategy.SNAKE_CASE)
diff --git a/src/test/java/org/torproject/descriptor/index/DirectoryNodeTest.java b/src/test/java/org/torproject/descriptor/index/DirectoryNodeTest.java
index fc545f6..eff1edf 100644
--- a/src/test/java/org/torproject/descriptor/index/DirectoryNodeTest.java
+++ b/src/test/java/org/torproject/descriptor/index/DirectoryNodeTest.java
@@ -17,10 +17,10 @@ public class DirectoryNodeTest {
public void testCompare() {
DirectoryNode dn1 = new DirectoryNode("a1", null, null);
DirectoryNode dn2 = new DirectoryNode("a2", null,
- new TreeSet<DirectoryNode>());
+ new TreeSet<>());
assertEquals(-1, dn1.compareTo(dn2));
- DirectoryNode dn3 = new DirectoryNode("a1", new TreeSet<FileNode>(),
- new TreeSet<DirectoryNode>());
+ DirectoryNode dn3 = new DirectoryNode("a1", new TreeSet<>(),
+ new TreeSet<>());
assertEquals(0, dn1.compareTo(dn3));
assertEquals(1, dn2.compareTo(dn3));
}
_______________________________________________
tor-commits mailing list
tor-commits@xxxxxxxxxxxxxxxxxxxx
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits