RFR: 8309515: Stale cached data from Matcher.namedGroups() after Matcher.usePattern() [v2]

Roger Riggs rriggs at openjdk.org
Wed Jun 7 17:54:46 UTC 2023


On Wed, 7 Jun 2023 11:51:19 GMT, Raffaello Giulietti <rgiulietti at openjdk.org> wrote:

>> The cached `namedGroup` field must be invalidated during an invocation of `Matcher.usePattern()`
>
> Raffaello Giulietti has updated the pull request incrementally with one additional commit since the last revision:
> 
>   Renamed the additional test.

test/jdk/java/util/regex/NamedGroupsTests.java line 367:

> 365:         }
> 366:         if (!m.group("a").equals("bar")) {
> 367:             throw new RuntimeException();

Failures will be easier to resolve if there is some description of the failure. Having to go back to the stack trace adds extra overhead.

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

PR Review Comment: https://git.openjdk.org/jdk/pull/14350#discussion_r1221972763


More information about the core-libs-dev mailing list