Skip to content

Commit 7925d2a

Browse files
committed
Slight fix to set the formatting locale to US, this causes the .csv files to be cleaner when importing. (US locale has . as default decimal separator)
1 parent 3d78007 commit 7925d2a

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/main/java/nl/rug/jbi/jsm/util/ResultsExporter.java

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,11 @@
1010
import java.io.File;
1111
import java.io.FileWriter;
1212
import java.io.IOException;
13+
import java.text.DecimalFormatSymbols;
1314
import java.text.NumberFormat;
1415
import java.util.Iterator;
1516
import java.util.List;
17+
import java.util.Locale;
1618
import java.util.Map;
1719

1820
import static com.google.common.base.Preconditions.checkArgument;
@@ -59,7 +61,7 @@ public ResultsExporter(final String fileNamePattern) throws IOException {
5961
this.mappingWriter = new CSVWriter(new FileWriter(mappingFile));
6062
this.mappingWriter.writeNext(new String[]{"Metric Identifier", "Scope", "Output File"});
6163

62-
this.nf = NumberFormat.getNumberInstance();
64+
this.nf = NumberFormat.getNumberInstance(Locale.US);
6365
//Set double precision
6466
this.nf.setMinimumFractionDigits(0);
6567
this.nf.setMaximumFractionDigits(DOUBLE_PRINT_PRECISION);

0 commit comments

Comments
 (0)