Skip to content

Commit

Permalink
pin the java bytecode version of DynamicClassLoader::proxy product to…
Browse files Browse the repository at this point in the history
… java5 to support the prefined classed feature of native-image (#1586)
  • Loading branch information
dreamlike-ocean committed Jan 31, 2024
1 parent 2caef35 commit 1f582c9
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -1235,7 +1235,7 @@ protected DynamicClassLoader(Class<?> target) {
@SuppressFBWarnings(value = {"REC_CATCH_EXCEPTION", "DP_CREATE_CLASSLOADER_INSIDE_DO_PRIVILEGED"}, justification = "Expected internal invocation.")
protected static Object proxy(Class<?> proxy, Map<Method, Dispatcher> dispatchers) {
ClassWriter classWriter = new ClassWriter(0);
classWriter.visit(ClassFileVersion.ofThisVm(ClassFileVersion.JAVA_V5).getMinorMajorVersion(),
classWriter.visit(ClassFileVersion.JAVA_V5.getMinorMajorVersion(),
Opcodes.ACC_PUBLIC,
Type.getInternalName(proxy) + "$Proxy",
null,
Expand Down Expand Up @@ -1311,7 +1311,7 @@ protected static Object proxy(Class<?> proxy, Map<Method, Dispatcher> dispatcher
@SuppressFBWarnings(value = {"REC_CATCH_EXCEPTION", "DP_CREATE_CLASSLOADER_INSIDE_DO_PRIVILEGED"}, justification = "Expected internal invocation.")
protected static Invoker invoker() {
ClassWriter classWriter = new ClassWriter(0);
classWriter.visit(ClassFileVersion.ofThisVm(ClassFileVersion.JAVA_V5).getMinorMajorVersion(),
classWriter.visit(ClassFileVersion.JAVA_V5.getMinorMajorVersion(),
Opcodes.ACC_PUBLIC,
Type.getInternalName(Invoker.class) + "$Dispatcher",
null,
Expand Down

0 comments on commit 1f582c9

Please sign in to comment.