[tor-commits] [onionoo/master] Use Java 5 foreach loop.
karsten at torproject.org
karsten at torproject.org
Mon Aug 27 12:34:51 UTC 2018
commit c9aadac0907bee8cc1a0657842506735b801622f
Author: Karsten Loesing <karsten.loesing at gmx.net>
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) {
More information about the tor-commits
mailing list