Skip to content

Commit

Permalink
Fixed incorrect locale generation
Browse files Browse the repository at this point in the history
  • Loading branch information
pasabanov committed Sep 27, 2024
1 parent 3cd97e7 commit 65916e7
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ public Converter(int precision) {
}
@Override
public String toString(Double d) {
return String.format(new Locale("en_EN"), "%." + precision + "f", d).replaceAll("([.,]\\d+?)0*$", "$1");
return String.format(Locale.of("en"), "%." + precision + "f", d).replaceAll("([.,]\\d+?)0*$", "$1");
}
@Override
public Double fromString(String s) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ else if (period > MAX_STEP_SPEED)
public void changed(ObservableValue<? extends String> observable, String oldValue, String newValue) {
speedTextField.setText(
String.format(
new Locale("en_EN"),
Locale.of("en"),
"%." + PRECISION + "f",
Double.parseDouble(newValue)
).replaceAll("([.,]\\d+?)0*$", "$1")
Expand Down

0 comments on commit 65916e7

Please sign in to comment.