Re: 8148834: Update module-info reader/writer to 53.0
+1 On 5/19/2016 5:19 PM, Alan Bateman wrote: > javac has been switched to generate v53.0 class files. ASM, pack200 > and several other areas have been updated too. We have two places in > the module-info reader/writing that needs to be updated so I need a > Reviewer to get this into jdk9/dev. > > -Alan > > diff --git > a/src/java.base/share/classes/java/lang/module/ModuleInfo.java > b/src/java.base/share/classes/java/lang/module/ModuleInfo.java > --- a/src/java.base/share/classes/java/lang/module/ModuleInfo.java > +++ b/src/java.base/share/classes/java/lang/module/ModuleInfo.java > @@ -154,7 +154,7 @@ > int minor_version = in.readUnsignedShort(); > int major_version = in.readUnsignedShort(); > if (major_version < 53) { > -// throw invalidModuleDescriptor"Must be >= 53.0"); > +throw invalidModuleDescriptor("Must be >= 53.0"); > } > > ConstantPool cpool = new ConstantPool(in); > diff --git > a/src/java.base/share/classes/jdk/internal/module/ModuleInfoWriter.java > b/src/java.base/share/classes/jdk/internal/module/ModuleInfoWriter.java > --- > a/src/java.base/share/classes/jdk/internal/module/ModuleInfoWriter.java > +++ > b/src/java.base/share/classes/jdk/internal/module/ModuleInfoWriter.java > @@ -54,7 +54,7 @@ > ClassWriter cw = new ClassWriter(0); > > String name = md.name().replace('.', '/') + "/module-info"; > -cw.visit(Opcodes.V1_8, ACC_MODULE, name, null, null, null); > +cw.visit(Opcodes.V1_9, ACC_MODULE, name, null, null, null); > > cw.visitAttribute(new ModuleAttribute(md)); > cw.visitAttribute(new > ConcealedPackagesAttribute(md.conceals()));
Re: 8148834: Update module-info reader/writer to 53.0
On 19 May 2016, at 12:49, Alan Bateman wrote: > javac has been switched to generate v53.0 class files. ASM, pack200 and > several other areas have been updated too. We have two places in the > module-info reader/writing that needs to be updated so I need a Reviewer to > get this into jdk9/dev. > > -Alan > > diff --git a/src/java.base/share/classes/java/lang/module/ModuleInfo.java > b/src/java.base/share/classes/java/lang/module/ModuleInfo.java > --- a/src/java.base/share/classes/java/lang/module/ModuleInfo.java > +++ b/src/java.base/share/classes/java/lang/module/ModuleInfo.java > @@ -154,7 +154,7 @@ > int minor_version = in.readUnsignedShort(); > int major_version = in.readUnsignedShort(); > if (major_version < 53) { > -// throw invalidModuleDescriptor"Must be >= 53.0"); > +throw invalidModuleDescriptor("Must be >= 53.0"); > } > > ConstantPool cpool = new ConstantPool(in); > diff --git > a/src/java.base/share/classes/jdk/internal/module/ModuleInfoWriter.java > b/src/java.base/share/classes/jdk/internal/module/ModuleInfoWriter.java > --- a/src/java.base/share/classes/jdk/internal/module/ModuleInfoWriter.java > +++ b/src/java.base/share/classes/jdk/internal/module/ModuleInfoWriter.java > @@ -54,7 +54,7 @@ > ClassWriter cw = new ClassWriter(0); > > String name = md.name().replace('.', '/') + "/module-info"; > -cw.visit(Opcodes.V1_8, ACC_MODULE, name, null, null, null); > +cw.visit(Opcodes.V1_9, ACC_MODULE, name, null, null, null); > > cw.visitAttribute(new ModuleAttribute(md)); > cw.visitAttribute(new ConcealedPackagesAttribute(md.conceals())); This looks good to me Alan. -Chris.