Fixes test for histBuilder with locale ES_es#8
Conversation
When using locale ES_es, double formatting uses a comma instead a decimal dot. So, an specific conversion has to be done
|
Good catch! What happens for methods with a single double arg and list args? e.g. If they are also impacted, they'd be fixed at once. In such case, prefer calling |
| }).collect(Collectors.toList()); | ||
| } | ||
|
|
||
| public String toSafeDouble(Double d) { |
There was a problem hiding this comment.
Can this arg be changed to unboxed double, since if null is passed accidentally, that is stringified as null which is invalid for python?
The problem seems to arise only when using String.format() with a double. When doing an List.toString() or double[].toString(), Java does it correctly So I don't think it is necessary to do it in all string conversions, but only on those that use String.format() |
This is very interesting. I would like to avoid any other future change missing to call PlotImpl(PythonConfig pythonConfig, boolean dryRun) {
this.pythonConfig = pythonConfig;
this.dryRun = dryRun;
Locale.setDefault(Locale.ROOT);
} |
|
Yeah, of course! |
commit:13a3fd2 When using locale ES_es, double formatting uses a comma instead
a decimal dot. So, an specific conversion has to be done