I found out that this code
public class Main {
public static void main(String[] args) {
String s = "Hello world!";
char[] chars = s.toCharArray();
int point = Character.codePointAt(chars, -1, 1);
}
}
throws ArrayIndexOutOfBoundsException instead of JavaDoc-specified IndexOutOfBoundsException and the method doesn't check whether index parameter is negative.
public class Main {
public static void main(String[] args) {
String s = "Hello world!";
char[] chars = s.toCharArray();
int point = Character.codePointAt(chars, -1, 1);
}
}
throws ArrayIndexOutOfBoundsException instead of JavaDoc-specified IndexOutOfBoundsException and the method doesn't check whether index parameter is negative.
- relates to
-
JDK-8298375 Bad copyright header in test/jdk/java/lang/Character/Supplementary.java
-
- Resolved
-