From cb1e8d410e25f7b4bf152ed005736a00f89c7a37 Mon Sep 17 00:00:00 2001 From: Rafael Winterhalter Date: Wed, 9 Oct 2024 20:24:54 +0200 Subject: [PATCH] Update ASM version. --- .../main/java/net/bytebuddy/ClassFileVersion.java | 12 +++++++++--- .../java/net/bytebuddy/ClassFileVersionTest.java | 3 ++- pom.xml | 2 +- 3 files changed, 12 insertions(+), 5 deletions(-) diff --git a/byte-buddy-dep/src/main/java/net/bytebuddy/ClassFileVersion.java b/byte-buddy-dep/src/main/java/net/bytebuddy/ClassFileVersion.java index bf025ffb9c..d0d86c3710 100644 --- a/byte-buddy-dep/src/main/java/net/bytebuddy/ClassFileVersion.java +++ b/byte-buddy-dep/src/main/java/net/bytebuddy/ClassFileVersion.java @@ -159,6 +159,11 @@ public class ClassFileVersion implements Comparable, Serializa */ public static final ClassFileVersion JAVA_V23 = new ClassFileVersion(Opcodes.V23); + /** + * The class file version of Java 24. + */ + public static final ClassFileVersion JAVA_V24 = new ClassFileVersion(Opcodes.V24); + /** * An array of class file versions in their sorting order. */ @@ -184,7 +189,8 @@ public class ClassFileVersion implements Comparable, Serializa ClassFileVersion.JAVA_V20, ClassFileVersion.JAVA_V21, ClassFileVersion.JAVA_V22, - ClassFileVersion.JAVA_V23}; + ClassFileVersion.JAVA_V23, + ClassFileVersion.JAVA_V24}; /** * A version locator for the executing JVM. @@ -278,7 +284,7 @@ public static ClassFileVersion ofJavaVersion(int javaVersion) { * @return The latest officially supported Java version. */ public static ClassFileVersion latest() { - return ClassFileVersion.JAVA_V23; + return ClassFileVersion.JAVA_V24; } /** @@ -297,7 +303,7 @@ public static ClassFileVersion ofThisVm() { * by parsing the {@code java.version} property which is provided by {@link java.lang.System#getProperty(String)}. If the system * property is not available, the {@code fallback} version is returned. * - * @param fallback The version to fallback to if locating a class file version is not possible. + * @param fallback The version to fall back to if locating a class file version is not possible. * @return The currently running Java process's class file version or the fallback if locating this version is impossible. */ @SuppressFBWarnings(value = "REC_CATCH_EXCEPTION", justification = "Exception should not be rethrown but trigger a fallback.") diff --git a/byte-buddy-dep/src/test/java/net/bytebuddy/ClassFileVersionTest.java b/byte-buddy-dep/src/test/java/net/bytebuddy/ClassFileVersionTest.java index 75c489c70a..296b204138 100644 --- a/byte-buddy-dep/src/test/java/net/bytebuddy/ClassFileVersionTest.java +++ b/byte-buddy-dep/src/test/java/net/bytebuddy/ClassFileVersionTest.java @@ -80,7 +80,8 @@ public static Collection data() { {20, 20, Collections.singletonList("20"), Opcodes.V20, (short) 64, (short) 0, true, true, true}, {21, 21, Collections.singletonList("21"), Opcodes.V21, (short) 65, (short) 0, true, true, true}, {22, 22, Collections.singletonList("22"), Opcodes.V22, (short) 66, (short) 0, true, true, true}, - {23, 23, Collections.singletonList("23"), Opcodes.V23, (short) 67, (short) 0, true, true, true} + {23, 23, Collections.singletonList("23"), Opcodes.V23, (short) 67, (short) 0, true, true, true}, + {24, 24, Collections.singletonList("24"), Opcodes.V24, (short) 68, (short) 0, true, true, true} }); } diff --git a/pom.xml b/pom.xml index 365c92bc69..13d1405f66 100644 --- a/pom.xml +++ b/pom.xml @@ -68,7 +68,7 @@ 1.6 net.bytebuddy https://s01.oss.sonatype.org - 9.7 + 9.7.1 5.12.1 4.13.2 2.28.2