Skip to content

Commit f5708d5

Browse files
committed
Merge pull request #169 from gab1one/unitutils-locale-fix
Set locale to US so that the strings are always formated as expected.
2 parents 2cc8b1b + f6aa1d2 commit f5708d5

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/main/java/org/scijava/util/UnitUtils.java

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,8 @@
3131

3232
package org.scijava.util;
3333

34+
import java.util.Locale;
35+
3436
/**
3537
* Utility methods for working with units.
3638
*
@@ -63,7 +65,7 @@ public static String getAbbreviatedByteLabel(final double totBytes) {
6365

6466
// format result with 0 decimal places for bytes, or 1 for larger values
6567
final String format = pow == 0 ? "%.0f%s" : "%.1f%s";
66-
return String.format(format, value, BYTE_UNITS[pow]);
68+
return String.format(Locale.US, format, value, BYTE_UNITS[pow]);
6769
}
6870

6971
}

0 commit comments

Comments
 (0)