use US locale to format strings

This is especially important for all strings that are
passed to gnuplot. Because gnuplot uses the US locale
during parsing.
This commit is contained in:
2020-03-12 19:40:20 +01:00
parent 5386e29fcc
commit 9a311313ec
5 changed files with 16 additions and 7 deletions
@@ -1,6 +1,7 @@
package org.lucares.recommind.logs;
import java.util.List;
import java.util.Locale;
import org.apache.commons.lang3.StringUtils;
@@ -162,7 +163,7 @@ public class AxisSettings {
}
private void appendfln(final StringBuilder builder, final String format, final Object... args) {
builder.append(String.format(format + "\n", args));
builder.append(String.format(Locale.US, format + "\n", args));
}
@Override
@@ -10,6 +10,7 @@ import java.util.ArrayList;
import java.util.Collections;
import java.util.Iterator;
import java.util.List;
import java.util.Locale;
import java.util.UUID;
import java.util.concurrent.TimeUnit;
import java.util.concurrent.atomic.AtomicInteger;
@@ -209,7 +210,7 @@ public class Plotter {
final int values = csvSummary.getValues();
result.append(" (");
result.append(String.format("%,d", values));
result.append(String.format(Locale.US, "%,d", values));
result.append(")");
return result.toString();