[tor-commits] [onionoo/release] Simplify comparison of Tor versions.

karsten at torproject.org karsten at torproject.org
Thu Nov 28 09:20:38 UTC 2019


commit dd58e89756efe94571b49b74a0f231c5c4323597
Author: Karsten Loesing <karsten.loesing at gmx.net>
Date:   Wed Nov 20 15:17:51 2019 +0100

    Simplify comparison of Tor versions.
---
 src/main/java/org/torproject/metrics/onionoo/updater/TorVersion.java | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/main/java/org/torproject/metrics/onionoo/updater/TorVersion.java b/src/main/java/org/torproject/metrics/onionoo/updater/TorVersion.java
index fc25811..bba490c 100644
--- a/src/main/java/org/torproject/metrics/onionoo/updater/TorVersion.java
+++ b/src/main/java/org/torproject/metrics/onionoo/updater/TorVersion.java
@@ -114,8 +114,8 @@ public class TorVersion implements Comparable<TorVersion> {
     }
     for (int position = 0; position < this.versionNumbers.size()
         && position < other.versionNumbers.size(); position++) {
-      if ((Integer.compare(this.versionNumbers.get(position),
-          other.versionNumbers.get(position))) != 0) {
+      if (!this.versionNumbers.get(position).equals(
+          other.versionNumbers.get(position))) {
         return false;
       }
     }





More information about the tor-commits mailing list