mirror of
https://github.com/openjdk/jdk.git
synced 2025-08-27 14:54:52 +02:00
8318189: ChoiceFormat::format throws undocumented AIOOBE
Reviewed-by: naoto
This commit is contained in:
parent
9938b3f62b
commit
caf71810f8
1 changed files with 13 additions and 2 deletions
|
@ -475,10 +475,18 @@ public class ChoiceFormat extends NumberFormat {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Specialization of format. This method really calls
|
* Specialization of format. This method really calls
|
||||||
* {@code format(double, StringBuffer, FieldPosition)}
|
* {@link #format(double, StringBuffer, FieldPosition)}.
|
||||||
* thus the range of longs that are supported is only equal to
|
* Thus, the range of longs that are supported is only equal to
|
||||||
* the range that can be stored by double. This will never be
|
* the range that can be stored by double. This will never be
|
||||||
* a practical limitation.
|
* a practical limitation.
|
||||||
|
*
|
||||||
|
* @param number number to be formatted and substituted.
|
||||||
|
* @param toAppendTo where text is appended.
|
||||||
|
* @param status ignore no useful status is returned.
|
||||||
|
* @throws ArrayIndexOutOfBoundsException if either the {@code limits}
|
||||||
|
* or {@code formats} of this ChoiceFormat are empty
|
||||||
|
* @throws NullPointerException if {@code toAppendTo}
|
||||||
|
* is {@code null}
|
||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
public StringBuffer format(long number, StringBuffer toAppendTo,
|
public StringBuffer format(long number, StringBuffer toAppendTo,
|
||||||
|
@ -488,9 +496,12 @@ public class ChoiceFormat extends NumberFormat {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns pattern with formatted double.
|
* Returns pattern with formatted double.
|
||||||
|
*
|
||||||
* @param number number to be formatted and substituted.
|
* @param number number to be formatted and substituted.
|
||||||
* @param toAppendTo where text is appended.
|
* @param toAppendTo where text is appended.
|
||||||
* @param status ignore no useful status is returned.
|
* @param status ignore no useful status is returned.
|
||||||
|
* @throws ArrayIndexOutOfBoundsException if either the {@code limits}
|
||||||
|
* or {@code formats} of this ChoiceFormat are empty
|
||||||
* @throws NullPointerException if {@code toAppendTo}
|
* @throws NullPointerException if {@code toAppendTo}
|
||||||
* is {@code null}
|
* is {@code null}
|
||||||
*/
|
*/
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue