# HG changeset patch # User iris # Date 1436819047 25200 # Node ID 825a2c2148dcf1af051d3a747e557f41f641e978 # Parent f2996b9a96106e4391d96cbff99fe3aa180b3f03# Parent aaadc83e4238be25cb717bfb8567c93eb3487457 Merge diff -r f2996b9a9610 -r 825a2c2148dc langtools/make/gensrc/GensrcCommon.gmk --- a/langtools/make/gensrc/GensrcCommon.gmk Thu Jul 09 13:49:40 2015 -0700 +++ b/langtools/make/gensrc/GensrcCommon.gmk Mon Jul 13 13:24:07 2015 -0700 @@ -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//share/classes/com/sun/tools/javac/resources/javac_zh_CN.properties # to .../langtools/gensrc//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: # "/share/classes/com/sun/tools/javac/resources/javac_zh_CN" PROPJAVAS := $$(patsubst $(LANGTOOLS_TOPDIR)/src/%, \ $(SUPPORT_OUTPUTDIR)/gensrc/%, \ diff -r f2996b9a9610 -r 825a2c2148dc langtools/src/java.compiler/share/classes/javax/lang/model/SourceVersion.java --- a/langtools/src/java.compiler/share/classes/javax/lang/model/SourceVersion.java Thu Jul 09 13:49:40 2015 -0700 +++ b/langtools/src/java.compiler/share/classes/javax/lang/model/SourceVersion.java Mon Jul 13 13:24:07 2015 -0700 @@ -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": diff -r f2996b9a9610 -r 825a2c2148dc langtools/test/tools/javac/options/modes/InfoOptsTest.java --- a/langtools/test/tools/javac/options/modes/InfoOptsTest.java Thu Jul 09 13:49:40 2015 -0700 +++ b/langtools/test/tools/javac/options/modes/InfoOptsTest.java Mon Jul 13 13:24:07 2015 -0700 @@ -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) { diff -r f2996b9a9610 -r 825a2c2148dc langtools/test/tools/javac/options/modes/SourceTargetTest.java --- a/langtools/test/tools/javac/options/modes/SourceTargetTest.java Thu Jul 09 13:49:40 2015 -0700 +++ b/langtools/test/tools/javac/options/modes/SourceTargetTest.java Mon Jul 13 13:24:07 2015 -0700 @@ -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 { }");