Skip to content

Commit

Permalink
Recognize JDK 22-23 class formats (#286)
Browse files Browse the repository at this point in the history
* Recognize JDK 22 class format
* Recognize JDK 23 class format
  • Loading branch information
wendigo authored Mar 8, 2024
1 parent ddf71df commit 50b3017
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -129,6 129,12 @@ public class EnforceBytecodeVersion extends AbstractResolveDependencies {

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

// Java 22
JDK_TO_MAJOR_VERSION_NUMBER_MAPPING.put("22", 66);

// Java 23
JDK_TO_MAJOR_VERSION_NUMBER_MAPPING.put("23", 67);
}

@Inject
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,5 31,7 @@ public void renderVersion() {
assertEquals("51.3", EnforceBytecodeVersion.renderVersion(51, 3));
assertEquals("44.0", EnforceBytecodeVersion.renderVersion(44, 0));
assertEquals("JDK 21", EnforceBytecodeVersion.renderVersion(65, 0));
assertEquals("JDK 22", EnforceBytecodeVersion.renderVersion(66, 0));
assertEquals("JDK 23", EnforceBytecodeVersion.renderVersion(67, 0));
}
}

0 comments on commit 50b3017

Please sign in to comment.