8148834: Update module-info reader/writer to 53.0
authoralanb
Thu, 19 May 2016 13:10:08 +0100
changeset 38425 3191fb2435f8
parent 38424 abb80b35c9dd
child 38426 5d51e882b3a2
8148834: Update module-info reader/writer to 53.0 Reviewed-by: sundar, chegar
jdk/src/java.base/share/classes/java/lang/module/ModuleInfo.java
jdk/src/java.base/share/classes/jdk/internal/module/ModuleInfoWriter.java
--- a/jdk/src/java.base/share/classes/java/lang/module/ModuleInfo.java	Thu May 19 13:08:36 2016 +0100
+++ b/jdk/src/java.base/share/classes/java/lang/module/ModuleInfo.java	Thu May 19 13:10:08 2016 +0100
@@ -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);
--- a/jdk/src/java.base/share/classes/jdk/internal/module/ModuleInfoWriter.java	Thu May 19 13:08:36 2016 +0100
+++ b/jdk/src/java.base/share/classes/jdk/internal/module/ModuleInfoWriter.java	Thu May 19 13:10:08 2016 +0100
@@ -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()));