On Thu, 24 Nov 2022 10:08:31 GMT, Sergey Tsypanov <stsypa...@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 <stsypa...@openjdk.org>
Committer: Andrey Turbanov <aturba...@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

Reply via email to