-
Notifications
You must be signed in to change notification settings - Fork 38
Fixes test for histBuilder with locale ES_es #8
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
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 |
@@ -17,4 +18,8 @@ | |||
} | |||
}).collect(Collectors.toList()); | |||
} | |||
|
|||
public String toSafeDouble(Double d) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can this arg be changed to unboxed double
, since if null
is passed accidentally, that is stringified as null
which is invalid for python?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've just added a commit.
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