changeset 3140:cda7ebfe711e

Merge
author iris
date Thu, 19 Nov 2015 14:01:27 -0800
parents 58525132b5b0 0e63eea50dd7
children c35ddcde5816
files
diffstat 5 files changed, 11 insertions(+), 7 deletions(-) [+]
line wrap: on
line diff
--- a/make/gensrc/GensrcCommon.gmk	Thu Nov 19 09:36:37 2015 -0800
+++ b/make/gensrc/GensrcCommon.gmk	Thu Nov 19 14:01:27 2015 -0800
@@ -1,5 +1,5 @@
 #
-# Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2014, 2015, 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
@@ -50,7 +50,7 @@
 define SetupVersionProperties
   $(SUPPORT_OUTPUTDIR)/gensrc/$(MODULE)/$$(strip $2):
 	$(MKDIR) -p $$(@D)
-	$(PRINTF) "jdk=$(JDK_VERSION)\nfull=$(FULL_VERSION)\nrelease=$(RELEASE)\n" \
+	$(PRINTF) "jdk=$(VERSION_NUMBER)\nfull=$(VERSION_STRING)\nrelease=$(VERSION_SHORT)\n" \
 	    > $$@
 
   $$(strip $1) += $(SUPPORT_OUTPUTDIR)/gensrc/$(MODULE)/$$(strip $2)
@@ -68,7 +68,7 @@
 
   # Convert .../src/<module>/share/classes/com/sun/tools/javac/resources/javac_zh_CN.properties
   # to .../langtools/gensrc/<module>/com/sun/tools/javac/resources/javac_zh_CN.java
-  # Strip away prefix and suffix, leaving for example only: 
+  # Strip away prefix and suffix, leaving for example only:
   # "<module>/share/classes/com/sun/tools/javac/resources/javac_zh_CN"
   PROPJAVAS := $$(patsubst $(LANGTOOLS_TOPDIR)/src/%, \
       $(SUPPORT_OUTPUTDIR)/gensrc/%, \
--- a/src/java.compiler/share/classes/javax/lang/model/SourceVersion.java	Thu Nov 19 09:36:37 2015 -0800
+++ b/src/java.compiler/share/classes/javax/lang/model/SourceVersion.java	Thu Nov 19 14:01:27 2015 -0800
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2005, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2005, 2015, 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
@@ -168,6 +168,7 @@
             String specVersion = System.getProperty("java.specification.version");
 
             switch (specVersion) {
+                case "9":
                 case "1.9":
                     return RELEASE_9;
                 case "1.8":
--- a/src/jdk.jshell/share/classes/jdk/jshell/TaskFactory.java	Thu Nov 19 09:36:37 2015 -0800
+++ b/src/jdk.jshell/share/classes/jdk/jshell/TaskFactory.java	Thu Nov 19 14:01:27 2015 -0800
@@ -80,7 +80,7 @@
         if (compiler == null) {
             throw new UnsupportedOperationException("Compiler not available, must be run with full JDK 9.");
         }
-        if (!System.getProperty("java.specification.version").equals("1.9"))  {
+        if (!System.getProperty("java.specification.version").equals("9"))  {
             throw new UnsupportedOperationException("Wrong compiler, must be run with full JDK 9.");
         }
         this.fileManager = new MemoryFileManager(
--- a/test/tools/javac/options/modes/InfoOptsTest.java	Thu Nov 19 09:36:37 2015 -0800
+++ b/test/tools/javac/options/modes/InfoOptsTest.java	Thu Nov 19 14:01:27 2015 -0800
@@ -48,7 +48,7 @@
 
         String specVersion = System.getProperty("java.specification.version");
         testInfoOpt("-version", "javac", specVersion);
-        testInfoOpt("-fullversion", "javac", specVersion, "-b");
+        testInfoOpt("-fullversion", "javac", specVersion, "+");
     }
 
     void testInfoOpt(String opt, String... expect) {
--- a/test/tools/javac/options/modes/SourceTargetTest.java	Thu Nov 19 09:36:37 2015 -0800
+++ b/test/tools/javac/options/modes/SourceTargetTest.java	Thu Nov 19 14:01:27 2015 -0800
@@ -45,7 +45,10 @@
     @Test
     void testSourceTarget() throws IOException {
         String v = System.getProperty("java.specification.version");
-        String latest = v.substring(v.lastIndexOf(".") + 1);
+        String[] va = v.split("\\.");
+        int major = Integer.parseInt(va[0]);
+        boolean newVersion = major > 8;
+        String latest = (newVersion) ? va[0] : va[1];
         String prev = String.valueOf(Integer.valueOf(latest) - 1);
 
         writeFile("C.java", "class C { }");