[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

[tor-commits] [onionoo/release] Use Java 5 foreach loop.



commit c9aadac0907bee8cc1a0657842506735b801622f
Author: Karsten Loesing <karsten.loesing@xxxxxxx>
Date:   Mon Aug 20 14:57:35 2018 +0200

    Use Java 5 foreach loop.
---
 src/main/java/org/torproject/onionoo/server/IntegerDistribution.java | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/main/java/org/torproject/onionoo/server/IntegerDistribution.java b/src/main/java/org/torproject/onionoo/server/IntegerDistribution.java
index f462765..19862a0 100644
--- a/src/main/java/org/torproject/onionoo/server/IntegerDistribution.java
+++ b/src/main/java/org/torproject/onionoo/server/IntegerDistribution.java
@@ -17,8 +17,8 @@ class IntegerDistribution {
   public String toString() {
     StringBuilder sb = new StringBuilder();
     int totalValues = 0;
-    for (int i = 0; i < logValues.length; i++) {
-      totalValues += logValues[i];
+    for (int logValue : logValues) {
+      totalValues += logValue;
     }
     int[] permilles = new int[] { 500, 900, 990, 999 };
     if (totalValues > 0) {



_______________________________________________
tor-commits mailing list
tor-commits@xxxxxxxxxxxxxxxxxxxx
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits