mirror of
https://github.com/openjdk/jdk.git
synced 2025-08-27 23:04:50 +02:00
8298033: Character.codePoint{At|Before}(char[], int, int) doesn't do JavaDoc-specified check
Reviewed-by: rriggs
This commit is contained in:
parent
297bf6a596
commit
b9346e149e
2 changed files with 6 additions and 7 deletions
|
@ -39,7 +39,6 @@ import java.util.Optional;
|
|||
|
||||
import static java.lang.constant.ConstantDescs.BSM_EXPLICIT_CAST;
|
||||
import static java.lang.constant.ConstantDescs.CD_char;
|
||||
import static java.lang.constant.ConstantDescs.CD_int;
|
||||
import static java.lang.constant.ConstantDescs.DEFAULT_NAME;
|
||||
|
||||
/**
|
||||
|
@ -9375,7 +9374,7 @@ class Character implements java.io.Serializable, Comparable<Character>, Constabl
|
|||
* @since 1.5
|
||||
*/
|
||||
public static int codePointAt(char[] a, int index, int limit) {
|
||||
if (index >= limit || limit < 0 || limit > a.length) {
|
||||
if (index >= limit || index < 0 || limit > a.length) {
|
||||
throw new IndexOutOfBoundsException();
|
||||
}
|
||||
return codePointAtImpl(a, index, limit);
|
||||
|
@ -9478,7 +9477,7 @@ class Character implements java.io.Serializable, Comparable<Character>, Constabl
|
|||
* @since 1.5
|
||||
*/
|
||||
public static int codePointBefore(char[] a, int index, int start) {
|
||||
if (index <= start || start < 0 || start >= a.length) {
|
||||
if (index <= start || start < 0 || index > a.length) {
|
||||
throw new IndexOutOfBoundsException();
|
||||
}
|
||||
return codePointBeforeImpl(a, index, start);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue