Skip to content

Commit

Permalink
Update groovy dep, workaround for test failing on JDK 21
Browse files Browse the repository at this point in the history
  • Loading branch information
manovotn committed Feb 26, 2024
1 parent a8c6a49 commit 0d50026
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,13 @@ public void testInterfaceTypesResolved() {
expectedTypes.add(Types.newParameterizedType(ArrayList.class, Integer.class));
expectedTypes.add(Types.newParameterizedType(Iterable.class, Integer.class));

// JDK 21 adds interface java.util.SequencedCollection<class java.lang.Integer>
try {
Class<?> seqCollectionClazz = Class.forName("java.util.SequencedCollection");
expectedTypes.add(Types.newParameterizedType(seqCollectionClazz, Integer.class));
} catch (ClassNotFoundException e) {
// this just means we are running on older JDK
}
HierarchyDiscovery discovery = new HierarchyDiscovery(Types.newParameterizedType(ArrayList.class, Integer.class));
Types.assertTypeSetMatches(expectedTypes, discovery.getTypeClosure());
}
Expand Down
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@
<classfilewriter.version>1.3.0.Final</classfilewriter.version>
<spotbugs-maven-plugin.version>4.7.3.4</spotbugs-maven-plugin.version>
<spotbugs-annotations-version>4.7.3</spotbugs-annotations-version>
<groovy.version>3.0.13</groovy.version>
<groovy.version>3.0.20</groovy.version>
<htmlunit.version>2.70.0</htmlunit.version>
<jacoco.version>0.8.8</jacoco.version>
<jandex.version>3.1.3</jandex.version>
Expand Down

0 comments on commit 0d50026

Please sign in to comment.