< prev index next >

src/java.base/share/classes/jdk/internal/module/ModuleInfoExtender.java

Print this page
rev 52456 : imported patch asm.additional

*** 151,161 **** ClassWriter cw = new ClassWriter(ClassWriter.COMPUTE_MAXS + ClassWriter.COMPUTE_FRAMES); ClassReader cr = new ClassReader(in); ! ClassVisitor cv = new ClassVisitor(Opcodes.ASM6, cw) { @Override public ModuleVisitor visitModule(String name, int flags, String version) { Version v = ModuleInfoExtender.this.version; String vs = (v != null) ? v.toString() : version; ModuleVisitor mv = super.visitModule(name, flags, vs); --- 151,161 ---- ClassWriter cw = new ClassWriter(ClassWriter.COMPUTE_MAXS + ClassWriter.COMPUTE_FRAMES); ClassReader cr = new ClassReader(in); ! ClassVisitor cv = new ClassVisitor(Opcodes.ASM7, cw) { @Override public ModuleVisitor visitModule(String name, int flags, String version) { Version v = ModuleInfoExtender.this.version; String vs = (v != null) ? v.toString() : version; ModuleVisitor mv = super.visitModule(name, flags, vs);
*** 168,178 **** // ModulePackages attribute if (packages != null) { packages.forEach(pn -> mv.visitPackage(pn.replace('.', '/'))); } ! return new ModuleVisitor(Opcodes.ASM6, mv) { public void visitMainClass(String existingMainClass) { // skip main class if there is a new value if (mainClass == null) { super.visitMainClass(existingMainClass); } --- 168,178 ---- // ModulePackages attribute if (packages != null) { packages.forEach(pn -> mv.visitPackage(pn.replace('.', '/'))); } ! return new ModuleVisitor(Opcodes.ASM7, mv) { public void visitMainClass(String existingMainClass) { // skip main class if there is a new value if (mainClass == null) { super.visitMainClass(existingMainClass); }
< prev index next >