Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
The Tor Project
Network Health
Metrics
Onionoo
Commits
860228c5
Commit
860228c5
authored
Aug 06, 2019
by
Karsten Loesing
Browse files
Make unit test locale-independent.
Spotted while working on #31326, but unrelated.
parent
43ad7e35
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/main/java/org/torproject/metrics/onionoo/docs/WeightsStatus.java
View file @
860228c5
...
...
@@ -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"
);
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment