Skip to content

Commit

Permalink
Java 7 compat fix
Browse files Browse the repository at this point in the history
  • Loading branch information
lukehutch committed May 8, 2023
1 parent 01ca4fe commit 94d33a2
Showing 1 changed file with 2 additions and 2 deletions.
Expand Up @@ -26,9 +26,9 @@ public void testURLs() {
assertThat(scan("javax.annotation.ManagedBean", jarUrl)).containsOnly("ch.ivyteam.test.MyManagedBean");
}

public static Set<String> scan(final String annotation, final String url) {
public static Set<String> scan(final String annotation, final String urlStr) {
final ClassGraph classGraph = new ClassGraph()
.overrideClasspath(Set.of(url)).disableNestedJarScanning().enableAnnotationInfo();
.overrideClasspath(Set.<String> of(urlStr)).disableNestedJarScanning().enableAnnotationInfo();
try (ScanResult result = classGraph.scan()) {
return result.getClassesWithAnnotation(annotation).getStandardClasses().getNames().stream()
.collect(Collectors.toSet());
Expand Down

0 comments on commit 94d33a2

Please sign in to comment.