mirror of
https://github.com/openjdk/jdk.git
synced 2025-08-27 23:04:50 +02:00
8309515: Stale cached data from Matcher.namedGroups() after Matcher.usePattern()
Reviewed-by: rriggs
This commit is contained in:
parent
ea41907396
commit
90027ff204
2 changed files with 24 additions and 1 deletions
|
@ -390,6 +390,7 @@ public final class Matcher implements MatchResult {
|
|||
if (newPattern == null)
|
||||
throw new IllegalArgumentException("Pattern cannot be null");
|
||||
parentPattern = newPattern;
|
||||
namedGroups = null;
|
||||
|
||||
// Reallocate state storage
|
||||
int parentGroupCount = Math.max(newPattern.capturingGroupCount, 10);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue