RFR: 8298033: Character.codePointAt(char[], int, int) doesn't do JavaDoc-specified check

Sergey Tsypanov stsypanov at openjdk.org
Fri Dec 2 16:15:25 UTC 2022


On Fri, 2 Dec 2022 15:32:20 GMT, Brett Okken <duke at openjdk.org> wrote:

> As ArrayIndexOutOfBoundsException is an IndexOutOfBoundsException, it is not clear to me how this is not matching the javadoc/spec.

The check within `codePointAt()` doesn't match the spec. `ArrayIndexOutOfBoundsException` is thrown from the array element access, however even in some classes explicitly declaring it in their JavaDoc e.g. `Arrays` it's never thrown from array access but from Java code,

-------------

PR: https://git.openjdk.org/jdk/pull/11480


More information about the core-libs-dev mailing list