diff --git a/error-prone-contrib/src/main/java/tech/picnic/errorprone/bugpatterns/RefasterCheck.java b/error-prone-contrib/src/main/java/tech/picnic/errorprone/bugpatterns/RefasterCheck.java index da2913349a4..936982864a1 100644 --- a/error-prone-contrib/src/main/java/tech/picnic/errorprone/bugpatterns/RefasterCheck.java +++ b/error-prone-contrib/src/main/java/tech/picnic/errorprone/bugpatterns/RefasterCheck.java @@ -195,7 +195,7 @@ private static ImmutableListMultimap loadAllCodeTransfo private static ImmutableSet getClassPathResources() { try { - return ClassPath.from(ClassLoader.getSystemClassLoader()).getResources(); + return ClassPath.from(RefasterCheck.class.getClassLoader()).getResources(); } catch (IOException e) { throw new UncheckedIOException("Failed to scan classpath for resources", e); }