jdk/test/java/lang/module/MultiReleaseJarTest.java
changeset 43612 91671699935d
parent 42338 a60f280f803c
child 43894 c316ff1ea2c7
--- a/jdk/test/java/lang/module/MultiReleaseJarTest.java	Tue Jan 31 19:26:10 2017 -0500
+++ b/jdk/test/java/lang/module/MultiReleaseJarTest.java	Fri Feb 03 12:36:42 2017 -0800
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2016, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2016, 2017, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -65,7 +65,7 @@
 
     private static final String MODULE_INFO = "module-info.class";
 
-    private static final int RELEASE = Runtime.version().major();
+    private static final String RELEASE = "" + Runtime.version().major();
 
     // are multi-release JARs enabled?
     private static final boolean MULTI_RELEASE;
@@ -88,8 +88,8 @@
                 .moduleInfo("module-info.class", descriptor)
                 .resource("p/Main.class")
                 .resource("p/Helper.class")
-                .resource("META-INF/versions/9/p/Helper.class")
-                .resource("META-INF/versions/9/p/internal/Helper9.class")
+                .resource("META-INF/versions/" + RELEASE + "/p/Helper.class")
+                .resource("META-INF/versions/" + RELEASE + "/p/internal/HelperNew.class")
                 .build();
 
         // find the module
@@ -131,9 +131,9 @@
                 .moduleInfo(MODULE_INFO, descriptor1)
                 .resource("p/Main.class")
                 .resource("p/Helper.class")
-                .moduleInfo("META-INF/versions/9/" + MODULE_INFO, descriptor2)
-                .resource("META-INF/versions/9/p/Helper.class")
-                .resource("META-INF/versions/9/p/internal/Helper9.class")
+                .moduleInfo("META-INF/versions/" + RELEASE + "/" + MODULE_INFO, descriptor2)
+                .resource("META-INF/versions/" + RELEASE + "/p/Helper.class")
+                .resource("META-INF/versions/" + RELEASE + "/p/internal/HelperNew.class")
                 .build();
 
         // find the module
@@ -161,8 +161,8 @@
         Path jar = new JarBuilder(name)
                 .resource("p/Main.class")
                 .resource("p/Helper.class")
-                .resource("META-INF/versions/9/p/Helper.class")
-                .resource("META-INF/versions/9/p/internal/Helper9.class")
+                .resource("META-INF/versions/" + RELEASE + "/p/Helper.class")
+                .resource("META-INF/versions/" + RELEASE + "/p/internal/HelperNew.class")
                 .build();
 
         // find the module
@@ -200,7 +200,7 @@
 
         Path jar = new JarBuilder(name)
                 .moduleInfo(MODULE_INFO, descriptor1)
-                .moduleInfo("META-INF/versions/9/" + MODULE_INFO, descriptor2)
+                .moduleInfo("META-INF/versions/" + RELEASE + "/" + MODULE_INFO, descriptor2)
                 .build();
 
         // find the module