diff --git a/src/main/java/org/codehaus/mojo/extraenforcer/dependencies/EnforceBytecodeVersion.java b/src/main/java/org/codehaus/mojo/extraenforcer/dependencies/EnforceBytecodeVersion.java index 90afca3..441de9a 100644 --- a/src/main/java/org/codehaus/mojo/extraenforcer/dependencies/EnforceBytecodeVersion.java +++ b/src/main/java/org/codehaus/mojo/extraenforcer/dependencies/EnforceBytecodeVersion.java @@ -132,6 +132,9 @@ public class EnforceBytecodeVersion extends AbstractResolveDependencies { // Java 23 JDK_TO_MAJOR_VERSION_NUMBER_MAPPING.put("23", 67); + + // Java 24 + JDK_TO_MAJOR_VERSION_NUMBER_MAPPING.put("24", 68); } @Inject diff --git a/src/test/java/org/codehaus/mojo/extraenforcer/dependencies/EnforceBytecodeVersionTest.java b/src/test/java/org/codehaus/mojo/extraenforcer/dependencies/EnforceBytecodeVersionTest.java index 4c49242..2019f70 100644 --- a/src/test/java/org/codehaus/mojo/extraenforcer/dependencies/EnforceBytecodeVersionTest.java +++ b/src/test/java/org/codehaus/mojo/extraenforcer/dependencies/EnforceBytecodeVersionTest.java @@ -33,5 +33,6 @@ public void renderVersion() { assertEquals("JDK 21", EnforceBytecodeVersion.renderVersion(65, 0)); assertEquals("JDK 22", EnforceBytecodeVersion.renderVersion(66, 0)); assertEquals("JDK 23", EnforceBytecodeVersion.renderVersion(67, 0)); + assertEquals("JDK 24", EnforceBytecodeVersion.renderVersion(68, 0)); } }