-
Notifications
You must be signed in to change notification settings - Fork 47
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
Universal parsing for locale-formatted strings #56
Comments
awilkins
pushed a commit
that referenced
this issue
Feb 6, 2015
…cale-aware parser Fixes #56 Where the UI code parses floating point numbers it was generally using Float.parseFloat() and Float.valueOf() ; these methods are convenient but use FloatingDecimal.readJavaFormatString() which only works on the anglocentric standard Java float string format. At least one place in the UI formats floats using the user locale! This means round-trips where the UI was generating strings that could not be validated because they didn't use the dot as their decimal separator. Took all instances of these methods out of the UI parsing code and replaced them with NumberFormat.parse() instead. This affects * QueryField * DurationEditor * EstimatedEditor * TimeEntryEditorPart
awilkins
pushed a commit
that referenced
this issue
Feb 11, 2015
Yet another place where a localised format may get passed to the code. fixes #56
Please note that I don't presently have the time to do a systematic review of this, but I do think one is needed. Essentially
|
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
As brought up in #55 there are a number of places in the code where locale-formatted strings are being parsed or checked with code that assumes the decimal separator is a dot. Some locales use a comma.
This code needs reviewing and fixing.
The text was updated successfully, but these errors were encountered: