diff --git a/src/main/java/de/thetaphi/forbiddenapis/Checker.java b/src/main/java/de/thetaphi/forbiddenapis/Checker.java index 5a692715..9a6bf0e3 100644 --- a/src/main/java/de/thetaphi/forbiddenapis/Checker.java +++ b/src/main/java/de/thetaphi/forbiddenapis/Checker.java @@ -401,6 +401,10 @@ private void parseBundledSignatures(String name, String jdkTargetVersion, boolea InputStream in = Checker.class.getResourceAsStream("signatures/" + name + ".txt"); // automatically expand the compiler version in here (for jdk-* signatures without version): if (in == null && jdkTargetVersion != null && name.startsWith("jdk-") && !name.matches(".*?\\-\\d\\.\\d")) { + // convert the "new" version number "major.0" to old-style "1.major" (as this matches our resources): + if (!jdkTargetVersion.startsWith("1.") && jdkTargetVersion.matches("\\d\\.0")) { + jdkTargetVersion = "1." + jdkTargetVersion.substring(0, 1); + } name = name + "-" + jdkTargetVersion; in = Checker.class.getResourceAsStream("signatures/" + name + ".txt"); } diff --git a/src/test/antunit/TestMavenMojo.xml b/src/test/antunit/TestMavenMojo.xml index 821eaa9f..5297fcae 100644 --- a/src/test/antunit/TestMavenMojo.xml +++ b/src/test/antunit/TestMavenMojo.xml @@ -29,8 +29,19 @@ - - + + + + + + + + + + + + + @@ -105,8 +116,8 @@ - - + +