Skip to content

Commit 76954ef

Browse files
zachelnetCopilot
andauthored
Potential fix for pull request finding
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com> Signed-off-by: Martin <zachphp@gmail.com>
1 parent 28264e6 commit 76954ef

1 file changed

Lines changed: 5 additions & 5 deletions

File tree

  • analysis/thread-dump/src/main/java/org/eclipse/jifa/tda/util

analysis/thread-dump/src/main/java/org/eclipse/jifa/tda/util/Converter.java

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -83,21 +83,21 @@ public static double parseSecureDouble(String s) {
8383
}
8484
try {
8585
java.text.ParsePosition pos = new java.text.ParsePosition(0);
86-
Number n = NumberFormat.getInstance(Locale.US).parse(clean, pos);
86+
Number n = NumberFormat.getInstance(Locale.GERMANY).parse(clean, pos);
8787
if (n != null && pos.getIndex() == clean.length()) {
8888
return n.doubleValue();
8989
}
9090
throw new ParseException("Unparseable number: \"" + clean + "\"", pos.getErrorIndex());
91-
} catch (ParseException usEx) {
91+
} catch (ParseException deEx) {
9292
try {
9393
java.text.ParsePosition pos = new java.text.ParsePosition(0);
94-
Number n = NumberFormat.getInstance(Locale.GERMANY).parse(clean, pos);
94+
Number n = NumberFormat.getInstance(Locale.US).parse(clean, pos);
9595
if (n != null && pos.getIndex() == clean.length()) {
9696
return n.doubleValue();
9797
}
9898
throw new ParseException("Unparseable number: \"" + clean + "\"", pos.getErrorIndex());
99-
} catch (ParseException deEx) {
100-
throw new IllegalArgumentException("Cannot parse '" + s + "' as a number", deEx);
99+
} catch (ParseException usEx) {
100+
throw new IllegalArgumentException("Cannot parse '" + s + "' as a number", usEx);
101101
}
102102
}
103103
}

0 commit comments

Comments
 (0)