[tor-commits] [onionoo/master] Replace Collections.sort with List.sort.

karsten at torproject.org karsten at torproject.org
Mon Aug 27 12:34:51 UTC 2018


commit 17f2c134fb199dcda021a61f754512ec8b06a353
Author: Karsten Loesing <karsten.loesing at gmx.net>
Date:   Mon Aug 20 15:24:54 2018 +0200

    Replace Collections.sort with List.sort.
---
 src/main/java/org/torproject/onionoo/server/RequestHandler.java | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/src/main/java/org/torproject/onionoo/server/RequestHandler.java b/src/main/java/org/torproject/onionoo/server/RequestHandler.java
index 33c35e1..81cd8dc 100644
--- a/src/main/java/org/torproject/onionoo/server/RequestHandler.java
+++ b/src/main/java/org/torproject/onionoo/server/RequestHandler.java
@@ -9,7 +9,6 @@ import org.torproject.onionoo.docs.SummaryDocument;
 
 import java.util.ArrayList;
 import java.util.Arrays;
-import java.util.Collections;
 import java.util.Comparator;
 import java.util.HashMap;
 import java.util.HashSet;
@@ -661,8 +660,8 @@ public class RequestHandler {
     }
     Comparator<SummaryDocument> comparator
         = new SummaryDocumentComparator(this.order);
-    Collections.sort(uniqueRelays, comparator);
-    Collections.sort(uniqueBridges, comparator);
+    uniqueRelays.sort(comparator);
+    uniqueBridges.sort(comparator);
     this.orderedRelays.addAll(uniqueRelays);
     this.orderedBridges.addAll(uniqueBridges);
   }





More information about the tor-commits mailing list