Skip to content

Commit

Permalink
Update ASM version.
Browse files Browse the repository at this point in the history
  • Loading branch information
raphw committed Oct 9, 2024
1 parent fe56d6d commit cb1e8d4
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 5 deletions.
12 changes: 9 additions & 3 deletions byte-buddy-dep/src/main/java/net/bytebuddy/ClassFileVersion.java
Original file line number Diff line number Diff line change
Expand Up @@ -159,6 +159,11 @@ public class ClassFileVersion implements Comparable<ClassFileVersion>, 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.
*/
Expand All @@ -184,7 +189,8 @@ public class ClassFileVersion implements Comparable<ClassFileVersion>, 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.
Expand Down Expand Up @@ -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;
}

/**
Expand All @@ -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.")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,8 @@ public static Collection<Object[]> 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}
});
}

Expand Down
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@
<bytecode.test.version>1.6</bytecode.test.version>
<pitest.target>net.bytebuddy</pitest.target>
<nexus.url>https://s01.oss.sonatype.org</nexus.url>
<version.asm>9.7</version.asm>
<version.asm>9.7.1</version.asm>
<version.jna>5.12.1</version.jna>
<version.junit>4.13.2</version.junit>
<version.mockito>2.28.2</version.mockito>
Expand Down

0 comments on commit cb1e8d4

Please sign in to comment.