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

Sergey Tsypanov stsypanov at openjdk.org
Thu Dec 1 15:31:41 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()`.

This pull request has now been integrated.

Changeset: c6156f91
Author:    Sergey Tsypanov <stsypanov at openjdk.org>
Committer: Andrey Turbanov <aturbanov at openjdk.org>
URL:       https://git.openjdk.org/jdk/commit/c6156f9123c02b814ce0615568499f60d95b461a
Stats:     51 lines in 2 files changed: 47 ins; 3 del; 1 mod

8297561: Redundant index check in String.offsetByCodePoints()

Reviewed-by: aturbanov, rriggs, redestad

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

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


More information about the core-libs-dev mailing list