The documentation of the String.regionMatches method contains this fragment: this.substring(toffset, len).codePoints(), but String.substring method takes index, not the length, as the second argument.
------------- Commit messages: - Update javadoc Changes: https://git.openjdk.java.net/jdk17/pull/157/files Webrev: https://webrevs.openjdk.java.net/?repo=jdk17&pr=157&range=00 Issue: https://bugs.openjdk.java.net/browse/JDK-8268236 Stats: 3 lines in 1 file changed: 0 ins; 0 del; 3 mod Patch: https://git.openjdk.java.net/jdk17/pull/157.diff Fetch: git fetch https://git.openjdk.java.net/jdk17 pull/157/head:pull/157 PR: https://git.openjdk.java.net/jdk17/pull/157