RFR: 8297561: Redundant index check in String.offsetByCodePoints()

Andrey Turbanov aturbanov at openjdk.org
Sun Nov 27 19:16:54 UTC 2022


On Thu, 24 Nov 2022 10:08:31 GMT, Sergey Tsypanov <stsypanov at openjdk.org> wrote:

> `String.offsetByCodePoints()` delegates to `Character.offsetByCodePoints()` which in turn specifies the same exception thrown under the same conditions and the implementation does exactly the same checks. This means we can remove the check from `String.offsetByCodePoints()` and rely on the one of `Character.offsetByCodePoints()`.

Marked as reviewed by aturbanov (Committer).

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

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


More information about the core-libs-dev mailing list