Skip to content

Commit bc413f5

Browse files
committed
Fix issue reported in #65
1 parent 942049a commit bc413f5

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/main/java/de/thetaphi/forbiddenapis/Checker.java

+3-2
Original file line numberDiff line numberDiff line change
@@ -333,11 +333,12 @@ public final void parseBundledSignatures(String name, String jdkTargetVersion) t
333333
if (!name.matches("[A-Za-z0-9\\-\\.]+")) {
334334
throw new ParseException("Invalid bundled signature reference: " + name);
335335
}
336-
InputStream in = this.getClass().getResourceAsStream("signatures/" + name + ".txt");
336+
// use Checker.class hardcoded (not getClass) so we have a fixed package name:
337+
InputStream in = Checker.class.getResourceAsStream("signatures/" + name + ".txt");
337338
// automatically expand the compiler version in here (for jdk-* signatures without version):
338339
if (in == null && jdkTargetVersion != null && name.startsWith("jdk-") && !name.matches(".*?\\-\\d\\.\\d")) {
339340
name = name + "-" + jdkTargetVersion;
340-
in = this.getClass().getResourceAsStream("signatures/" + name + ".txt");
341+
in = Checker.class.getResourceAsStream("signatures/" + name + ".txt");
341342
}
342343
if (in == null) {
343344
throw new FileNotFoundException("Bundled signatures resource not found: " + name);

0 commit comments

Comments
 (0)