8327640: Allow NumberFormat strict parsing

Reviewed-by: naoto
This commit is contained in:
Justin Lu 2024-04-16 16:18:09 +00:00
parent 2ede14335a
commit 941bee197f
12 changed files with 1569 additions and 103 deletions

View file

@ -586,6 +586,18 @@ public class ChoiceFormat extends NumberFormat {
return Double.valueOf(bestNumber);
}
@Override
public boolean isStrict() {
throw new UnsupportedOperationException(
"ChoiceFormat does not utilize leniency when parsing");
}
@Override
public void setStrict(boolean strict) {
throw new UnsupportedOperationException(
"ChoiceFormat does not utilize leniency when parsing");
}
/**
* Finds the least double greater than {@code d}.
* If {@code NaN}, returns same value.