Skip to content

Conversation

tony19
Copy link
Owner

@tony19 tony19 commented Jan 20, 2024

BREAKING CHANGE: Current users of Matcher#namedGroups() must rename their references to namedGroupsList()


This is only necessary if you build with JDK 20 or higher.

JDK 20 added MatchResult#namedGroups(), which conflicts with our own. This PR renames:

com.google.code.regexp.MatchResult#namedGroups()

to:

com.google.code.regexp.MatchResult#namedGroupsList()

implemented in Matcher#namedGroupsList().

This PR also implements Matcher#namedGroups() for compatibility with the JDK.

fix #73

JDK20 introduced their own MatchResult#namedGroups, so we have to
rename to avoid the naming conflict.

fix #73
@tony19 tony19 force-pushed the feat/named-groups-jdk20 branch 2 times, most recently from 3ac8df7 to 5412324 Compare January 21, 2024 00:13
@tony19 tony19 force-pushed the feat/named-groups-jdk20 branch from 5412324 to 9552147 Compare January 21, 2024 00:25
@tony19 tony19 merged commit 2c43791 into main Jan 21, 2024
@tony19 tony19 deleted the feat/named-groups-jdk20 branch January 21, 2024 00:31
@tony19 tony19 mentioned this pull request Jan 21, 2024
5 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Compiler error with Java 21

1 participant