2
0
Fork 0
mirror of https://github.com/ethauvin/rife2.git synced 2025-05-01 02:58:12 -07:00

Updated generated bytecode of template engine to use the JDK 17 class format

This commit is contained in:
Geert Bevin 2023-02-18 21:20:38 -05:00
parent 8175494693
commit fd31820e96

View file

@ -66,13 +66,13 @@ final class Parsed implements Opcodes {
} }
byte[] getByteCode() { byte[] getByteCode() {
var class_writer = new ClassWriter(ClassWriter.COMPUTE_MAXS); var class_writer = new ClassWriter(ClassWriter.COMPUTE_MAXS | ClassWriter.COMPUTE_FRAMES);
MethodVisitor method = null; MethodVisitor method = null;
var full_classname = (getPackage() + "." + getClassName()).replace('.', '/'); var full_classname = (getPackage() + "." + getClassName()).replace('.', '/');
// define the template class // define the template class
class_writer.visit(V1_4, ACC_PUBLIC|ACC_SYNCHRONIZED, full_classname, null, "rife/template/AbstractTemplate", null); class_writer.visit(V17, ACC_PUBLIC|ACC_SYNCHRONIZED, full_classname, null, "rife/template/AbstractTemplate", null);
// generate the template constructor // generate the template constructor
method = class_writer.visitMethod(ACC_PUBLIC, "<init>", "()V", null, null); method = class_writer.visitMethod(ACC_PUBLIC, "<init>", "()V", null, null);