JAVA_HOME=<path to JDK 21> ant
...
[javac] ./synoptic/src/synoptic/util/matching/NamedMatcher.java:107: error: namedGroups() in NamedMatcher cannot implement namedGroups() in MatchResult
[javac] public Map<String, String> namedGroups() {
[javac] ^
[javac] return type Map<String,String> is not compatible with Map<String,Integer>
[javac] ./synoptic/src/synoptic/util/matching/INamedMatchResult.java:15: error: namedGroups() in INamedMatchResult clashes with namedGroups() in MatchResult
[javac] Map<String, String> namedGroups();
[javac] ^
[javac] return type Map<String,String> is not compatible with Map<String,Integer>
The repro requires updating the source version from 1.7 to 8, the latest javac versions to not support -source 1.7:
Project does not compile with Java 21 language and API level.
The definition of
namedGroups()
clashes with a JDK API was added in JDK 20: https://bugs.openjdk.org/browse/JDK-8292872Repro:
The repro requires updating the source version from 1.7 to 8, the latest javac versions to not support
-source 1.7
: