Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ jobs:
architecture: [x64]
distribution: [zulu]
os: [ubuntu-latest, macOS-latest, windows-latest]
java: [9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24]
java: [9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26]
exclude:
- architecture: x64
java: 10
Expand Down
2 changes: 1 addition & 1 deletion java/src/main/java/io/github/toolfactory/jvm/Info.java
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
package io.github.toolfactory.jvm;

public interface Info {
public final static int[] CRITICAL_VERSIONS = {7, 9, 14, 17, 20, 21, 22, 24, 25};
public final static int[] CRITICAL_VERSIONS = {7, 9, 14, 17, 20, 21, 22, 24, 25, 26};


public boolean isCompressedOopsOffOn64BitHotspot();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -95,4 +95,29 @@ public Class<?> apply(String className, Boolean initialize, ClassLoader classLoa

}


public static class ForJava26 extends Abst {

public ForJava26(Map<Object, Object> context) throws Throwable {
super(context);
}

@Override
protected MethodHandle retrieveClassFinder(Map<Object, Object> context) throws Throwable {
ObjectProvider functionProvider = ObjectProvider.get(context);
MethodHandles.Lookup consulter = functionProvider.getOrBuildObject(DeepConsulterSupplyFunction.class, context).apply(Class.class);
// In Java 26 the caller parameter was removed from Class.forName0
return consulter.findStatic(
Class.class, "forName0",
MethodType.methodType(Class.class, String.class, boolean.class, ClassLoader.class)
);
}

@Override
public Class<?> apply(String className, Boolean initialize, ClassLoader classLoader, Class<?> caller) throws Throwable {
return (Class<?>)classFinder.invokeWithArguments(className, initialize.booleanValue(), classLoader);
}

}

}