Merge
This commit is contained in:
commit
f0eef2073e
@ -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.
|
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||||
#
|
#
|
||||||
# This code is free software; you can redistribute it and/or modify it
|
# This code is free software; you can redistribute it and/or modify it
|
||||||
@ -50,7 +50,7 @@ TOOL_PARSEPROPS_CMD := $(JAVA) -cp $(BUILDTOOLS_OUTPUTDIR)/langtools_tools_class
|
|||||||
define SetupVersionProperties
|
define SetupVersionProperties
|
||||||
$(SUPPORT_OUTPUTDIR)/gensrc/$(MODULE)/$$(strip $2):
|
$(SUPPORT_OUTPUTDIR)/gensrc/$(MODULE)/$$(strip $2):
|
||||||
$(MKDIR) -p $$(@D)
|
$(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)
|
$$(strip $1) += $(SUPPORT_OUTPUTDIR)/gensrc/$(MODULE)/$$(strip $2)
|
||||||
@ -68,7 +68,7 @@ define SetupCompileProperties
|
|||||||
|
|
||||||
# Convert .../src/<module>/share/classes/com/sun/tools/javac/resources/javac_zh_CN.properties
|
# 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
|
# 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"
|
# "<module>/share/classes/com/sun/tools/javac/resources/javac_zh_CN"
|
||||||
PROPJAVAS := $$(patsubst $(LANGTOOLS_TOPDIR)/src/%, \
|
PROPJAVAS := $$(patsubst $(LANGTOOLS_TOPDIR)/src/%, \
|
||||||
$(SUPPORT_OUTPUTDIR)/gensrc/%, \
|
$(SUPPORT_OUTPUTDIR)/gensrc/%, \
|
||||||
|
@ -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.
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||||
*
|
*
|
||||||
* This code is free software; you can redistribute it and/or modify it
|
* This code is free software; you can redistribute it and/or modify it
|
||||||
@ -168,6 +168,7 @@ public enum SourceVersion {
|
|||||||
String specVersion = System.getProperty("java.specification.version");
|
String specVersion = System.getProperty("java.specification.version");
|
||||||
|
|
||||||
switch (specVersion) {
|
switch (specVersion) {
|
||||||
|
case "9":
|
||||||
case "1.9":
|
case "1.9":
|
||||||
return RELEASE_9;
|
return RELEASE_9;
|
||||||
case "1.8":
|
case "1.8":
|
||||||
|
@ -48,7 +48,7 @@ public class InfoOptsTest extends Tester {
|
|||||||
|
|
||||||
String specVersion = System.getProperty("java.specification.version");
|
String specVersion = System.getProperty("java.specification.version");
|
||||||
testInfoOpt("-version", "javac", specVersion);
|
testInfoOpt("-version", "javac", specVersion);
|
||||||
testInfoOpt("-fullversion", "javac", specVersion, "-b");
|
testInfoOpt("-fullversion", "javac", specVersion, "+");
|
||||||
}
|
}
|
||||||
|
|
||||||
void testInfoOpt(String opt, String... expect) {
|
void testInfoOpt(String opt, String... expect) {
|
||||||
|
@ -45,7 +45,10 @@ public class SourceTargetTest extends Tester {
|
|||||||
@Test
|
@Test
|
||||||
void testSourceTarget() throws IOException {
|
void testSourceTarget() throws IOException {
|
||||||
String v = System.getProperty("java.specification.version");
|
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);
|
String prev = String.valueOf(Integer.valueOf(latest) - 1);
|
||||||
|
|
||||||
writeFile("C.java", "class C { }");
|
writeFile("C.java", "class C { }");
|
||||||
|
Loading…
Reference in New Issue
Block a user