8180745: Add --release 10 as an alias for --release 9
authorjlahoda
Mon, 22 May 2017 15:50:09 +0200
changeset 45218 f3802669abd0
parent 45217 6f188021f8f8
child 45219 9d6a11ccc9b1
8180745: Add --release 10 as an alias for --release 9 Reviewed-by: mcimadamore
langtools/src/jdk.compiler/share/classes/com/sun/tools/javac/platform/JDKPlatformProvider.java
--- a/langtools/src/jdk.compiler/share/classes/com/sun/tools/javac/platform/JDKPlatformProvider.java	Fri May 19 04:59:51 2017 +0000
+++ b/langtools/src/jdk.compiler/share/classes/com/sun/tools/javac/platform/JDKPlatformProvider.java	Mon May 22 15:50:09 2017 +0200
@@ -66,7 +66,7 @@
 
     @Override
     public PlatformDescription getPlatform(String platformName, String options) {
-        return new PlatformDescriptionImpl(platformName);
+        return new PlatformDescriptionImpl(platformName.equals("10") ? "9" : platformName);
     }
 
     private static final String[] symbolFileLocation = { "lib", "ct.sym" };
@@ -93,6 +93,10 @@
             } catch (IOException | ProviderNotFoundException ex) {
             }
         }
+
+        if (SUPPORTED_JAVA_PLATFORM_VERSIONS.contains("9")) {
+            SUPPORTED_JAVA_PLATFORM_VERSIONS.add("10");
+        }
     }
 
     private static String targetNumericVersion(Target target) {