[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
[tor-commits] [onionoo/release] Make unit test locale-independent.
commit 860228c58f294429a44793aa91b30a93010ad8f1
Author: Karsten Loesing <karsten.loesing@xxxxxxx>
Date: Tue Aug 6 17:17:05 2019 +0200
Make unit test locale-independent.
Spotted while working on #31326, but unrelated.
---
src/main/java/org/torproject/metrics/onionoo/docs/WeightsStatus.java | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/src/main/java/org/torproject/metrics/onionoo/docs/WeightsStatus.java b/src/main/java/org/torproject/metrics/onionoo/docs/WeightsStatus.java
index d0f50b6..121ec87 100644
--- a/src/main/java/org/torproject/metrics/onionoo/docs/WeightsStatus.java
+++ b/src/main/java/org/torproject/metrics/onionoo/docs/WeightsStatus.java
@@ -7,6 +7,7 @@ import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import java.util.Comparator;
+import java.util.Locale;
import java.util.Map;
import java.util.Scanner;
import java.util.SortedMap;
@@ -206,7 +207,7 @@ public class WeightsStatus extends Document {
for (int i = 0; i < weights.length; i++) {
sb.append(" ");
if (i != 0 && i != 5 && !Double.valueOf(weights[i]).isNaN()) {
- sb.append(String.format("%.12f", weights[i]));
+ sb.append(String.format(Locale.US, "%.12f", weights[i]));
}
}
sb.append("\n");
_______________________________________________
tor-commits mailing list
tor-commits@xxxxxxxxxxxxxxxxxxxx
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits