[tor-commits] [onionoo/release] Avoid unnecessary cast.

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


commit 5ad9518d8b31a84bbf125d0c7256767d027664ce
Author: Karsten Loesing <karsten.loesing at gmx.net>
Date:   Wed Nov 20 12:20:10 2019 +0100

    Avoid unnecessary cast.
---
 .../org/torproject/metrics/onionoo/updater/ClientsStatusUpdater.java    | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/main/java/org/torproject/metrics/onionoo/updater/ClientsStatusUpdater.java b/src/main/java/org/torproject/metrics/onionoo/updater/ClientsStatusUpdater.java
index c9daf92..fdaa39c 100644
--- a/src/main/java/org/torproject/metrics/onionoo/updater/ClientsStatusUpdater.java
+++ b/src/main/java/org/torproject/metrics/onionoo/updater/ClientsStatusUpdater.java
@@ -83,7 +83,7 @@ public class ClientsStatusUpdater implements DescriptorListener,
        * include in a clients document. */
       return;
     }
-    double okResponses = (double) (responses.get("ok") - 4);
+    double okResponses = responses.get("ok") - 4;
     if (okResponses < 0.0) {
       /* Response numbers are not supposed to be negative.  Skipping. */
       return;





More information about the tor-commits mailing list