RFR: 8297561: Redundant index check in String.offsetByCodePoints()
Sergey Tsypanov
stsypanov at openjdk.org
Thu Nov 24 10:15:28 UTC 2022
`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()`.
-------------
Commit messages:
- 8297561: Redundant index check in String.offsetByCodePoints()
Changes: https://git.openjdk.org/jdk/pull/11350/files
Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=11350&range=00
Issue: https://bugs.openjdk.org/browse/JDK-8297561
Stats: 4 lines in 1 file changed: 0 ins; 3 del; 1 mod
Patch: https://git.openjdk.org/jdk/pull/11350.diff
Fetch: git fetch https://git.openjdk.org/jdk pull/11350/head:pull/11350
PR: https://git.openjdk.org/jdk/pull/11350
More information about the core-libs-dev
mailing list