--- old/make/MacBundles.gmk 2017-12-05 11:37:54.290087916 -0800 +++ new/make/MacBundles.gmk 2017-12-05 11:37:54.038098024 -0800 @@ -41,7 +41,7 @@ BUNDLE_ID := $(MACOSX_BUNDLE_ID_BASE).$(VERSION_SHORT) BUNDLE_NAME := $(MACOSX_BUNDLE_NAME_BASE) $(VERSION_SHORT) BUNDLE_INFO := $(MACOSX_BUNDLE_NAME_BASE) $(VERSION_STRING) - BUNDLE_PLATFORM_VERSION := $(VERSION_MAJOR).$(VERSION_MINOR) + BUNDLE_PLATFORM_VERSION := $(VERSION_FEATURE).$(VERSION_INTERIM) BUNDLE_VERSION := $(VERSION_NUMBER) ifeq ($(COMPANY_NAME), N/A) BUNDLE_VENDOR := UNDEFINED --- old/make/ReleaseFile.gmk 2017-12-05 11:37:55.422042509 -0800 +++ new/make/ReleaseFile.gmk 2017-12-05 11:37:55.190051815 -0800 @@ -48,6 +48,9 @@ $(call info-file-item, "SUN_ARCH_ABI", "$(JDK_ARCH_ABI_PROP_NAME)")) $(call info-file-item, "SOURCE", "$(strip $(SOURCE_REVISION))") $(call info-file-item, "IMPLEMENTOR", "$(COMPANY_NAME)") + $(if $(VENDOR_VERSION_STRING), \ + $(call info-file-item, "IMPLEMENTOR_VERSION", "$(VENDOR_VERSION_STRING)")) + $(call info-file-item, "JAVA_VERSION_DATE", "$(VERSION_DATE)") $(call info-file-item, "OS_NAME", "$(RELEASE_FILE_OS_NAME)") $(call info-file-item, "OS_ARCH", "$(RELEASE_FILE_OS_ARCH)") endef --- old/make/autoconf/flags.m4 2017-12-05 11:37:56.621994376 -0800 +++ new/make/autoconf/flags.m4 2017-12-05 11:37:56.394003522 -0800 @@ -313,7 +313,7 @@ -D\"JDK_COMPONENT=\$(PRODUCT_NAME) \$(JDK_RC_PLATFORM_NAME) binary\" \ -D\"JDK_VER=\$(VERSION_NUMBER)\" \ -D\"JDK_COPYRIGHT=Copyright \xA9 $COPYRIGHT_YEAR\" \ - -D\"JDK_NAME=\$(PRODUCT_NAME) \$(JDK_RC_PLATFORM_NAME) \$(VERSION_MAJOR)\" \ + -D\"JDK_NAME=\$(PRODUCT_NAME) \$(JDK_RC_PLATFORM_NAME) \$(VERSION_FEATURE)\" \ -D\"JDK_FVER=\$(subst .,\$(COMMA),\$(VERSION_NUMBER_FOUR_POSITIONS))\"" JVM_RCFLAGS="$JVM_RCFLAGS \ --- old/make/autoconf/generated-configure.sh 2017-12-05 11:37:57.749949131 -0800 +++ new/make/autoconf/generated-configure.sh 2017-12-05 11:37:57.509958757 -0800 @@ -887,6 +887,8 @@ BOOT_JDK JAVA_CHECK JAVAC_CHECK +VENDOR_VERSION_STRING +VERSION_DATE VERSION_IS_GA VERSION_SHORT VERSION_STRING @@ -896,9 +898,9 @@ VERSION_BUILD VERSION_PRE VERSION_PATCH -VERSION_SECURITY -VERSION_MINOR -VERSION_MAJOR +VERSION_UPDATE +VERSION_INTERIM +VERSION_FEATURE MACOSX_BUNDLE_ID_BASE MACOSX_BUNDLE_NAME_BASE HOTSPOT_VM_DISTRO @@ -1093,6 +1095,7 @@ docdir oldincludedir includedir +runstatedir localstatedir sharedstatedir sysconfdir @@ -1143,14 +1146,19 @@ with_update_version with_user_release_suffix with_build_number +with_version_major +with_version_minor +with_version_security with_version_string with_version_pre with_version_opt with_version_build -with_version_major -with_version_minor -with_version_security +with_version_feature +with_version_interim +with_version_update with_version_patch +with_version_date +with_vendor_version_string with_boot_jdk with_build_jdk with_import_modules @@ -1377,6 +1385,7 @@ sysconfdir='${prefix}/etc' sharedstatedir='${prefix}/com' localstatedir='${prefix}/var' +runstatedir='${localstatedir}/run' includedir='${prefix}/include' oldincludedir='/usr/include' docdir='${datarootdir}/doc/${PACKAGE_TARNAME}' @@ -1629,6 +1638,15 @@ | -silent | --silent | --silen | --sile | --sil) silent=yes ;; + -runstatedir | --runstatedir | --runstatedi | --runstated \ + | --runstate | --runstat | --runsta | --runst | --runs \ + | --run | --ru | --r) + ac_prev=runstatedir ;; + -runstatedir=* | --runstatedir=* | --runstatedi=* | --runstated=* \ + | --runstate=* | --runstat=* | --runsta=* | --runst=* | --runs=* \ + | --run=* | --ru=* | --r=*) + runstatedir=$ac_optarg ;; + -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb) ac_prev=sbindir ;; -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \ @@ -1766,7 +1784,7 @@ for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \ datadir sysconfdir sharedstatedir localstatedir includedir \ oldincludedir docdir infodir htmldir dvidir pdfdir psdir \ - libdir localedir mandir + libdir localedir mandir runstatedir do eval ac_val=\$$ac_var # Remove trailing slashes. @@ -1919,6 +1937,7 @@ --sysconfdir=DIR read-only single-machine data [PREFIX/etc] --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com] --localstatedir=DIR modifiable single-machine data [PREFIX/var] + --runstatedir=DIR modifiable per-process data [LOCALSTATEDIR/run] --libdir=DIR object code libraries [EPREFIX/lib] --includedir=DIR C header files [PREFIX/include] --oldincludedir=DIR C header files for non-gcc [/usr/include] @@ -2060,6 +2079,12 @@ compatibility and is ignored --with-build-number Deprecated. Option is kept for backwards compatibility and is ignored + --with-version-major Deprecated. Option is kept for backwards + compatibility and is ignored + --with-version-minor Deprecated. Option is kept for backwards + compatibility and is ignored + --with-version-security Deprecated. Option is kept for backwards + compatibility and is ignored --with-version-string Set version string [calculated] --with-version-pre Set the base part of the version 'PRE' field (pre-release identifier) ['internal'] @@ -2067,14 +2092,17 @@ [..] --with-version-build Set version 'BUILD' field (build number) [not specified] - --with-version-major Set version 'MAJOR' field (first number) [current + --with-version-feature Set version 'FEATURE' field (first number) [current source value] - --with-version-minor Set version 'MINOR' field (second number) [current + --with-version-interim Set version 'INTERIM' field (second number) [current source value] - --with-version-security Set version 'SECURITY' field (third number) [current + --with-version-update Set version 'UPDATE' field (third number) [current source value] --with-version-patch Set version 'PATCH' field (fourth number) [not specified] + --with-version-date Set version date [current source value] + --with-vendor-version-string + Set vendor version string [not specified] --with-boot-jdk path to Boot JDK (used to bootstrap build) [probed] --with-build-jdk path to JDK of same version as is being built[the newly built JDK] @@ -5159,7 +5187,7 @@ #CUSTOM_AUTOCONF_INCLUDE # Do not change or remove the following line, it is needed for consistency checks: -DATE_WHEN_GENERATED=1512410983 +DATE_WHEN_GENERATED=1512489240 ############################################################################### # @@ -25004,6 +25032,33 @@ + +# Check whether --with-version-major was given. +if test "${with_version_major+set}" = set; then : + withval=$with_version_major; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-version-major is deprecated and will be ignored." >&5 +$as_echo "$as_me: WARNING: Option --with-version-major is deprecated and will be ignored." >&2;} +fi + + + + +# Check whether --with-version-minor was given. +if test "${with_version_minor+set}" = set; then : + withval=$with_version_minor; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-version-minor is deprecated and will be ignored." >&5 +$as_echo "$as_me: WARNING: Option --with-version-minor is deprecated and will be ignored." >&2;} +fi + + + + +# Check whether --with-version-security was given. +if test "${with_version_security+set}" = set; then : + withval=$with_version_security; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-version-security is deprecated and will be ignored." >&5 +$as_echo "$as_me: WARNING: Option --with-version-security is deprecated and will be ignored." >&2;} +fi + + + # Source the version numbers file . $AUTOCONF_DIR/version-numbers @@ -25032,20 +25087,20 @@ elif test "x$with_version_string" != x; then # Additional [] needed to keep m4 from mangling shell constructs. if [[ $with_version_string =~ ^([0-9]+)(\.([0-9]+))?(\.([0-9]+))?(\.([0-9]+))?(-([a-zA-Z]+))?((\+)([0-9]+)?(-([-a-zA-Z0-9.]+))?)?$ ]] ; then - VERSION_MAJOR=${BASH_REMATCH[1]} - VERSION_MINOR=${BASH_REMATCH[3]} - VERSION_SECURITY=${BASH_REMATCH[5]} + VERSION_FEATURE=${BASH_REMATCH[1]} + VERSION_INTERIM=${BASH_REMATCH[3]} + VERSION_UPDATE=${BASH_REMATCH[5]} VERSION_PATCH=${BASH_REMATCH[7]} VERSION_PRE=${BASH_REMATCH[9]} version_plus_separator=${BASH_REMATCH[11]} VERSION_BUILD=${BASH_REMATCH[12]} VERSION_OPT=${BASH_REMATCH[14]} # Unspecified numerical fields are interpreted as 0. - if test "x$VERSION_MINOR" = x; then - VERSION_MINOR=0 + if test "x$VERSION_INTERIM" = x; then + VERSION_INTERIM=0 fi - if test "x$VERSION_SECURITY" = x; then - VERSION_SECURITY=0 + if test "x$VERSION_UPDATE" = x; then + VERSION_UPDATE=0 fi if test "x$VERSION_PATCH" = x; then VERSION_PATCH=0 @@ -25174,22 +25229,22 @@ fi -# Check whether --with-version-major was given. -if test "${with_version_major+set}" = set; then : - withval=$with_version_major; with_version_major_present=true +# Check whether --with-version-feature was given. +if test "${with_version_feature+set}" = set; then : + withval=$with_version_feature; with_version_feature_present=true else - with_version_major_present=false + with_version_feature_present=false fi - if test "x$with_version_major_present" = xtrue; then - if test "x$with_version_major" = xyes; then - as_fn_error $? "--with-version-major must have a value" "$LINENO" 5 + if test "x$with_version_feature_present" = xtrue; then + if test "x$with_version_feature" = xyes; then + as_fn_error $? "--with-version-feature must have a value" "$LINENO" 5 else # Additional [] needed to keep m4 from mangling shell constructs. - if ! [[ "$with_version_major" =~ ^0*([1-9][0-9]*)|(0)$ ]] ; then - as_fn_error $? "\"$with_version_major\" is not a valid numerical value for VERSION_MAJOR" "$LINENO" 5 + if ! [[ "$with_version_feature" =~ ^0*([1-9][0-9]*)|(0)$ ]] ; then + as_fn_error $? "\"$with_version_feature\" is not a valid numerical value for VERSION_FEATURE" "$LINENO" 5 fi # Extract the version number without leading zeros. cleaned_value=${BASH_REMATCH[1]} @@ -25199,44 +25254,44 @@ fi if test $cleaned_value -gt 255; then - as_fn_error $? "VERSION_MAJOR is given as $with_version_major. This is greater than 255 which is not allowed." "$LINENO" 5 + as_fn_error $? "VERSION_FEATURE is given as $with_version_feature. This is greater than 255 which is not allowed." "$LINENO" 5 fi - if test "x$cleaned_value" != "x$with_version_major"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Value for VERSION_MAJOR has been sanitized from '$with_version_major' to '$cleaned_value'" >&5 -$as_echo "$as_me: WARNING: Value for VERSION_MAJOR has been sanitized from '$with_version_major' to '$cleaned_value'" >&2;} + if test "x$cleaned_value" != "x$with_version_feature"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Value for VERSION_FEATURE has been sanitized from '$with_version_feature' to '$cleaned_value'" >&5 +$as_echo "$as_me: WARNING: Value for VERSION_FEATURE has been sanitized from '$with_version_feature' to '$cleaned_value'" >&2;} fi - VERSION_MAJOR=$cleaned_value + VERSION_FEATURE=$cleaned_value fi else if test "x$NO_DEFAULT_VERSION_PARTS" != xtrue; then # Default is to get value from version-numbers - VERSION_MAJOR="$DEFAULT_VERSION_MAJOR" + VERSION_FEATURE="$DEFAULT_VERSION_FEATURE" fi fi -# Check whether --with-version-minor was given. -if test "${with_version_minor+set}" = set; then : - withval=$with_version_minor; with_version_minor_present=true +# Check whether --with-version-interim was given. +if test "${with_version_interim+set}" = set; then : + withval=$with_version_interim; with_version_interim_present=true else - with_version_minor_present=false + with_version_interim_present=false fi - if test "x$with_version_minor_present" = xtrue; then - if test "x$with_version_minor" = xyes; then - as_fn_error $? "--with-version-minor must have a value" "$LINENO" 5 - elif test "x$with_version_minor" = xno; then + if test "x$with_version_interim_present" = xtrue; then + if test "x$with_version_interim" = xyes; then + as_fn_error $? "--with-version-interim must have a value" "$LINENO" 5 + elif test "x$with_version_interim" = xno; then # Interpret --without-* as empty string (i.e. 0) instead of the literal "no" - VERSION_MINOR=0 - elif test "x$with_version_minor" = x; then - VERSION_MINOR=0 + VERSION_INTERIM=0 + elif test "x$with_version_interim" = x; then + VERSION_INTERIM=0 else # Additional [] needed to keep m4 from mangling shell constructs. - if ! [[ "$with_version_minor" =~ ^0*([1-9][0-9]*)|(0)$ ]] ; then - as_fn_error $? "\"$with_version_minor\" is not a valid numerical value for VERSION_MINOR" "$LINENO" 5 + if ! [[ "$with_version_interim" =~ ^0*([1-9][0-9]*)|(0)$ ]] ; then + as_fn_error $? "\"$with_version_interim\" is not a valid numerical value for VERSION_INTERIM" "$LINENO" 5 fi # Extract the version number without leading zeros. cleaned_value=${BASH_REMATCH[1]} @@ -25246,44 +25301,44 @@ fi if test $cleaned_value -gt 255; then - as_fn_error $? "VERSION_MINOR is given as $with_version_minor. This is greater than 255 which is not allowed." "$LINENO" 5 + as_fn_error $? "VERSION_INTERIM is given as $with_version_interim. This is greater than 255 which is not allowed." "$LINENO" 5 fi - if test "x$cleaned_value" != "x$with_version_minor"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Value for VERSION_MINOR has been sanitized from '$with_version_minor' to '$cleaned_value'" >&5 -$as_echo "$as_me: WARNING: Value for VERSION_MINOR has been sanitized from '$with_version_minor' to '$cleaned_value'" >&2;} + if test "x$cleaned_value" != "x$with_version_interim"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Value for VERSION_INTERIM has been sanitized from '$with_version_interim' to '$cleaned_value'" >&5 +$as_echo "$as_me: WARNING: Value for VERSION_INTERIM has been sanitized from '$with_version_interim' to '$cleaned_value'" >&2;} fi - VERSION_MINOR=$cleaned_value + VERSION_INTERIM=$cleaned_value fi else if test "x$NO_DEFAULT_VERSION_PARTS" != xtrue; then # Default is 0, if unspecified - VERSION_MINOR=$DEFAULT_VERSION_MINOR + VERSION_INTERIM=$DEFAULT_VERSION_INTERIM fi fi -# Check whether --with-version-security was given. -if test "${with_version_security+set}" = set; then : - withval=$with_version_security; with_version_security_present=true +# Check whether --with-version-update was given. +if test "${with_version_update+set}" = set; then : + withval=$with_version_update; with_version_update_present=true else - with_version_security_present=false + with_version_update_present=false fi - if test "x$with_version_security_present" = xtrue; then - if test "x$with_version_security" = xyes; then - as_fn_error $? "--with-version-security must have a value" "$LINENO" 5 - elif test "x$with_version_security" = xno; then + if test "x$with_version_update_present" = xtrue; then + if test "x$with_version_update" = xyes; then + as_fn_error $? "--with-version-update must have a value" "$LINENO" 5 + elif test "x$with_version_update" = xno; then # Interpret --without-* as empty string (i.e. 0) instead of the literal "no" - VERSION_SECURITY=0 - elif test "x$with_version_security" = x; then - VERSION_SECURITY=0 + VERSION_UPDATE=0 + elif test "x$with_version_update" = x; then + VERSION_UPDATE=0 else # Additional [] needed to keep m4 from mangling shell constructs. - if ! [[ "$with_version_security" =~ ^0*([1-9][0-9]*)|(0)$ ]] ; then - as_fn_error $? "\"$with_version_security\" is not a valid numerical value for VERSION_SECURITY" "$LINENO" 5 + if ! [[ "$with_version_update" =~ ^0*([1-9][0-9]*)|(0)$ ]] ; then + as_fn_error $? "\"$with_version_update\" is not a valid numerical value for VERSION_UPDATE" "$LINENO" 5 fi # Extract the version number without leading zeros. cleaned_value=${BASH_REMATCH[1]} @@ -25293,19 +25348,19 @@ fi if test $cleaned_value -gt 255; then - as_fn_error $? "VERSION_SECURITY is given as $with_version_security. This is greater than 255 which is not allowed." "$LINENO" 5 + as_fn_error $? "VERSION_UPDATE is given as $with_version_update. This is greater than 255 which is not allowed." "$LINENO" 5 fi - if test "x$cleaned_value" != "x$with_version_security"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Value for VERSION_SECURITY has been sanitized from '$with_version_security' to '$cleaned_value'" >&5 -$as_echo "$as_me: WARNING: Value for VERSION_SECURITY has been sanitized from '$with_version_security' to '$cleaned_value'" >&2;} + if test "x$cleaned_value" != "x$with_version_update"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Value for VERSION_UPDATE has been sanitized from '$with_version_update' to '$cleaned_value'" >&5 +$as_echo "$as_me: WARNING: Value for VERSION_UPDATE has been sanitized from '$with_version_update' to '$cleaned_value'" >&2;} fi - VERSION_SECURITY=$cleaned_value + VERSION_UPDATE=$cleaned_value fi else if test "x$NO_DEFAULT_VERSION_PARTS" != xtrue; then # Default is 0, if unspecified - VERSION_SECURITY=$DEFAULT_VERSION_SECURITY + VERSION_UPDATE=$DEFAULT_VERSION_UPDATE fi fi @@ -25366,7 +25421,7 @@ fi # VERSION_NUMBER but always with exactly 4 positions, with 0 for empty positions. - VERSION_NUMBER_FOUR_POSITIONS=$VERSION_MAJOR.$VERSION_MINOR.$VERSION_SECURITY.$VERSION_PATCH + VERSION_NUMBER_FOUR_POSITIONS=$VERSION_FEATURE.$VERSION_INTERIM.$VERSION_UPDATE.$VERSION_PATCH stripped_version_number=$VERSION_NUMBER_FOUR_POSITIONS # Strip trailing zeroes from stripped_version_number @@ -25384,6 +25439,40 @@ # The short version string, just VERSION_NUMBER and PRE, if present. VERSION_SHORT=$VERSION_NUMBER${VERSION_PRE:+-$VERSION_PRE} + # The version date + +# Check whether --with-version-date was given. +if test "${with_version_date+set}" = set; then : + withval=$with_version_date; +fi + + if test "x$with_version_date" = xyes; then + as_fn_error $? "--with-version-date must have a value" "$LINENO" 5 + elif test "x$with_version_date" != x; then + if ! [[ $with_version_date =~ ^[0-9]{4}-[0-9]{2}-[0-9]{2}$ ]] ; then + as_fn_error $? "\"$with_version_date\" is not a valid version date" "$LINENO" 5 + else + VERSION_DATE="$with_version_date" + fi + else + VERSION_DATE="$DEFAULT_VERSION_DATE" + fi + + # The vendor version string, if any + +# Check whether --with-vendor-version-string was given. +if test "${with_vendor_version_string+set}" = set; then : + withval=$with_vendor_version_string; +fi + + if test "x$with_vendor_version_string" = xyes; then + as_fn_error $? "--with-vendor-version-string must have a value" "$LINENO" 5 + elif ! [[ $with_vendor_version_string =~ ^[[:graph:]]*$ ]] ; then + as_fn_error $? "--with--vendor-version-string contains non-graphical characters: $with_vendor_version_string" "$LINENO" 5 + else + VENDOR_VERSION_STRING="$with_vendor_version_string" + fi + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for version string" >&5 $as_echo_n "checking for version string... " >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: result: $VERSION_STRING" >&5 @@ -25403,6 +25492,8 @@ + + ############################################################################### # # Setup BootJDK, used to bootstrap the build. @@ -50669,7 +50760,7 @@ -D\"JDK_COMPONENT=\$(PRODUCT_NAME) \$(JDK_RC_PLATFORM_NAME) binary\" \ -D\"JDK_VER=\$(VERSION_NUMBER)\" \ -D\"JDK_COPYRIGHT=Copyright \xA9 $COPYRIGHT_YEAR\" \ - -D\"JDK_NAME=\$(PRODUCT_NAME) \$(JDK_RC_PLATFORM_NAME) \$(VERSION_MAJOR)\" \ + -D\"JDK_NAME=\$(PRODUCT_NAME) \$(JDK_RC_PLATFORM_NAME) \$(VERSION_FEATURE)\" \ -D\"JDK_FVER=\$(subst .,\$(COMMA),\$(VERSION_NUMBER_FOUR_POSITIONS))\"" JVM_RCFLAGS="$JVM_RCFLAGS \ --- old/make/autoconf/jdk-version.m4 2017-12-05 11:37:59.509878535 -0800 +++ new/make/autoconf/jdk-version.m4 2017-12-05 11:37:59.281887680 -0800 @@ -62,6 +62,9 @@ BASIC_DEPRECATED_ARG_WITH([update-version]) BASIC_DEPRECATED_ARG_WITH([user-release-suffix]) BASIC_DEPRECATED_ARG_WITH([build-number]) + BASIC_DEPRECATED_ARG_WITH([version-major]) + BASIC_DEPRECATED_ARG_WITH([version-minor]) + BASIC_DEPRECATED_ARG_WITH([version-security]) # Source the version numbers file . $AUTOCONF_DIR/version-numbers @@ -87,20 +90,20 @@ elif test "x$with_version_string" != x; then # Additional [] needed to keep m4 from mangling shell constructs. if [ [[ $with_version_string =~ ^([0-9]+)(\.([0-9]+))?(\.([0-9]+))?(\.([0-9]+))?(-([a-zA-Z]+))?((\+)([0-9]+)?(-([-a-zA-Z0-9.]+))?)?$ ]] ]; then - VERSION_MAJOR=${BASH_REMATCH[[1]]} - VERSION_MINOR=${BASH_REMATCH[[3]]} - VERSION_SECURITY=${BASH_REMATCH[[5]]} + VERSION_FEATURE=${BASH_REMATCH[[1]]} + VERSION_INTERIM=${BASH_REMATCH[[3]]} + VERSION_UPDATE=${BASH_REMATCH[[5]]} VERSION_PATCH=${BASH_REMATCH[[7]]} VERSION_PRE=${BASH_REMATCH[[9]]} version_plus_separator=${BASH_REMATCH[[11]]} VERSION_BUILD=${BASH_REMATCH[[12]]} VERSION_OPT=${BASH_REMATCH[[14]]} # Unspecified numerical fields are interpreted as 0. - if test "x$VERSION_MINOR" = x; then - VERSION_MINOR=0 + if test "x$VERSION_INTERIM" = x; then + VERSION_INTERIM=0 fi - if test "x$VERSION_SECURITY" = x; then - VERSION_SECURITY=0 + if test "x$VERSION_UPDATE" = x; then + VERSION_UPDATE=0 fi if test "x$VERSION_PATCH" = x; then VERSION_PATCH=0 @@ -191,64 +194,64 @@ fi fi - AC_ARG_WITH(version-major, [AS_HELP_STRING([--with-version-major], - [Set version 'MAJOR' field (first number) @<:@current source value@:>@])], - [with_version_major_present=true], [with_version_major_present=false]) - - if test "x$with_version_major_present" = xtrue; then - if test "x$with_version_major" = xyes; then - AC_MSG_ERROR([--with-version-major must have a value]) + AC_ARG_WITH(version-feature, [AS_HELP_STRING([--with-version-feature], + [Set version 'FEATURE' field (first number) @<:@current source value@:>@])], + [with_version_feature_present=true], [with_version_feature_present=false]) + + if test "x$with_version_feature_present" = xtrue; then + if test "x$with_version_feature" = xyes; then + AC_MSG_ERROR([--with-version-feature must have a value]) else - JDKVER_CHECK_AND_SET_NUMBER(VERSION_MAJOR, $with_version_major) + JDKVER_CHECK_AND_SET_NUMBER(VERSION_FEATURE, $with_version_feature) fi else if test "x$NO_DEFAULT_VERSION_PARTS" != xtrue; then # Default is to get value from version-numbers - VERSION_MAJOR="$DEFAULT_VERSION_MAJOR" + VERSION_FEATURE="$DEFAULT_VERSION_FEATURE" fi fi - AC_ARG_WITH(version-minor, [AS_HELP_STRING([--with-version-minor], - [Set version 'MINOR' field (second number) @<:@current source value@:>@])], - [with_version_minor_present=true], [with_version_minor_present=false]) - - if test "x$with_version_minor_present" = xtrue; then - if test "x$with_version_minor" = xyes; then - AC_MSG_ERROR([--with-version-minor must have a value]) - elif test "x$with_version_minor" = xno; then + AC_ARG_WITH(version-interim, [AS_HELP_STRING([--with-version-interim], + [Set version 'INTERIM' field (second number) @<:@current source value@:>@])], + [with_version_interim_present=true], [with_version_interim_present=false]) + + if test "x$with_version_interim_present" = xtrue; then + if test "x$with_version_interim" = xyes; then + AC_MSG_ERROR([--with-version-interim must have a value]) + elif test "x$with_version_interim" = xno; then # Interpret --without-* as empty string (i.e. 0) instead of the literal "no" - VERSION_MINOR=0 - elif test "x$with_version_minor" = x; then - VERSION_MINOR=0 + VERSION_INTERIM=0 + elif test "x$with_version_interim" = x; then + VERSION_INTERIM=0 else - JDKVER_CHECK_AND_SET_NUMBER(VERSION_MINOR, $with_version_minor) + JDKVER_CHECK_AND_SET_NUMBER(VERSION_INTERIM, $with_version_interim) fi else if test "x$NO_DEFAULT_VERSION_PARTS" != xtrue; then # Default is 0, if unspecified - VERSION_MINOR=$DEFAULT_VERSION_MINOR + VERSION_INTERIM=$DEFAULT_VERSION_INTERIM fi fi - AC_ARG_WITH(version-security, [AS_HELP_STRING([--with-version-security], - [Set version 'SECURITY' field (third number) @<:@current source value@:>@])], - [with_version_security_present=true], [with_version_security_present=false]) - - if test "x$with_version_security_present" = xtrue; then - if test "x$with_version_security" = xyes; then - AC_MSG_ERROR([--with-version-security must have a value]) - elif test "x$with_version_security" = xno; then + AC_ARG_WITH(version-update, [AS_HELP_STRING([--with-version-update], + [Set version 'UPDATE' field (third number) @<:@current source value@:>@])], + [with_version_update_present=true], [with_version_update_present=false]) + + if test "x$with_version_update_present" = xtrue; then + if test "x$with_version_update" = xyes; then + AC_MSG_ERROR([--with-version-update must have a value]) + elif test "x$with_version_update" = xno; then # Interpret --without-* as empty string (i.e. 0) instead of the literal "no" - VERSION_SECURITY=0 - elif test "x$with_version_security" = x; then - VERSION_SECURITY=0 + VERSION_UPDATE=0 + elif test "x$with_version_update" = x; then + VERSION_UPDATE=0 else - JDKVER_CHECK_AND_SET_NUMBER(VERSION_SECURITY, $with_version_security) + JDKVER_CHECK_AND_SET_NUMBER(VERSION_UPDATE, $with_version_update) fi else if test "x$NO_DEFAULT_VERSION_PARTS" != xtrue; then # Default is 0, if unspecified - VERSION_SECURITY=$DEFAULT_VERSION_SECURITY + VERSION_UPDATE=$DEFAULT_VERSION_UPDATE fi fi @@ -284,7 +287,7 @@ fi # VERSION_NUMBER but always with exactly 4 positions, with 0 for empty positions. - VERSION_NUMBER_FOUR_POSITIONS=$VERSION_MAJOR.$VERSION_MINOR.$VERSION_SECURITY.$VERSION_PATCH + VERSION_NUMBER_FOUR_POSITIONS=$VERSION_FEATURE.$VERSION_INTERIM.$VERSION_UPDATE.$VERSION_PATCH stripped_version_number=$VERSION_NUMBER_FOUR_POSITIONS # Strip trailing zeroes from stripped_version_number @@ -302,12 +305,38 @@ # The short version string, just VERSION_NUMBER and PRE, if present. VERSION_SHORT=$VERSION_NUMBER${VERSION_PRE:+-$VERSION_PRE} + # The version date + AC_ARG_WITH(version-date, [AS_HELP_STRING([--with-version-date], + [Set version date @<:@current source value@:>@])]) + if test "x$with_version_date" = xyes; then + AC_MSG_ERROR([--with-version-date must have a value]) + elif test "x$with_version_date" != x; then + if [ ! [[ $with_version_date =~ ^[0-9]{4}-[0-9]{2}-[0-9]{2}$ ]] ]; then + AC_MSG_ERROR(["$with_version_date" is not a valid version date]) + else + VERSION_DATE="$with_version_date" + fi + else + VERSION_DATE="$DEFAULT_VERSION_DATE" + fi + + # The vendor version string, if any + AC_ARG_WITH(vendor-version-string, [AS_HELP_STRING([--with-vendor-version-string], + [Set vendor version string @<:@not specified@:>@])]) + if test "x$with_vendor_version_string" = xyes; then + AC_MSG_ERROR([--with-vendor-version-string must have a value]) + elif [ ! [[ $with_vendor_version_string =~ ^[[:graph:]]*$ ]] ]; then + AC_MSG_ERROR([--with--vendor-version-string contains non-graphical characters: $with_vendor_version_string]) + else + VENDOR_VERSION_STRING="$with_vendor_version_string" + fi + AC_MSG_CHECKING([for version string]) AC_MSG_RESULT([$VERSION_STRING]) - AC_SUBST(VERSION_MAJOR) - AC_SUBST(VERSION_MINOR) - AC_SUBST(VERSION_SECURITY) + AC_SUBST(VERSION_FEATURE) + AC_SUBST(VERSION_INTERIM) + AC_SUBST(VERSION_UPDATE) AC_SUBST(VERSION_PATCH) AC_SUBST(VERSION_PRE) AC_SUBST(VERSION_BUILD) @@ -317,4 +346,6 @@ AC_SUBST(VERSION_STRING) AC_SUBST(VERSION_SHORT) AC_SUBST(VERSION_IS_GA) + AC_SUBST(VERSION_DATE) + AC_SUBST(VENDOR_VERSION_STRING) ]) --- old/make/autoconf/spec.gmk.in 2017-12-05 11:38:00.573835857 -0800 +++ new/make/autoconf/spec.gmk.in 2017-12-05 11:38:00.341845162 -0800 @@ -144,10 +144,9 @@ ## Building blocks of the version string # First three version numbers, with well-specified meanings (numerical) -VERSION_MAJOR := @VERSION_MAJOR@ -VERSION_MINOR := @VERSION_MINOR@ -VERSION_SECURITY := @VERSION_SECURITY@ -# Optional fourth element for use by OpenJDK consumers (numerical) +VERSION_FEATURE := @VERSION_FEATURE@ +VERSION_INTERIM := @VERSION_INTERIM@ +VERSION_UPDATE := @VERSION_UPDATE@ VERSION_PATCH := @VERSION_PATCH@ # The pre-release identifier (string) VERSION_PRE := @VERSION_PRE@ @@ -165,17 +164,23 @@ VERSION_STRING := @VERSION_STRING@ # The short version string, without trailing zeroes and just PRE, if present. VERSION_SHORT := @VERSION_SHORT@ -# The Java specification version. It usually equals the major version number. -VERSION_SPECIFICATION := @VERSION_MAJOR@ +# The Java specification version. It usually equals the feature version number. +VERSION_SPECIFICATION := @VERSION_FEATURE@ # A GA version is defined by the PRE string being empty. Rather than testing for # that, this variable defines it with true/false. VERSION_IS_GA := @VERSION_IS_GA@ +# Version date +VERSION_DATE := @VERSION_DATE@ + +# Vendor version string +VENDOR_VERSION_STRING := @VENDOR_VERSION_STRING@ + # Convenience CFLAGS settings for passing version information into native programs. VERSION_CFLAGS := \ - -DVERSION_MAJOR=$(VERSION_MAJOR) \ - -DVERSION_MINOR=$(VERSION_MINOR) \ - -DVERSION_SECURITY=$(VERSION_SECURITY) \ + -DVERSION_FEATURE=$(VERSION_FEATURE) \ + -DVERSION_INTERIM=$(VERSION_INTERIM) \ + -DVERSION_UPDATE=$(VERSION_UPDATE) \ -DVERSION_PATCH=$(VERSION_PATCH) \ -DVERSION_PRE='"$(VERSION_PRE)"' \ -DVERSION_BUILD=$(VERSION_BUILD) \ @@ -184,6 +189,8 @@ -DVERSION_STRING='"$(VERSION_STRING)"' \ -DVERSION_SHORT='"$(VERSION_SHORT)"' \ -DVERSION_SPECIFICATION='"$(VERSION_SPECIFICATION)"' \ + -DVERSION_DATE='"$(VERSION_DATE)"' \ + -DVENDOR_VERSION_STRING='"$(VENDOR_VERSION_STRING)"' \ # # Platform naming variables --- old/make/autoconf/version-numbers 2017-12-05 11:38:01.673791734 -0800 +++ new/make/autoconf/version-numbers 2017-12-05 11:38:01.445800880 -0800 @@ -25,10 +25,11 @@ # Default version numbers to use unless overridden by configure -DEFAULT_VERSION_MAJOR=10 -DEFAULT_VERSION_MINOR=0 -DEFAULT_VERSION_SECURITY=0 +DEFAULT_VERSION_FEATURE=10 +DEFAULT_VERSION_INTERIM=0 +DEFAULT_VERSION_UPDATE=0 DEFAULT_VERSION_PATCH=0 +DEFAULT_VERSION_DATE=2018-03-20 LAUNCHER_NAME=openjdk PRODUCT_NAME=OpenJDK --- old/make/conf/jib-profiles.js 2017-12-05 11:38:02.737749056 -0800 +++ new/make/conf/jib-profiles.js 2017-12-05 11:38:02.505758362 -0800 @@ -1036,17 +1036,17 @@ * Constructs the numeric version string from reading the * make/autoconf/version-numbers file and removing all trailing ".0". * - * @param major Override major version - * @param minor Override minor version - * @param security Override security version + * @param feature Override feature version + * @param interim Override interim version + * @param update Override update version * @param patch Override patch version * @returns {String} The numeric version string */ -var getVersion = function (major, minor, security, patch) { +var getVersion = function (feature, interim, update, patch) { var version_numbers = getVersionNumbers(); - var version = (major != null ? major : version_numbers.get("DEFAULT_VERSION_MAJOR")) - + "." + (minor != null ? minor : version_numbers.get("DEFAULT_VERSION_MINOR")) - + "." + (security != null ? security : version_numbers.get("DEFAULT_VERSION_SECURITY")) + var version = (feature != null ? feature : version_numbers.get("DEFAULT_VERSION_FEATURE")) + + "." + (interim != null ? interim : version_numbers.get("DEFAULT_VERSION_INTERIM")) + + "." + (update != null ? update : version_numbers.get("DEFAULT_VERSION_UPDATE")) + "." + (patch != null ? patch : version_numbers.get("DEFAULT_VERSION_PATCH")); while (version.match(".*\\.0$")) { version = version.substring(0, version.length - 2); --- old/make/gensrc/GensrcMisc.gmk 2017-12-05 11:38:03.833705094 -0800 +++ new/make/gensrc/GensrcMisc.gmk 2017-12-05 11:38:03.589714881 -0800 @@ -38,7 +38,9 @@ @@VERSION_NUMBER@@ => $(VERSION_NUMBER) ; \ @@VERSION_PRE@@ => $(VERSION_PRE) ; \ @@VERSION_BUILD@@ => $(VERSION_BUILD) ; \ - @@VERSION_OPT@@ => $(VERSION_OPT), \ + @@VERSION_OPT@@ => $(VERSION_OPT) ; \ + @@VERSION_DATE@@ => $(VERSION_DATE) ; \ + @@VENDOR_VERSION_STRING@@ => $(VENDOR_VERSION_STRING), \ )) GENSRC_JAVA_BASE += $(BUILD_VERSION_JAVA) --- old/src/hotspot/share/runtime/vm_version.cpp 2017-12-05 11:38:04.969659527 -0800 +++ new/src/hotspot/share/runtime/vm_version.cpp 2017-12-05 11:38:04.737668833 -0800 @@ -48,14 +48,14 @@ #error HOTSPOT_VERSION_STRING must be defined #endif -#ifndef VERSION_MAJOR - #error VERSION_MAJOR must be defined +#ifndef VERSION_FEATURE + #error VERSION_FEATURE must be defined #endif -#ifndef VERSION_MINOR - #error VERSION_MINOR must be defined +#ifndef VERSION_INTERIM + #error VERSION_INTERIM must be defined #endif -#ifndef VERSION_SECURITY - #error VERSION_SECURITY must be defined +#ifndef VERSION_UPDATE + #error VERSION_UPDATE must be defined #endif #ifndef VERSION_PATCH #error VERSION_PATCH must be defined @@ -76,9 +76,9 @@ // HOTSPOT_VERSION_STRING equals the JDK VERSION_STRING (unless overridden // in a standalone build). -int Abstract_VM_Version::_vm_major_version = VERSION_MAJOR; -int Abstract_VM_Version::_vm_minor_version = VERSION_MINOR; -int Abstract_VM_Version::_vm_security_version = VERSION_SECURITY; +int Abstract_VM_Version::_vm_major_version = VERSION_FEATURE; +int Abstract_VM_Version::_vm_minor_version = VERSION_INTERIM; +int Abstract_VM_Version::_vm_security_version = VERSION_UPDATE; int Abstract_VM_Version::_vm_patch_version = VERSION_PATCH; int Abstract_VM_Version::_vm_build_number = VERSION_BUILD; unsigned int Abstract_VM_Version::_parallel_worker_threads = 0; --- old/src/java.base/share/classes/java/lang/Runtime.java 2017-12-05 11:38:06.189610592 -0800 +++ new/src/java.base/share/classes/java/lang/Runtime.java 2017-12-05 11:38:05.945620379 -0800 @@ -955,81 +955,68 @@ * *

Version numbers

* - *

A version number, {@code $VNUM}, is a non-empty sequence - * of elements separated by period characters (U+002E). An element is - * either zero, or an unsigned integer numeral without leading zeros. The - * final element in a version number must not be zero. The format is: - *

+ *

A version number, {@code $VNUM}, is a non-empty sequence of + * elements separated by period characters (U+002E). An element is either + * zero, or an unsigned integer numeral without leading zeros. The final + * element in a version number must not be zero. When an element is + * incremented, all subsequent elements are removed. The format is:

* *
-     *     [1-9][0-9]*((\.0)*\.[1-9][0-9]*)*
+     * [1-9][0-9]*((\.0)*\.[1-9][0-9]*)*
      * 
* - *

The sequence may be of arbitrary length but the first three - * elements are assigned specific meanings, as follows:

+ *

The sequence may be of arbitrary length but the first four elements + * are assigned specific meanings, as follows:

* *
-     *     $MAJOR.$MINOR.$SECURITY
+     * $FEATURE.$INTERIM.$UPDATE.$PATCH
      * 
* *
    * - *
  • {@code $MAJOR} --- The major version - * number, incremented for a major release that contains significant new - * features as specified in a new edition of the Java SE Platform - * Specification, e.g., JSR 337 for - * Java SE 8. Features may be removed in a major release, given - * advance notice at least one major release ahead of time, and - * incompatible changes may be made when justified. The {@code $MAJOR} - * version number of JDK 8 is {@code 8}; the {@code $MAJOR} version - * number of JDK 9 is {@code 9}. When {@code $MAJOR} is incremented, - * all subsequent elements are removed.

  • - * - *
  • {@code $MINOR} --- The minor version - * number, incremented for a minor update release that may contain - * compatible bug fixes, revisions to standard APIs mandated by a - * Maintenance Release - * of the relevant Platform Specification, and implementation features - * outside the scope of that Specification such as new JDK-specific APIs, - * additional service providers, new garbage collectors, and ports to new - * hardware architectures.

  • - * - *
  • {@code $SECURITY} --- The security - * level, incremented for a security update release that contains critical - * fixes including those necessary to improve security. {@code $SECURITY} - * is not reset when {@code $MINOR} is incremented. A - * higher value of {@code $SECURITY} for a given {@code $MAJOR} value, - * therefore, always indicates a more secure release, regardless of the - * value of {@code $MINOR}.

  • - * - *
- * - *

The fourth and later elements of a version number are free for use - * by downstream consumers of this code base. Such a consumer may, - * e.g., use the fourth element to identify patch releases which - * contain a small number of critical non-security fixes in addition to - * the security fixes in the corresponding security release.

- * - *

The version number does not include trailing zero elements; - * i.e., {@code $SECURITY} is omitted if it has the value zero, - * and {@code $MINOR} is omitted if both {@code $MINOR} and {@code - * $SECURITY} have the value zero.

+ *
  • {@code $FEATURE} — The + * feature-release counter, incremented for every feature release + * regardless of release content. Features may be added in a feature + * release; they may also be removed, if advance notice was given at least + * one feature release ahead of time. Incompatible changes may be made + * when justified.

  • + * + *
  • {@code $INTERIM} — The + * interim-release counter, incremented for non-feature releases that + * contain compatible bug fixes and enhancements but no incompatible + * changes, no feature removals, and no changes to standard APIs. + *

  • + * + *
  • {@code $UPDATE} — The update-release + * counter, incremented for compatible update releases that fix security + * issues, regressions, and bugs in newer features.

  • + * + *
  • {@code $PATCH} — The emergency + * patch-release counter, incremented only when it's necessary to produce + * an emergency release to fix a critical issue.

  • + * + * + * + *

    The fifth and later elements of a version number are free for use by + * platform implementors, to identify implementor-specific patch + * releases.

    + * + *

    A version number never has trailing zero elements. If an element + * and all those that follow it logically have the value zero then all of + * them are omitted.

    * *

    The sequence of numerals in a version number is compared to another * such sequence in numerical, pointwise fashion; e.g., {@code - * 9.9.1} is less than {@code 9.10.3}. If one sequence is shorter than - * another then the missing elements of the shorter sequence are - * considered to be less than the corresponding elements of the longer - * sequence; e.g., {@code 9.1.2} is less than {@code 9.1.2.1}. - *

    + * 10.0.4} is less than {@code 10.1.2}. If one sequence is shorter than + * another then the missing elements of the shorter sequence are considered + * to be less than the corresponding elements of the longer sequence; + * e.g., {@code 10.0.2} is less than {@code 10.0.2.1}.

    * *

    Version strings

    * - *

    A version string, {@code $VSTR}, consists of a version - * number {@code $VNUM}, as described above, optionally followed by - * pre-release and build information, in one of the following formats: - *

    + *

    A version string, {@code $VSTR}, is a version number {@code + * $VNUM}, as described above, optionally followed by pre-release and build + * information, in one of the following formats:

    * *
          *     $VNUM(-$PRE)?\+$BUILD(-$OPT)?
    @@ -1042,19 +1029,19 @@
          * 
      * *
    • {@code $PRE}, matching {@code ([a-zA-Z0-9]+)} - * --- A pre-release identifier. Typically {@code ea}, for a - * potentially unstable early-access release under active development, - * or {@code internal}, for an internal developer build.

    • + * — A pre-release identifier. Typically {@code ea}, for a + * potentially unstable early-access release under active development, or + * {@code internal}, for an internal developer build.

      * *
    • {@code $BUILD}, matching {@code - * (0|[1-9][0-9]*)} --- The build number, incremented for each promoted + * (0|[1-9][0-9]*)} — The build number, incremented for each promoted * build. {@code $BUILD} is reset to {@code 1} when any portion of {@code * $VNUM} is incremented.

    • * - *
    • {@code $OPT}, matching {@code - * ([-a-zA-Z0-9.]+)} --- Additional build information, if desired. In - * the case of an {@code internal} build this will often contain the date - * and time of the build.

    • + *
    • {@code $OPT}, matching {@code ([-a-zA-Z0-9.]+)} + * — Additional build information, if desired. In the case of an + * {@code internal} build this will often contain the date and time of the + * build.

    • * *
    * @@ -1138,7 +1125,7 @@ throw new NullPointerException(); // Shortcut to avoid initializing VersionPattern when creating - // major version constants during startup + // feature-version constants during startup if (isSimpleNumber(s)) { return new Version(List.of(Integer.parseInt(s)), Optional.empty(), Optional.empty(), Optional.empty()); @@ -1195,43 +1182,106 @@ } /** - * Returns the major version number. + * Returns the value of the feature element of + * the version number. * - * @return The major version number + * @return The value of the feature element */ - public int major() { + public int feature() { return version.get(0); } /** - * Returns the minor version number or zero if it - * was not set. + * Returns the value of the interim element of + * the version number, or zero if it is absent. * - * @return The minor version number or zero if it was not set + * @return The value of the interim element, or zero */ - public int minor() { + public int interim() { return (version.size() > 1 ? version.get(1) : 0); } /** - * Returns the security version number or zero - * if it was not set. + * Returns the value of the update element of the + * version number, or zero if it is absent. * - * @return The security version number or zero if it was not set + * @return The value of the update element, or zero */ - public int security() { + public int update() { return (version.size() > 2 ? version.get(2) : 0); } /** - * Returns an unmodifiable {@link java.util.List List} of the - * integer numerals contained in the version - * number. The {@code List} always contains at least one - * element corresponding to the major version - * number. + * Returns the value of the patch element of the + * version number, or zero if it is absent. + * + * @return The value of the patch element, or zero + */ + public int patch() { + return (version.size() > 3 ? version.get(3) : 0); + } + + /** + * Returns the value of the major element of the version number. + * + * @deprecated As of Java SE 10, the first element of a version + * number is not the major-release number but the feature-release + * counter, incremented for every time-based release. Use the {@link + * #feature()} method in preference to this method. For compatibility, + * this method returns the value of the feature + * element. + * + * @return The value of the feature element + */ + @Deprecated(since = "10") + public int major() { + return feature(); + } + + /** + * Returns the value of the minor element of the version number, or + * zero if it is absent. + * + * @deprecated As of Java SE 10, the second element of a version + * number is not the minor-release number but the interim-release + * counter, incremented for every interim release. Use the {@link + * #interim()} method in preference to this method. For compatibility, + * this method returns the value of the interim + * element, or zero if it is absent. + * + * @return The value of the interim element, or zero + */ + @Deprecated(since = "10") + public int minor() { + return interim(); + } + + /** + * Returns the value of the security element of the version number, or + * zero if it is absent. + * + * @deprecated As of Java SE 10, the third element of a version + * number is not the security level but the update-release counter, + * incremented for every update release. Use the {@link #update()} + * method in preference to this method. For compatibility, this method + * returns the value of the update element, or + * zero if it is absent. + * + * @return The value of the update element, or zero + */ + @Deprecated(since = "10") + public int security() { + return update(); + } + + /** + * Returns an unmodifiable {@link java.util.List List} of the integers + * represented in the version number. The {@code + * List} always contains at least one element corresponding to the feature version number. * - * @return An unmodifiable list of the integer numerals - * contained in the version number + * @return An unmodifiable list of the integers + * represented in the version number */ public List version() { return version; --- old/src/java.base/share/classes/java/lang/System.java 2017-12-05 11:38:07.361563582 -0800 +++ new/src/java.base/share/classes/java/lang/System.java 2017-12-05 11:38:07.129572887 -0800 @@ -550,8 +550,10 @@ * System properties. The following properties are guaranteed to be defined: *
    *
    java.version
    Java version number + *
    java.version.date
    Java version date *
    java.vendor
    Java vendor specific string *
    java.vendor.url
    Java vendor URL + *
    java.vendor.version
    Java vendor version *
    java.home
    Java installation directory *
    java.class.version
    Java class version number *
    java.class.path
    Java classpath @@ -591,12 +593,18 @@ * * * java.version - * Java Runtime Environment version which may be interpreted + * Java Runtime Environment version, which may be interpreted * as a {@link Runtime.Version} + * java.version.date + * Java Runtime Environment version date, in ISO-8601 YYYY-MM-DD + * format, which may be interpreted as a {@link + * java.time.LocalDate} * java.vendor * Java Runtime Environment vendor * java.vendor.url * Java vendor URL + * java.vendor.version + * Java vendor version * java.home * Java installation directory * java.vm.specification.version --- old/src/java.base/share/classes/java/lang/VersionProps.java.template 2017-12-05 11:38:08.521517053 -0800 +++ new/src/java.base/share/classes/java/lang/VersionProps.java.template 2017-12-05 11:38:08.293526198 -0800 @@ -32,13 +32,15 @@ class VersionProps { - private static final String launcher_name = "@@LAUNCHER_NAME@@"; private static final String java_version = "@@VERSION_SHORT@@"; + private static final String java_version_date = + "@@VERSION_DATE@@"; + private static final String java_runtime_name = "@@RUNTIME_NAME@@"; @@ -57,14 +59,27 @@ private static final String VERSION_OPT = "@@VERSION_OPT@@"; + private static final boolean isLTS = + "@@VERSION_OPT@@".startsWith("LTS"); + + private static final String VENDOR_VERSION_STRING = + "@@VENDOR_VERSION_STRING@@"; + + private static final String vendor_version = + (VENDOR_VERSION_STRING.length() > 0 + ? " " + VENDOR_VERSION_STRING : ""); + static { init(); } public static void init() { System.setProperty("java.version", java_version); + System.setProperty("java.version.date", java_version_date); System.setProperty("java.runtime.version", java_runtime_version); System.setProperty("java.runtime.name", java_runtime_name); + if (VENDOR_VERSION_STRING.length() > 0) + System.setProperty("java.vendor.version", VENDOR_VERSION_STRING); } private static int parseVersionNumber(String version, int prevIndex, int index) { @@ -162,31 +177,36 @@ /* First line: platform version. */ if (err) { - ps.println(launcher_name + " version \"" + java_version + "\""); + ps.println(launcher_name + " version \"" + java_version + "\"" + + " " + java_version_date + + (isLTS ? " LTS" : "")); } else { /* Use a format more in line with GNU conventions */ - ps.println(launcher_name + " " + java_version); + ps.println(launcher_name + " " + java_version + + " " + java_version_date + + (isLTS ? " LTS" : "")); } /* Second line: runtime version (ie, libraries). */ String jdk_debug_level = System.getProperty("jdk.debug", "release"); - /* Debug level is not printed for "release" builds */ if ("release".equals(jdk_debug_level)) { + /* Do not show debug level "release" builds */ jdk_debug_level = ""; } else { jdk_debug_level = jdk_debug_level + " "; } - ps.print(java_runtime_name + " (" + jdk_debug_level + "build " + java_runtime_version); - - ps.println(')'); + ps.println(java_runtime_name + vendor_version + + " (" + jdk_debug_level + "build " + java_runtime_version + ")"); /* Third line: JVM information. */ String java_vm_name = System.getProperty("java.vm.name"); String java_vm_version = System.getProperty("java.vm.version"); String java_vm_info = System.getProperty("java.vm.info"); - ps.println(java_vm_name + " (" + jdk_debug_level + "build " + java_vm_version + ", " + - java_vm_info + ")"); + ps.println(java_vm_name + vendor_version + + " (" + jdk_debug_level + "build " + java_vm_version + ", " + + java_vm_info + ")"); + } } --- old/src/java.base/share/classes/java/util/jar/JarFile.java 2017-12-05 11:38:09.657471486 -0800 +++ new/src/java.base/share/classes/java/util/jar/JarFile.java 2017-12-05 11:38:09.433480471 -0800 @@ -117,9 +117,9 @@ *
  • * {@code jdk.util.jar.version} can be assigned a value that is the * {@code String} representation of a non-negative integer - * {@code <= Runtime.version().major()}. The value is used to set the effective + * {@code <= Runtime.version().feature()}. The value is used to set the effective * runtime version to something other than the default value obtained by - * evaluating {@code Runtime.version().major()}. The effective runtime version + * evaluating {@code Runtime.version().feature()}. The effective runtime version * is the version that the {@link JarFile#JarFile(File, boolean, int, Runtime.Version)} * constructor uses when the value of the last argument is * {@code JarFile.runtimeVersion()}. @@ -148,7 +148,7 @@ public class JarFile extends ZipFile { private final static Runtime.Version BASE_VERSION; - private final static int BASE_VERSION_MAJOR; + private final static int BASE_VERSION_FEATURE; private final static Runtime.Version RUNTIME_VERSION; private final static boolean MULTI_RELEASE_ENABLED; private final static boolean MULTI_RELEASE_FORCED; @@ -158,7 +158,7 @@ private boolean jvInitialized; private boolean verify; private final Runtime.Version version; // current version - private final int versionMajor; // version.major() + private final int versionFeature; // version.feature() private boolean isMultiRelease; // is jar multi-release? // indicates if Class-Path attribute present @@ -175,14 +175,14 @@ JUZFA = jdk.internal.misc.SharedSecrets.getJavaUtilZipFileAccess(); // multi-release jar file versions >= 9 BASE_VERSION = Runtime.Version.parse(Integer.toString(8)); - BASE_VERSION_MAJOR = BASE_VERSION.major(); + BASE_VERSION_FEATURE = BASE_VERSION.feature(); String jarVersion = GetPropertyAction.privilegedGetProperty("jdk.util.jar.version"); - int runtimeVersion = Runtime.version().major(); + int runtimeVersion = Runtime.version().feature(); if (jarVersion != null) { int jarVer = Integer.parseInt(jarVersion); runtimeVersion = (jarVer > runtimeVersion) ? runtimeVersion - : Math.max(jarVer, BASE_VERSION_MAJOR); + : Math.max(jarVer, BASE_VERSION_FEATURE); } RUNTIME_VERSION = Runtime.Version.parse(Integer.toString(runtimeVersion)); String enableMultiRelease = GetPropertyAction @@ -229,10 +229,10 @@ * Returns the version that represents the effective runtime versioned * configuration of a multi-release jar file. *

    - * By default the major version number of the returned {@code Version} will - * be equal to the major version number of {@code Runtime.version()}. + * By default the feature version number of the returned {@code Version} will + * be equal to the feature version number of {@code Runtime.version()}. * However, if the {@code jdk.util.jar.version} property is set, the - * returned {@code Version} is derived from that property and major version + * returned {@code Version} is derived from that property and feature version * numbers may not be equal. * * @return the version that represents the runtime versioned configuration @@ -327,7 +327,7 @@ *

    * The canonical form derived from the version parameter is * {@code Runtime.Version.parse(Integer.toString(n))} where {@code n} is - * {@code Math.max(version.major(), JarFile.baseVersion().major())}. + * {@code Math.max(version.feature(), JarFile.baseVersion().feature())}. * * @param file the jar file to be opened for reading * @param verify whether or not to verify the jar file if @@ -346,17 +346,17 @@ super(file, mode); this.verify = verify; Objects.requireNonNull(version); - if (MULTI_RELEASE_FORCED || version.major() == RUNTIME_VERSION.major()) { + if (MULTI_RELEASE_FORCED || version.feature() == RUNTIME_VERSION.feature()) { // This deals with the common case where the value from JarFile.runtimeVersion() is passed this.version = RUNTIME_VERSION; - } else if (version.major() <= BASE_VERSION_MAJOR) { + } else if (version.feature() <= BASE_VERSION_FEATURE) { // This also deals with the common case where the value from JarFile.baseVersion() is passed this.version = BASE_VERSION; } else { // Canonicalize - this.version = Runtime.Version.parse(Integer.toString(version.major())); + this.version = Runtime.Version.parse(Integer.toString(version.feature())); } - this.versionMajor = this.version.major(); + this.versionFeature = this.version.feature(); } /** @@ -577,7 +577,7 @@ // filter out dir META-INF/versions/ and META-INF/versions/*/ // and any entry with version > 'version' if (index == -1 || index == (name.length() - 1) || - Integer.parseInt(name, off, index, 10) > versionMajor) { + Integer.parseInt(name, off, index, 10) > versionFeature) { return null; } } catch (NumberFormatException x) { @@ -590,11 +590,11 @@ } private JarEntry getVersionedEntry(String name, JarEntry je) { - if (BASE_VERSION_MAJOR < versionMajor) { + if (BASE_VERSION_FEATURE < versionFeature) { if (!name.startsWith(META_INF)) { // search for versioned entry - int v = versionMajor; - while (v > BASE_VERSION_MAJOR) { + int v = versionFeature; + while (v > BASE_VERSION_FEATURE) { JarFileEntry vje = getEntry0(META_INF_VERSIONS + v + "/" + name); if (vje != null) { return vje.withBasename(name); @@ -671,7 +671,7 @@ } JarFileEntry realEntry() { - if (isMultiRelease() && versionMajor != BASE_VERSION_MAJOR) { + if (isMultiRelease() && versionFeature != BASE_VERSION_FEATURE) { String entryName = super.getName(); return entryName == basename || entryName.equals(basename) ? this : new JarFileEntry(entryName, this); --- old/src/java.base/share/native/libjava/jdk_util.c 2017-12-05 11:38:10.837424155 -0800 +++ new/src/java.base/share/native/libjava/jdk_util.c 2017-12-05 11:38:10.609433300 -0800 @@ -34,9 +34,9 @@ JNIEXPORT void JDK_GetVersionInfo0(jdk_version_info* info, size_t info_size) { /* These VERSION_* macros are given by the build system */ - const unsigned int version_major = VERSION_MAJOR; - const unsigned int version_minor = VERSION_MINOR; - const unsigned int version_security = VERSION_SECURITY; + const unsigned int version_major = VERSION_FEATURE; + const unsigned int version_minor = VERSION_INTERIM; + const unsigned int version_security = VERSION_UPDATE; const unsigned int version_patch = VERSION_PATCH; const unsigned int version_build = VERSION_BUILD; --- old/src/jdk.jconsole/share/classes/sun/tools/jconsole/AboutDialog.java 2017-12-05 11:38:12.009377145 -0800 +++ new/src/jdk.jconsole/share/classes/sun/tools/jconsole/AboutDialog.java 2017-12-05 11:38:11.777386450 -0800 @@ -181,7 +181,7 @@ } private static String getOnlineDocUrl() { - String version = Integer.toString(Runtime.version().major()); + String version = Integer.toString(Runtime.version().feature()); return Resources.format(Messages.HELP_ABOUT_DIALOG_USER_GUIDE_LINK_URL, version); } --- old/src/jdk.jlink/share/classes/jdk/tools/jlink/internal/JlinkTask.java 2017-12-05 11:38:13.105333183 -0800 +++ new/src/jdk.jlink/share/classes/jdk/tools/jlink/internal/JlinkTask.java 2017-12-05 11:38:12.873342489 -0800 @@ -447,7 +447,7 @@ // java.base version is different than the current runtime version version = Runtime.Version.parse(v.toString()); - if (Runtime.version().major() != version.major()) { + if (Runtime.version().feature() != version.feature()) { finder = ModulePath.of(version, true, entries); } } --- old/src/jdk.jlink/share/classes/jdk/tools/jlink/internal/plugins/GenerateJLIClassesPlugin.java 2017-12-05 11:38:14.121292429 -0800 +++ new/src/jdk.jlink/share/classes/jdk/tools/jlink/internal/plugins/GenerateJLIClassesPlugin.java 2017-12-05 11:38:13.893301575 -0800 @@ -210,8 +210,8 @@ private boolean checkVersion(Runtime.Version linkedVersion) { Runtime.Version baseVersion = Runtime.version(); - if (baseVersion.major() != linkedVersion.major() || - baseVersion.minor() != linkedVersion.minor()) { + if (baseVersion.feature() != linkedVersion.feature() || + baseVersion.interim() != linkedVersion.interim()) { return false; } return true; --- old/src/jdk.scripting.nashorn.shell/share/classes/jdk/nashorn/tools/jjs/Main.java 2017-12-05 11:38:15.141251516 -0800 +++ new/src/jdk.scripting.nashorn.shell/share/classes/jdk/nashorn/tools/jjs/Main.java 2017-12-05 11:38:14.913260662 -0800 @@ -299,7 +299,7 @@ private static String JAVADOC_BASE = "https://docs.oracle.com/javase/%d/docs/api/"; private static void openBrowserForJavadoc(ScriptFunction browse, String relativeUrl) { try { - final URI uri = new URI(String.format(JAVADOC_BASE, Runtime.version().major()) + relativeUrl); + final URI uri = new URI(String.format(JAVADOC_BASE, Runtime.version().feature()) + relativeUrl); ScriptRuntime.apply(browse, null, uri); } catch (Exception ignored) { } --- old/src/jdk.zipfs/share/classes/jdk/nio/zipfs/JarFileSystem.java 2017-12-05 11:38:16.169210282 -0800 +++ new/src/jdk.zipfs/share/classes/jdk/nio/zipfs/JarFileSystem.java 2017-12-05 11:38:15.941219427 -0800 @@ -70,14 +70,14 @@ if (o instanceof String) { String s = (String)o; if (s.equals("runtime")) { - version = Runtime.version().major(); + version = Runtime.version().feature(); } else { version = Integer.parseInt(s); } } else if (o instanceof Integer) { version = (Integer)o; } else if (o instanceof Version) { - version = ((Version)o).major(); + version = ((Version)o).feature(); } else { throw new IllegalArgumentException("env parameter must be String, Integer, " + "or Version"); --- old/test/jdk/java/lang/Runtime/Version/Basic.java 2017-12-05 11:38:17.209168566 -0800 +++ new/test/jdk/java/lang/Runtime/Version/Basic.java 2017-12-05 11:38:16.977177872 -0800 @@ -38,6 +38,7 @@ import static java.lang.System.out; public class Basic { + private static final Class IAE = IllegalArgumentException.class; private static final Class NPE @@ -51,17 +52,19 @@ public static void main(String ... args) { - //// Tests for parse(), major(), minor(), security(), pre(), - //// build(), optional(), version(), toString() - // v M m sec pre bld opt + //// Tests for parse(), feature(), interim(), update(), patch(), + //// pre(), build(), optional(), version(), and toString() + // v f i u p pre bld opt // $VNUM - test("9", 9, 0, 0, "", 0, ""); - test("9.1", 9, 1, 0, "", 0, ""); - test("9.0.1", 9, 0, 1, "", 0, ""); - test("404.1.2", 404, 1, 2, "", 0, ""); - test("9.1.2.3", 9, 1, 2, "", 0, ""); - test("1000.0.0.0.0.0.99999999", 1000, 0, 0, "", 0, ""); + test("9", 9, 0, 0, 0, "", 0, ""); + test("9.1", 9, 1, 0, 0, "", 0, ""); + test("9.0.1", 9, 0, 1, 0, "", 0, ""); + test("9.0.0.1", 9, 0, 0, 1, "", 0, ""); + test("9.0.0.0.1", 9, 0, 0, 0, "", 0, ""); + test("404.1.2", 404, 1, 2, 0, "", 0, ""); + test("9.1.2.3", 9, 1, 2, 3, "", 0, ""); + test("1000.0.0.0.0.0.99999999", 1000, 0, 0, 0, "", 0, ""); tryCatch(null, NPE); tryCatch("", IAE); @@ -75,23 +78,23 @@ tryCatch(TOO_BIG_STR, NFE); // $PRE - test("9-ea", 9, 0, 0, "ea", 0, ""); - test("9-internal", 9, 0, 0, "internal", 0, ""); - test("9-0", 9, 0, 0, "0", 0, ""); - test("9.2.7-8", 9, 2, 7, "8", 0, ""); - test("1-ALL", 1, 0, 0, "ALL", 0, ""); - test("2.3.4.5-1a", 2, 3, 4, "1a", 0, ""); - test("1-" + TOO_BIG_STR, 1, 0, 0, TOO_BIG_STR, 0, ""); + test("9-ea", 9, 0, 0, 0, "ea", 0, ""); + test("9-internal", 9, 0, 0, 0, "internal", 0, ""); + test("9-0", 9, 0, 0, 0, "0", 0, ""); + test("9.2.7-8", 9, 2, 7, 0, "8", 0, ""); + test("1-ALL", 1, 0, 0, 0, "ALL", 0, ""); + test("2.3.4.5-1a", 2, 3, 4, 5, "1a", 0, ""); + test("1-" + TOO_BIG_STR, 1, 0, 0, 0, TOO_BIG_STR, 0, ""); tryCatch("9:-ea", IAE); tryCatch("3.14159-", IAE); tryCatch("3.14159-%", IAE); // $BUILD - test("9+0", 9, 0, 0, "", 0, ""); - test("3.14+9999900", 3, 14, 0, "", 9999900, ""); - test("9-pre+105", 9, 0, 0, "pre", 105, ""); - test("6.0.42-8beta+4", 6, 0, 42, "8beta", 4, ""); + test("9+0", 9, 0, 0, 0, "", 0, ""); + test("3.14+9999900", 3, 14, 0, 0, "", 9999900, ""); + test("9-pre+105", 9, 0, 0, 0, "pre", 105, ""); + test("6.0.42-8beta+4", 6, 0, 42, 0, "8beta", 4, ""); tryCatch("9+", IAE); tryCatch("7+a", IAE); @@ -101,13 +104,13 @@ tryCatch("1+" + TOO_BIG_STR, NFE); // $OPT - test("9+-foo", 9, 0, 0, "", 0, "foo"); - test("9-pre-opt", 9, 0, 0, "pre", 0, "opt"); - test("42+---bar", 42, 0, 0, "", 0, "--bar"); - test("2.91+-8061493-", 2, 91, 0, "", 0, "8061493-"); - test("24+-foo.bar", 24, 0, 0, "", 0, "foo.bar"); - test("9-ribbit+17-...", 9, 0, 0, "ribbit", 17, "..."); - test("7+1-" + TOO_BIG_STR, 7,0, 0, "", 1, TOO_BIG_STR); + test("9+-foo", 9, 0, 0, 0, "", 0, "foo"); + test("9-pre-opt", 9, 0, 0, 0, "pre", 0, "opt"); + test("42+---bar", 42, 0, 0, 0, "", 0, "--bar"); + test("2.91+-8061493-", 2, 91, 0, 0, "", 0, "8061493-"); + test("24+-foo.bar", 24, 0, 0, 0, "", 0, "foo.bar"); + test("9-ribbit+17-...", 9, 0, 0, 0, "ribbit", 17, "..."); + test("7+1-" + TOO_BIG_STR, 7,0, 0, 0, "", 1, TOO_BIG_STR); tryCatch("9-pre+-opt", IAE); tryCatch("1.4142+-", IAE); @@ -127,6 +130,8 @@ testEHC("9", "8", false, false, 1, 1); testEHC("10.512.1", "10.512.2", false, false, -1, -1); + testEHC("10.512.0.1", "10.512.0.2", false, false, -1, -1); + testEHC("10.512.0.0.1", "10.512.0.0.2", false, false, -1, -1); testEHC("512.10.1", "512.11.1", false, false, -1, -1); // $OPT comparison @@ -164,17 +169,21 @@ } - private static void test(String s, Integer major, Integer minor, - Integer sec, String pre, Integer build, - String opt) + private static void test(String s, Integer feature, Integer interim, + Integer update, Integer patch, + String pre, Integer build, String opt) { Version v = testParse(s); testStr(v.toString(), s); - testInt(v.major(), major); - testInt(v.minor(), minor); - testInt(v.security(), sec); + testInt(v.feature(), feature); + testInt(v.major(), feature); + testInt(v.interim(), interim); + testInt(v.minor(), interim); + testInt(v.update(), update); + testInt(v.security(), update); + testInt(v.patch(), patch); testStr((v.pre().isPresent() ? v.pre().get() : ""), pre); testInt((v.build().isPresent() ? v.build().get() : 0), build); testStr((v.optional().isPresent() ? v.optional().get() : ""), opt); @@ -381,4 +390,5 @@ first = x; } } + }