Skip to content

Commit 1da7b3a

Browse files
committed
Fix json files formatting (GR-36611)
1 parent 0add09b commit 1da7b3a

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

substratevm/src/com.oracle.graal.pointsto/src/com/oracle/graal/pointsto/reports/StatisticsPrinter.java

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,8 @@
2626

2727
import java.io.File;
2828
import java.io.PrintWriter;
29+
import java.text.NumberFormat;
30+
import java.util.Locale;
2931
import java.util.Map;
3032
import java.util.function.Consumer;
3133

@@ -106,7 +108,9 @@ public static void print(PrintWriter out, String key, long value) {
106108
}
107109

108110
public static void print(PrintWriter out, String key, double value) {
109-
out.format("%s\"%s\": %.2f,%n", INDENT, key, value);
111+
NumberFormat nf = NumberFormat.getInstance(Locale.ENGLISH);
112+
nf.setGroupingUsed(false);
113+
out.format("%s\"%s\": %s,%n", INDENT, key, nf.format(value));
110114
}
111115

112116
public static void printLast(PrintWriter out, String key, long value) {

0 commit comments

Comments
 (0)