mirror of
https://github.com/openjdk/jdk.git
synced 2025-08-26 22:34:27 +02:00
8333456: CompactNumberFormat integer parsing fails when string has no suffix
Reviewed-by: naoto
This commit is contained in:
parent
2a37764e74
commit
6238bc8da2
2 changed files with 26 additions and 2 deletions
|
@ -1736,7 +1736,7 @@ public final class CompactNumberFormat extends NumberFormat {
|
|||
// If parse integer only is true and the parsing is broken at
|
||||
// decimal point, then pass/ignore all digits and move pointer
|
||||
// at the start of suffix, to process the suffix part
|
||||
if (isParseIntegerOnly()
|
||||
if (isParseIntegerOnly() && position < text.length()
|
||||
&& text.charAt(position) == symbols.getDecimalSeparator()) {
|
||||
position++; // Pass decimal character
|
||||
for (; position < text.length(); ++position) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue