changeset 52981:52a692760109

8214794: java.specification.version should be only the major version number Reviewed-by: martin, mchung, bpb
author rriggs
date Tue, 04 Dec 2018 15:22:41 -0500
parents f5d0926026ec
children 2077a5437d43
files make/gensrc/GensrcMisc.gmk src/java.base/share/classes/java/lang/VersionProps.java.template
diffstat 2 files changed, 5 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/make/gensrc/GensrcMisc.gmk	Tue Dec 04 11:54:09 2018 -0800
+++ b/make/gensrc/GensrcMisc.gmk	Tue Dec 04 15:22:41 2018 -0500
@@ -42,6 +42,7 @@
         @@VERSION_DATE@@ => $(VERSION_DATE) ; \
         @@VERSION_CLASSFILE_MAJOR@@ => $(VERSION_CLASSFILE_MAJOR) ; \
         @@VERSION_CLASSFILE_MINOR@@ => $(VERSION_CLASSFILE_MINOR) ; \
+        @@VERSION_SPECIFICATION@@ => $(VERSION_SPECIFICATION) ; \
         @@VENDOR_VERSION_STRING@@ => $(VENDOR_VERSION_STRING) ; \
         @@VENDOR@@ => $(COMPANY_NAME) ; \
         @@VENDOR_URL@@ => $(VENDOR_URL) ; \
--- a/src/java.base/share/classes/java/lang/VersionProps.java.template	Tue Dec 04 11:54:09 2018 -0800
+++ b/src/java.base/share/classes/java/lang/VersionProps.java.template	Tue Dec 04 15:22:41 2018 -0500
@@ -51,6 +51,9 @@
     private static final String VERSION_NUMBER =
         "@@VERSION_NUMBER@@";
 
+    private static final String VERSION_SPECIFICATION =
+        "@@VERSION_SPECIFICATION@@";
+
     private static final String VERSION_BUILD =
         "@@VERSION_BUILD@@";
 
@@ -97,7 +100,7 @@
 
         props.setProperty("java.class.version", CLASSFILE_MAJOR_MINOR);
 
-        props.setProperty("java.specification.version", VERSION_NUMBER);
+        props.setProperty("java.specification.version", VERSION_SPECIFICATION);
         props.setProperty("java.specification.name", "Java Platform API Specification");
         props.setProperty("java.specification.vendor", "Oracle Corporation");