On Tue, 16 May 2023 13:29:26 GMT, Claes Redestad <redes...@openjdk.org> wrote:
>> Raffaello Giulietti has updated the pull request incrementally with one >> additional commit since the last revision: >> >> Added some randomness in tests. > > src/java.base/share/classes/java/util/regex/Matcher.java line 359: > >> 357: if ((groups[group * 2] == -1) || (groups[group * 2 + 1] == >> -1)) >> 358: return null; >> 359: return text.subSequence(groups[group * 2] - offset, >> groups[group * 2 + 1] - offset).toString(); > > Could be simplified to `return text.substring(groups[group * 2] - offset, > groups[group * 2 + 1] - offset);` Right. Done ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/13231#discussion_r1196198048