Skip to content

Commit

Permalink
Recognize JDK 21 class format
Browse files Browse the repository at this point in the history
  • Loading branch information
wendigo authored and slawekjaranowski committed May 16, 2023
1 parent 1a96c60 commit b7ba48d
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -120,6 +120,9 @@ public class EnforceBytecodeVersion extends AbstractResolveDependencies {

// Java 20
JDK_TO_MAJOR_VERSION_NUMBER_MAPPING.put("20", 64);

// Java 21
JDK_TO_MAJOR_VERSION_NUMBER_MAPPING.put("21", 65);
}

static String renderVersion(int major, int minor) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,5 +30,6 @@ public void renderVersion() {
assertEquals("JDK 12", EnforceBytecodeVersion.renderVersion(56, 0));
assertEquals("51.3", EnforceBytecodeVersion.renderVersion(51, 3));
assertEquals("44.0", EnforceBytecodeVersion.renderVersion(44, 0));
assertEquals("JDK 21", EnforceBytecodeVersion.renderVersion(65, 0));
}
}

0 comments on commit b7ba48d

Please sign in to comment.