From 5f42efdde7813cfe346974db40c26a1f3b31dce8 Mon Sep 17 00:00:00 2001 From: michaeloffner Date: Tue, 27 Feb 2024 15:29:10 +0100 Subject: [PATCH] update java version for bytecode creation for all cases --- core/src/main/java/lucee/transformer/bytecode/Page.java | 2 +- .../lucee/transformer/bytecode/reflection/ASMProxyFactory.java | 2 +- loader/build.xml | 2 +- loader/pom.xml | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/core/src/main/java/lucee/transformer/bytecode/Page.java b/core/src/main/java/lucee/transformer/bytecode/Page.java index ba5a70a185..1d731ed79a 100755 --- a/core/src/main/java/lucee/transformer/bytecode/Page.java +++ b/core/src/main/java/lucee/transformer/bytecode/Page.java @@ -334,7 +334,7 @@ public byte[] execute(String className) throws TransformerException { else if (isInterface(comp)) parent = InterfacePageImpl.class.getName();// "lucee/runtime/InterfacePage"; parent = parent.replace('.', '/'); - cw.visit(Opcodes.V1_6, Opcodes.ACC_PUBLIC + Opcodes.ACC_FINAL, className, null, parent, interfaces); + cw.visit(ASMUtil.getJavaVersionForBytecodeGeneration(), Opcodes.ACC_PUBLIC + Opcodes.ACC_FINAL, className, null, parent, interfaces); if (optionalPS != null) { // we use full path when FD is enabled String path = config.allowRequestTimeout() ? optionalPS.getRealpathWithVirtual() : optionalPS.getPhyscalFile().getAbsolutePath(); diff --git a/core/src/main/java/lucee/transformer/bytecode/reflection/ASMProxyFactory.java b/core/src/main/java/lucee/transformer/bytecode/reflection/ASMProxyFactory.java index 97a61414b7..819d79cff6 100644 --- a/core/src/main/java/lucee/transformer/bytecode/reflection/ASMProxyFactory.java +++ b/core/src/main/java/lucee/transformer/bytecode/reflection/ASMProxyFactory.java @@ -204,7 +204,7 @@ private static byte[] _createMethod(Type type, Class clazz, Method method, Resou className = className.replace('.', File.separatorChar); ClassWriter cw = ASMUtil.getClassWriter(); - cw.visit(Opcodes.V1_6, Opcodes.ACC_PUBLIC, className, null, ASM_METHOD.getInternalName(), null); + cw.visit(ASMUtil.getJavaVersionForBytecodeGeneration(), Opcodes.ACC_PUBLIC, className, null, ASM_METHOD.getInternalName(), null); // CONSTRUCTOR diff --git a/loader/build.xml b/loader/build.xml index 234ff477af..f0fd875d3a 100644 --- a/loader/build.xml +++ b/loader/build.xml @@ -2,7 +2,7 @@ - + diff --git a/loader/pom.xml b/loader/pom.xml index 6fdbdfa78d..5d9da66de8 100644 --- a/loader/pom.xml +++ b/loader/pom.xml @@ -3,7 +3,7 @@ org.lucee lucee - 6.1.0.62-SNAPSHOT + 6.1.0.63-SNAPSHOT jar Lucee Loader Build