diff --git a/.hgtags-top-repo b/.hgtags-top-repo index ec2e8625423..5e870ca8562 100644 --- a/.hgtags-top-repo +++ b/.hgtags-top-repo @@ -382,3 +382,4 @@ be1218f792a450dfb5d4b1f82616b9d95a6a732e jdk-9+133 d7f519b004254b19e384131d9f0d0e40e31a0fd3 jdk-9+137 67c4388142bdf58aec8fefa4475faaa8a5d7380c jdk-9+138 7dcf453eacae79ee86a6bcc75fd0b546fc99b48a jdk-9+139 +a5815c6098a241d3a1df64d22b84b3524e4a77df jdk-9+140 diff --git a/common/autoconf/basics.m4 b/common/autoconf/basics.m4 index 8404ca42d02..7f8c42f6b98 100644 --- a/common/autoconf/basics.m4 +++ b/common/autoconf/basics.m4 @@ -428,9 +428,10 @@ AC_DEFUN([BASIC_SETUP_TOOL], # Call BASIC_SETUP_TOOL with AC_PATH_PROGS to locate the tool # $1: variable to set # $2: executable name (or list of names) to look for +# $3: [path] AC_DEFUN([BASIC_PATH_PROGS], [ - BASIC_SETUP_TOOL($1, [AC_PATH_PROGS($1, $2)]) + BASIC_SETUP_TOOL($1, [AC_PATH_PROGS($1, $2, , $3)]) ]) # Call BASIC_SETUP_TOOL with AC_CHECK_TOOLS to locate the tool @@ -444,9 +445,10 @@ AC_DEFUN([BASIC_CHECK_TOOLS], # Like BASIC_PATH_PROGS but fails if no tool was found. # $1: variable to set # $2: executable name (or list of names) to look for +# $3: [path] AC_DEFUN([BASIC_REQUIRE_PROGS], [ - BASIC_PATH_PROGS($1, $2) + BASIC_PATH_PROGS($1, $2, , $3) BASIC_CHECK_NONEMPTY($1) ]) @@ -1065,7 +1067,9 @@ AC_DEFUN_ONCE([BASIC_SETUP_COMPLEX_TOOLS], BASIC_PATH_PROGS(HG, hg) BASIC_PATH_PROGS(STAT, stat) BASIC_PATH_PROGS(TIME, time) - BASIC_PATH_PROGS(DTRACE, dtrace) + # Dtrace is usually found in /usr/sbin on Solaris, but that directory may not + # be in the user path. + BASIC_PATH_PROGS(DTRACE, dtrace, $PATH:/usr/sbin) BASIC_PATH_PROGS(PATCH, [gpatch patch]) # Check if it's GNU time IS_GNU_TIME=`$TIME --version 2>&1 | $GREP 'GNU time'` diff --git a/common/autoconf/basics_windows.m4 b/common/autoconf/basics_windows.m4 index 52aea899351..1a79bf8fc86 100644 --- a/common/autoconf/basics_windows.m4 +++ b/common/autoconf/basics_windows.m4 @@ -1,5 +1,5 @@ # -# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2011, 2016, 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 diff --git a/common/autoconf/boot-jdk.m4 b/common/autoconf/boot-jdk.m4 index 83ec28e39bb..ab2bd9a87d7 100644 --- a/common/autoconf/boot-jdk.m4 +++ b/common/autoconf/boot-jdk.m4 @@ -1,5 +1,5 @@ # -# Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2011, 2016, 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 diff --git a/common/autoconf/bootcycle-spec.gmk.in b/common/autoconf/bootcycle-spec.gmk.in index 3c9c1dbe23b..e26450ae3fc 100644 --- a/common/autoconf/bootcycle-spec.gmk.in +++ b/common/autoconf/bootcycle-spec.gmk.in @@ -1,5 +1,5 @@ # -# Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2011, 2016, 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 diff --git a/common/autoconf/build-performance.m4 b/common/autoconf/build-performance.m4 index 6ca891c3291..863875065a6 100644 --- a/common/autoconf/build-performance.m4 +++ b/common/autoconf/build-performance.m4 @@ -168,7 +168,6 @@ AC_DEFUN([BPERF_SETUP_CCACHE], [AS_HELP_STRING([--enable-ccache], [enable using ccache to speed up recompilations @<:@disabled@:>@])]) - CCACHE= CCACHE_STATUS= AC_MSG_CHECKING([is ccache enabled]) if test "x$enable_ccache" = xyes; then diff --git a/common/autoconf/buildjdk-spec.gmk.in b/common/autoconf/buildjdk-spec.gmk.in index a643d82e45b..dba07605a22 100644 --- a/common/autoconf/buildjdk-spec.gmk.in +++ b/common/autoconf/buildjdk-spec.gmk.in @@ -1,5 +1,5 @@ # -# Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2015, 2016, 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 @@ -156,7 +156,3 @@ JVM_VARIANT_KERNEL := false JVM_VARIANT_ZERO := false JVM_VARIANT_ZEROSHARK := false JVM_VARIANT_CORE := false - -# Sneak this in via the spec.gmk file, since we don't want to mess around too much with the Hotspot make files. -# This is needed to get the LOG setting to work properly. -include $(SRC_ROOT)/make/common/MakeBase.gmk diff --git a/common/autoconf/compare.sh.in b/common/autoconf/compare.sh.in index f7e2003ca32..44933806256 100644 --- a/common/autoconf/compare.sh.in +++ b/common/autoconf/compare.sh.in @@ -1,6 +1,6 @@ #!/bin/bash # -# Copyright (c) 2012, 2014, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2012, 2016, 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 diff --git a/common/autoconf/generated-configure.sh b/common/autoconf/generated-configure.sh index 48b23344af8..2eca459ed04 100644 --- a/common/autoconf/generated-configure.sh +++ b/common/autoconf/generated-configure.sh @@ -3657,6 +3657,7 @@ ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var. # Call BASIC_SETUP_TOOL with AC_PATH_PROGS to locate the tool # $1: variable to set # $2: executable name (or list of names) to look for +# $3: [path] # Call BASIC_SETUP_TOOL with AC_CHECK_TOOLS to locate the tool @@ -3667,6 +3668,7 @@ ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var. # Like BASIC_PATH_PROGS but fails if no tool was found. # $1: variable to set # $2: executable name (or list of names) to look for +# $3: [path] # Like BASIC_SETUP_TOOL but fails if no tool was found. @@ -3733,7 +3735,7 @@ ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var. # -# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2011, 2016, 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 @@ -3792,7 +3794,7 @@ ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var. # ... then the rest # -# Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2011, 2016, 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 @@ -4403,7 +4405,7 @@ VALID_JVM_VARIANTS="server client minimal core zero zeroshark custom" # -# Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2015, 2016, 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 @@ -4498,7 +4500,7 @@ VALID_JVM_VARIANTS="server client minimal core zero zeroshark custom" # -# Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2011, 2016, 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 @@ -4818,7 +4820,7 @@ VALID_JVM_VARIANTS="server client minimal core zero zeroshark custom" # -# Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2011, 2016, 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 @@ -5091,7 +5093,7 @@ VS_SDK_PLATFORM_NAME_2013= #CUSTOM_AUTOCONF_INCLUDE # Do not change or remove the following line, it is needed for consistency checks: -DATE_WHEN_GENERATED=1475218974 +DATE_WHEN_GENERATED=1476275292 ############################################################################### # @@ -22769,6 +22771,8 @@ $as_echo "$tool_specified" >&6; } fi + # Dtrace is usually found in /usr/sbin on Solaris, but that directory may not + # be in the user path. # Publish this variable in the help. @@ -22791,7 +22795,8 @@ else ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH +as_dummy="$PATH:/usr/sbin" +for as_dir in $as_dummy do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. @@ -22849,7 +22854,8 @@ else ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH +as_dummy="$PATH:/usr/sbin" +for as_dir in $as_dummy do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. @@ -65239,7 +65245,6 @@ if test "${enable_ccache+set}" = set; then : fi - CCACHE= CCACHE_STATUS= { $as_echo "$as_me:${as_lineno-$LINENO}: checking is ccache enabled" >&5 $as_echo_n "checking is ccache enabled... " >&6; } diff --git a/common/autoconf/jdk-version.m4 b/common/autoconf/jdk-version.m4 index 3b2fbfb60f1..4846c12647c 100644 --- a/common/autoconf/jdk-version.m4 +++ b/common/autoconf/jdk-version.m4 @@ -1,5 +1,5 @@ # -# Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2015, 2016, 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 diff --git a/common/autoconf/lib-bundled.m4 b/common/autoconf/lib-bundled.m4 index 9c8ad722fd8..218d3f87adf 100644 --- a/common/autoconf/lib-bundled.m4 +++ b/common/autoconf/lib-bundled.m4 @@ -1,5 +1,5 @@ # -# Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2011, 2016, 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 diff --git a/common/autoconf/source-dirs.m4 b/common/autoconf/source-dirs.m4 index fa2f74d2237..940707e81a0 100644 --- a/common/autoconf/source-dirs.m4 +++ b/common/autoconf/source-dirs.m4 @@ -1,5 +1,5 @@ # -# Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2011, 2016, 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 diff --git a/common/autoconf/spec.gmk.in b/common/autoconf/spec.gmk.in index 710cf70ab7c..7725e6fe84c 100644 --- a/common/autoconf/spec.gmk.in +++ b/common/autoconf/spec.gmk.in @@ -175,7 +175,7 @@ VERSION_NUMBER_FOUR_POSITIONS := @VERSION_NUMBER_FOUR_POSITIONS@ 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 to the major version number. +# The Java specification version. It usually equals the major version number. VERSION_SPECIFICATION := @VERSION_MAJOR@ # A GA version is defined by the PRE string being empty. Rather than testing for # that, this variable defines it with true/false. @@ -244,9 +244,6 @@ USE_PRECOMPILED_HEADER := @USE_PRECOMPILED_HEADER@ # Only build headless support or not ENABLE_HEADLESS_ONLY := @ENABLE_HEADLESS_ONLY@ -# Legacy support -USE_NEW_HOTSPOT_BUILD:=@USE_NEW_HOTSPOT_BUILD@ - # JDK_OUTPUTDIR specifies where a working jvm is built. # You can run $(JDK_OUTPUTDIR)/bin/java # Though the layout of the contents of $(JDK_OUTPUTDIR) is not diff --git a/common/autoconf/version-numbers b/common/autoconf/version-numbers index 98f106680b5..ac2c9f24655 100644 --- a/common/autoconf/version-numbers +++ b/common/autoconf/version-numbers @@ -1,5 +1,5 @@ # -# Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2011, 2016, 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 diff --git a/common/bin/compare_exceptions.sh.incl b/common/bin/compare_exceptions.sh.incl index 7b76ab37029..a4c4278299a 100644 --- a/common/bin/compare_exceptions.sh.incl +++ b/common/bin/compare_exceptions.sh.incl @@ -1,6 +1,6 @@ #!/bin/bash # -# Copyright (c) 2012, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2012, 2016, 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 diff --git a/common/bin/hgforest.sh b/common/bin/hgforest.sh index 7320aa09a11..3007d3e8860 100644 --- a/common/bin/hgforest.sh +++ b/common/bin/hgforest.sh @@ -1,6 +1,6 @@ #!/bin/sh # -# Copyright (c) 2009, 2014, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2009, 2016, 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 diff --git a/common/bin/jib.sh b/common/bin/jib.sh index ea52385537b..ceac118bb77 100644 --- a/common/bin/jib.sh +++ b/common/bin/jib.sh @@ -1,6 +1,6 @@ #!/bin/bash # -# Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2015, 2016, 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 diff --git a/common/conf/jib-profiles.js b/common/conf/jib-profiles.js index d003e1815e4..fa3c5749f8c 100644 --- a/common/conf/jib-profiles.js +++ b/common/conf/jib-profiles.js @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2015, 2016, 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 @@ -287,7 +287,8 @@ var getJibProfilesProfiles = function (input, common) { target_os: "solaris", target_cpu: "x64", dependencies: concat(common.dependencies, "devkit", "cups"), - configure_args: concat(common.configure_args, "--with-zlib=system"), + configure_args: concat(common.configure_args, "--with-zlib=system", + "--enable-dtrace"), default_make_targets: common.default_make_targets }, @@ -295,7 +296,8 @@ var getJibProfilesProfiles = function (input, common) { target_os: "solaris", target_cpu: "sparcv9", dependencies: concat(common.dependencies, "devkit", "cups"), - configure_args: concat(common.configure_args, "--with-zlib=system"), + configure_args: concat(common.configure_args, "--with-zlib=system", + "--enable-dtrace"), default_make_targets: common.default_make_targets }, diff --git a/hotspot/.hgtags b/hotspot/.hgtags index bfddfeea0ac..a9c6935b623 100644 --- a/hotspot/.hgtags +++ b/hotspot/.hgtags @@ -542,3 +542,4 @@ a20da289f646ee44440695b81abc0548330e4ca7 jdk-9+136 dfcbf839e299e7e2bba1da69bdb347617ea4c7e8 jdk-9+137 fc0956308c7a586267c5dd35dff74f773aa9c3eb jdk-9+138 08492e67bf3226784dab3bf9ae967382ddbc1af5 jdk-9+139 +fec31089c2ef5a12dd64f401b0bf2e00f56ee0d0 jdk-9+140 diff --git a/hotspot/make/lib/CompileGtest.gmk b/hotspot/make/lib/CompileGtest.gmk index 1f7c317a427..9c69a2f175a 100644 --- a/hotspot/make/lib/CompileGtest.gmk +++ b/hotspot/make/lib/CompileGtest.gmk @@ -69,7 +69,7 @@ $(eval $(call SetupNativeCompilation, BUILD_GTEST_LIBJVM, \ CFLAGS := $(JVM_CFLAGS) -I$(GTEST_FRAMEWORK_SRC) \ -I$(GTEST_FRAMEWORK_SRC)/include \ $(addprefix -I,$(GTEST_TEST_SRC)), \ - CFLAGS_windows := /EHsc, \ + CFLAGS_windows := -EHsc, \ CFLAGS_solaris := -DGTEST_HAS_EXCEPTIONS=0 -library=stlport4, \ CFLAGS_macosx := -DGTEST_OS_MAC=1, \ CFLAGS_DEBUG_SYMBOLS := $(JVM_CFLAGS_SYMBOLS), \ diff --git a/hotspot/src/share/vm/runtime/arguments.cpp b/hotspot/src/share/vm/runtime/arguments.cpp index 8dc6519381d..8017e73a4ea 100644 --- a/hotspot/src/share/vm/runtime/arguments.cpp +++ b/hotspot/src/share/vm/runtime/arguments.cpp @@ -422,6 +422,8 @@ static SpecialFlag const special_jvm_flags[] = { { "UseAltSigs", JDK_Version::undefined(), JDK_Version::jdk(9), JDK_Version::jdk(10) }, { "SegmentedHeapDumpThreshold", JDK_Version::undefined(), JDK_Version::jdk(9), JDK_Version::jdk(10) }, { "PrintOopAddress", JDK_Version::undefined(), JDK_Version::jdk(9), JDK_Version::jdk(10) }, + { "PermSize", JDK_Version::undefined(), JDK_Version::jdk(8), JDK_Version::jdk(10) }, + { "MaxPermSize", JDK_Version::undefined(), JDK_Version::jdk(8), JDK_Version::jdk(10) }, #ifdef TEST_VERIFY_SPECIAL_JVM_FLAGS { "dep > obs", JDK_Version::jdk(9), JDK_Version::jdk(8), JDK_Version::undefined() }, diff --git a/hotspot/test/runtime/CommandLine/PermGenFlagsTest.java b/hotspot/test/runtime/CommandLine/PermGenFlagsTest.java new file mode 100644 index 00000000000..9a821e0059e --- /dev/null +++ b/hotspot/test/runtime/CommandLine/PermGenFlagsTest.java @@ -0,0 +1,51 @@ +/* + * Copyright (c) 2016, 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 + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +/* + * @test + * @bug 8167446 + * @summary Commandline options PermSize and MaxPermSize should be recognized but ignored. + * @library /test/lib + * @modules java.base/jdk.internal.misc + * java.management + * @run driver PermGenFlagsTest + */ + +import jdk.test.lib.process.OutputAnalyzer; +import jdk.test.lib.process.ProcessTools; + +public class PermGenFlagsTest { + public static void main(String[] args) throws Exception { + ProcessBuilder pb = ProcessTools.createJavaProcessBuilder("-XX:PermSize=22k", + "-version"); + OutputAnalyzer output = new OutputAnalyzer(pb.start()); + output.shouldContain("Ignoring option PermSize; support was removed in 8.0"); + output.shouldHaveExitValue(0); + + pb = ProcessTools.createJavaProcessBuilder("-XX:MaxPermSize=22k", + "-version"); + output = new OutputAnalyzer(pb.start()); + output.shouldContain("Ignoring option MaxPermSize; support was removed in 8.0"); + output.shouldHaveExitValue(0); + } +} diff --git a/hotspot/test/runtime/modules/IgnoreModulePropertiesTest.java b/hotspot/test/runtime/modules/IgnoreModulePropertiesTest.java index 3714a9ee97a..31b0fb5b7e3 100644 --- a/hotspot/test/runtime/modules/IgnoreModulePropertiesTest.java +++ b/hotspot/test/runtime/modules/IgnoreModulePropertiesTest.java @@ -67,10 +67,11 @@ public class IgnoreModulePropertiesTest { } public static void main(String[] args) throws Exception { - testOption("--add-modules", "java.sqlx", "jdk.module.addmods", "java.lang.module.ResolutionException"); + testOption("--add-modules", "java.sqlx", "jdk.module.addmods.0", "java.lang.module.ResolutionException"); testOption("--limit-modules", "java.sqlx", "jdk.module.limitmods", "java.lang.module.ResolutionException"); - testOption("--add-reads", "xyzz=yyzd", "jdk.module.addreads.0", "java.lang.RuntimeException"); - testOption("--add-exports", "java.base/xyzz=yyzd", "jdk.module.addexports.0", "java.lang.RuntimeException"); + testOption("--add-reads", "xyzz=yyzd", "jdk.module.addreads.0", "WARNING: Unknown module: xyzz"); + testOption("--add-exports", "java.base/xyzz=yyzd", "jdk.module.addexports.0", + "WARNING: package xyzz not in java.base"); testOption("--patch-module", "=d", "jdk.module.patch.0", "IllegalArgumentException"); } } diff --git a/jdk/.hgtags b/jdk/.hgtags index 132fbb94863..3a9e6fe36d2 100644 --- a/jdk/.hgtags +++ b/jdk/.hgtags @@ -382,3 +382,4 @@ d5c70818cd8a82e76632c8c815bdb4f75f53aeaf jdk-9+132 e72df94364e3686e7d62059ce0d6b187b82da713 jdk-9+137 665096863382bf23ce891307cf2a7511e77c1c88 jdk-9+138 5518ac2f2ead5e594bd983f2047178136aafdfd0 jdk-9+139 +e93b7ea559759f036c9f69fd2ddaf47bb4e98385 jdk-9+140 diff --git a/jdk/make/CompileInterimRmic.gmk b/jdk/make/CompileInterimRmic.gmk index ce60127e6d1..9a30893f142 100644 --- a/jdk/make/CompileInterimRmic.gmk +++ b/jdk/make/CompileInterimRmic.gmk @@ -1,5 +1,5 @@ # -# Copyright (c) 2011, 2014, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2011, 2016, 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 diff --git a/jdk/make/CompileTools.gmk b/jdk/make/CompileTools.gmk index 46dab28f146..9d76d660e2d 100644 --- a/jdk/make/CompileTools.gmk +++ b/jdk/make/CompileTools.gmk @@ -1,5 +1,5 @@ # -# Copyright (c) 2011, 2014, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2011, 2016, 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 diff --git a/jdk/make/GenerateModuleSummary.gmk b/jdk/make/GenerateModuleSummary.gmk index 171183886a2..38d9985c263 100644 --- a/jdk/make/GenerateModuleSummary.gmk +++ b/jdk/make/GenerateModuleSummary.gmk @@ -1,5 +1,5 @@ # -# Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2014, 2016, 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 diff --git a/jdk/make/Tools.gmk b/jdk/make/Tools.gmk index 1034d34e15b..92af1ee102f 100644 --- a/jdk/make/Tools.gmk +++ b/jdk/make/Tools.gmk @@ -1,5 +1,5 @@ # -# Copyright (c) 2011, 2014, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2011, 2016, 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 diff --git a/jdk/make/gendata/GendataBreakIterator.gmk b/jdk/make/gendata/GendataBreakIterator.gmk index 2f7f5dff981..828e6314790 100644 --- a/jdk/make/gendata/GendataBreakIterator.gmk +++ b/jdk/make/gendata/GendataBreakIterator.gmk @@ -1,5 +1,5 @@ -# Copyright (c) 2011, 2014, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2011, 2016, 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 diff --git a/jdk/make/gendata/GendataHtml32dtd.gmk b/jdk/make/gendata/GendataHtml32dtd.gmk index 0c18d2a280c..0189a7c081e 100644 --- a/jdk/make/gendata/GendataHtml32dtd.gmk +++ b/jdk/make/gendata/GendataHtml32dtd.gmk @@ -1,5 +1,5 @@ # -# Copyright (c) 2011, 2013, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2011, 2016, 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 diff --git a/jdk/make/gensrc/Gensrc-java.base.gmk b/jdk/make/gensrc/Gensrc-java.base.gmk index 66e41feb5e1..2a28382858e 100644 --- a/jdk/make/gensrc/Gensrc-java.base.gmk +++ b/jdk/make/gensrc/Gensrc-java.base.gmk @@ -1,5 +1,5 @@ # -# Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2011, 2016, 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 diff --git a/jdk/make/gensrc/Gensrc-jdk.jlink.gmk b/jdk/make/gensrc/Gensrc-jdk.jlink.gmk index c841345c737..9ac5b1918a2 100644 --- a/jdk/make/gensrc/Gensrc-jdk.jlink.gmk +++ b/jdk/make/gensrc/Gensrc-jdk.jlink.gmk @@ -1,5 +1,5 @@ # -# Copyright (c) 2014, 2015, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2014, 2016, 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 diff --git a/jdk/make/gensrc/GensrcIcons.gmk b/jdk/make/gensrc/GensrcIcons.gmk index 1970f18866b..62e31fb39f0 100644 --- a/jdk/make/gensrc/GensrcIcons.gmk +++ b/jdk/make/gensrc/GensrcIcons.gmk @@ -1,5 +1,5 @@ # -# Copyright (c) 2011, 2014, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2011, 2016, 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 diff --git a/jdk/make/gensrc/GensrcLocaleData.gmk b/jdk/make/gensrc/GensrcLocaleData.gmk index 0acc8f9591f..e7d19951cce 100644 --- a/jdk/make/gensrc/GensrcLocaleData.gmk +++ b/jdk/make/gensrc/GensrcLocaleData.gmk @@ -1,5 +1,5 @@ # -# Copyright (c) 2011, 2014, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2011, 2016, 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 diff --git a/jdk/make/gensrc/GensrcModuleLoaderMap.gmk b/jdk/make/gensrc/GensrcModuleLoaderMap.gmk index 859017d2a6d..365c83ddf90 100644 --- a/jdk/make/gensrc/GensrcModuleLoaderMap.gmk +++ b/jdk/make/gensrc/GensrcModuleLoaderMap.gmk @@ -1,5 +1,5 @@ # -# Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2015, 2016, 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 diff --git a/jdk/make/gensrc/GensrcVarHandles.gmk b/jdk/make/gensrc/GensrcVarHandles.gmk index b4a2bab9873..773c0f4c109 100644 --- a/jdk/make/gensrc/GensrcVarHandles.gmk +++ b/jdk/make/gensrc/GensrcVarHandles.gmk @@ -1,5 +1,5 @@ # -# Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2015, 2016, 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 diff --git a/jdk/make/launcher/Launcher-java.scripting.gmk b/jdk/make/launcher/Launcher-java.scripting.gmk index 18b8ad46d45..057d2bf3aca 100644 --- a/jdk/make/launcher/Launcher-java.scripting.gmk +++ b/jdk/make/launcher/Launcher-java.scripting.gmk @@ -1,5 +1,5 @@ # -# Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2011, 2016, 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 diff --git a/jdk/make/launcher/Launcher-jdk.compiler.gmk b/jdk/make/launcher/Launcher-jdk.compiler.gmk index 9c85acecdcc..5a1637d1dc0 100644 --- a/jdk/make/launcher/Launcher-jdk.compiler.gmk +++ b/jdk/make/launcher/Launcher-jdk.compiler.gmk @@ -1,5 +1,5 @@ # -# Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2011, 2016, 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 diff --git a/jdk/make/launcher/Launcher-jdk.javadoc.gmk b/jdk/make/launcher/Launcher-jdk.javadoc.gmk index 04bc99baf7e..534a9d97341 100644 --- a/jdk/make/launcher/Launcher-jdk.javadoc.gmk +++ b/jdk/make/launcher/Launcher-jdk.javadoc.gmk @@ -1,5 +1,5 @@ # -# Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2011, 2016, 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 diff --git a/jdk/make/launcher/Launcher-jdk.jdeps.gmk b/jdk/make/launcher/Launcher-jdk.jdeps.gmk index 4a69deede07..db29ecd88da 100644 --- a/jdk/make/launcher/Launcher-jdk.jdeps.gmk +++ b/jdk/make/launcher/Launcher-jdk.jdeps.gmk @@ -1,5 +1,5 @@ # -# Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2015, 2016, 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 diff --git a/jdk/make/launcher/Launcher-jdk.jlink.gmk b/jdk/make/launcher/Launcher-jdk.jlink.gmk index bd270b0dc0a..92cb61e5572 100644 --- a/jdk/make/launcher/Launcher-jdk.jlink.gmk +++ b/jdk/make/launcher/Launcher-jdk.jlink.gmk @@ -1,5 +1,5 @@ # -# Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2015, 2016, 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 diff --git a/jdk/make/launcher/Launcher-jdk.jstatd.gmk b/jdk/make/launcher/Launcher-jdk.jstatd.gmk index ee0ba2ad61d..aeb58557ff3 100644 --- a/jdk/make/launcher/Launcher-jdk.jstatd.gmk +++ b/jdk/make/launcher/Launcher-jdk.jstatd.gmk @@ -1,5 +1,5 @@ # -# Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2011, 2016, 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 diff --git a/jdk/make/launcher/Launcher-jdk.pack200.gmk b/jdk/make/launcher/Launcher-jdk.pack200.gmk index af050554a79..32b29b0c598 100644 --- a/jdk/make/launcher/Launcher-jdk.pack200.gmk +++ b/jdk/make/launcher/Launcher-jdk.pack200.gmk @@ -1,5 +1,5 @@ # -# Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2011, 2016, 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 @@ -58,10 +58,6 @@ else endif -ifeq ($(OPENJDK_TARGET_OS), solaris) - UNPACKEXE_TOOLCHAIN := TOOLCHAIN_LINK_CXX -endif - UNPACK_MAPFILE_DIR := $(JDK_TOPDIR)/make/mapfiles/libunpack UNPACK_MAPFILE_PLATFORM_FILE := \ $(UNPACK_MAPFILE_DIR)/mapfile-vers-unpack200-$(OPENJDK_TARGET_OS)-$(OPENJDK_TARGET_CPU_ARCH) @@ -79,7 +75,7 @@ endif $(eval $(call SetupNativeCompilation,BUILD_UNPACKEXE, \ SRC := $(UNPACKEXE_SRC), \ - TOOLCHAIN := $(UNPACKEXE_TOOLCHAIN), \ + TOOLCHAIN := TOOLCHAIN_LINK_CXX, \ OPTIMIZATION := LOW, \ CFLAGS := $(UNPACKEXE_CFLAGS) $(CXXFLAGS_JDKEXE) -DFULL, \ CFLAGS_release := -DPRODUCT, \ diff --git a/jdk/make/launcher/Launcher-jdk.scripting.nashorn.shell.gmk b/jdk/make/launcher/Launcher-jdk.scripting.nashorn.shell.gmk index 5cb872ae5cf..82311e69fd6 100644 --- a/jdk/make/launcher/Launcher-jdk.scripting.nashorn.shell.gmk +++ b/jdk/make/launcher/Launcher-jdk.scripting.nashorn.shell.gmk @@ -1,5 +1,5 @@ # -# Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2011, 2016, 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 diff --git a/jdk/make/lib/CoreLibraries.gmk b/jdk/make/lib/CoreLibraries.gmk index a5417be9985..345c4253389 100644 --- a/jdk/make/lib/CoreLibraries.gmk +++ b/jdk/make/lib/CoreLibraries.gmk @@ -255,7 +255,7 @@ $(eval $(call SetupNativeCompilation,BUILD_LIBJIMAGE, \ CXXFLAGS := $(CXXFLAGS_JDKLIB) $(JIMAGELIB_CPPFLAGS), \ CFLAGS_unix := -UDEBUG, \ MAPFILE := $(JDK_TOPDIR)/make/mapfiles/libjimage/mapfile-vers, \ - LDFLAGS := $(LDFLAGS_JDKLIB) \ + LDFLAGS := $(LDFLAGS_JDKLIB) $(LDFLAGS_CXX_JDK) \ $(call SET_SHARED_LIBRARY_ORIGIN), \ LDFLAGS_windows := -export:JIMAGE_Open -export:JIMAGE_Close \ -export:JIMAGE_PackageToModule \ diff --git a/jdk/make/lib/Lib-java.desktop.gmk b/jdk/make/lib/Lib-java.desktop.gmk index 5433fe96acb..1043ce777f2 100644 --- a/jdk/make/lib/Lib-java.desktop.gmk +++ b/jdk/make/lib/Lib-java.desktop.gmk @@ -1,5 +1,5 @@ # -# Copyright (c) 2011, 2014, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2011, 2016, 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 diff --git a/jdk/make/rmic/Rmic-java.management.gmk b/jdk/make/rmic/Rmic-java.management.gmk index 0452d5cbba5..0feaac3b88b 100644 --- a/jdk/make/rmic/Rmic-java.management.gmk +++ b/jdk/make/rmic/Rmic-java.management.gmk @@ -1,5 +1,5 @@ # -# Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2011, 2016, 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 diff --git a/jdk/make/rmic/RmicCommon.gmk b/jdk/make/rmic/RmicCommon.gmk index 611276ae467..bfc5b859b54 100644 --- a/jdk/make/rmic/RmicCommon.gmk +++ b/jdk/make/rmic/RmicCommon.gmk @@ -1,5 +1,5 @@ # -# Copyright (c) 2011, 2014, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2011, 2016, 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 diff --git a/jdk/src/java.base/share/classes/java/lang/module/ModuleFinder.java b/jdk/src/java.base/share/classes/java/lang/module/ModuleFinder.java index a108e467a33..9dd5b54c8cc 100644 --- a/jdk/src/java.base/share/classes/java/lang/module/ModuleFinder.java +++ b/jdk/src/java.base/share/classes/java/lang/module/ModuleFinder.java @@ -33,7 +33,6 @@ import java.nio.file.Paths; import java.security.AccessController; import java.security.Permission; import java.security.PrivilegedAction; -import java.util.Arrays; import java.util.Collections; import java.util.HashMap; import java.util.HashSet; @@ -333,7 +332,7 @@ public interface ModuleFinder { * *
When locating modules then any exceptions or errors thrown by the * {@code find} or {@code findAll} methods of the underlying module finders - * will be propogated to the caller of the resulting module finder's + * will be propagated to the caller of the resulting module finder's * {@code find} or {@code findAll} methods.
* * @param finders @@ -342,8 +341,8 @@ public interface ModuleFinder { * @return A {@code ModuleFinder} that composes a sequence of module finders */ static ModuleFinder compose(ModuleFinder... finders) { - final List{@code
* try (FileTreeIterator iterator = new FileTreeIterator(start, maxDepth, options)) {
@@ -62,7 +61,7 @@ class FileTreeIterator implements Iterator, Closeable {
* @throws SecurityException
* if the security manager denies access to the starting file
* @throws NullPointerException
- * if {@code start} or {@code options} is {@ocde null} or
+ * if {@code start} or {@code options} is {@code null} or
* the options array contains a {@code null} element
*/
FileTreeIterator(Path start, int maxDepth, FileVisitOption... options)
diff --git a/jdk/src/java.base/share/classes/java/nio/file/FileTreeWalker.java b/jdk/src/java.base/share/classes/java/nio/file/FileTreeWalker.java
index 13bb629807f..b7dc93ad0f5 100644
--- a/jdk/src/java.base/share/classes/java/nio/file/FileTreeWalker.java
+++ b/jdk/src/java.base/share/classes/java/nio/file/FileTreeWalker.java
@@ -171,7 +171,7 @@ class FileTreeWalker implements Closeable {
* if {@code options} contains an element that is not a
* {@code FileVisitOption}
* @throws NullPointerException
- * if {@code options} is {@ocde null} or the options
+ * if {@code options} is {@code null} or the options
* array contains a {@code null} element
*/
FileTreeWalker(Collection options, int maxDepth) {
diff --git a/jdk/src/java.base/share/classes/java/security/KeyStoreSpi.java b/jdk/src/java.base/share/classes/java/security/KeyStoreSpi.java
index 65ede7a2a83..096a7b48dc1 100644
--- a/jdk/src/java.base/share/classes/java/security/KeyStoreSpi.java
+++ b/jdk/src/java.base/share/classes/java/security/KeyStoreSpi.java
@@ -479,6 +479,10 @@ public abstract class KeyStoreSpi {
} else if (engineIsKeyEntry(alias)) {
KeyStore.PasswordProtection pp =
(KeyStore.PasswordProtection)protParam;
+ if (pp.getProtectionAlgorithm() != null) {
+ throw new KeyStoreException(
+ "unsupported password protection algorithm");
+ }
char[] password = pp.getPassword();
Key key = engineGetKey(alias, password);
@@ -524,6 +528,10 @@ public abstract class KeyStoreSpi {
KeyStore.PasswordProtection pProtect = null;
if (protParam != null) {
pProtect = (KeyStore.PasswordProtection)protParam;
+ if (pProtect.getProtectionAlgorithm() != null) {
+ throw new KeyStoreException(
+ "unsupported password protection algorithm");
+ }
}
// set entry
diff --git a/jdk/src/java.base/share/classes/java/security/MessageDigest.java b/jdk/src/java.base/share/classes/java/security/MessageDigest.java
index 3c08a64fbf8..b6959f5db4f 100644
--- a/jdk/src/java.base/share/classes/java/security/MessageDigest.java
+++ b/jdk/src/java.base/share/classes/java/security/MessageDigest.java
@@ -32,10 +32,13 @@ import java.io.ByteArrayOutputStream;
import java.io.PrintStream;
import java.io.InputStream;
import java.io.ByteArrayInputStream;
-
+import java.security.InvalidKeyException;
import java.nio.ByteBuffer;
import sun.security.util.Debug;
+import sun.security.util.MessageDigestSpi2;
+
+import javax.crypto.SecretKey;
/**
* This MessageDigest class provides applications the functionality of a
@@ -548,7 +551,7 @@ public abstract class MessageDigest extends MessageDigestSpi {
* and its original parent (Object).
*/
- static class Delegate extends MessageDigest {
+ static class Delegate extends MessageDigest implements MessageDigestSpi2 {
// The provider implementation (delegate)
private MessageDigestSpi digestSpi;
@@ -601,6 +604,14 @@ public abstract class MessageDigest extends MessageDigestSpi {
digestSpi.engineUpdate(input);
}
+ public void engineUpdate(SecretKey key) throws InvalidKeyException {
+ if (digestSpi instanceof MessageDigestSpi2) {
+ ((MessageDigestSpi2)digestSpi).engineUpdate(key);
+ } else {
+ throw new UnsupportedOperationException
+ ("Digest does not support update of SecretKey object");
+ }
+ }
protected byte[] engineDigest() {
return digestSpi.engineDigest();
}
diff --git a/jdk/src/java.base/share/classes/java/security/Signature.java b/jdk/src/java.base/share/classes/java/security/Signature.java
index 7efa9c9a7e6..9bfe4667df6 100644
--- a/jdk/src/java.base/share/classes/java/security/Signature.java
+++ b/jdk/src/java.base/share/classes/java/security/Signature.java
@@ -37,7 +37,6 @@ import java.nio.ByteBuffer;
import java.security.Provider.Service;
import javax.crypto.Cipher;
-import javax.crypto.CipherSpi;
import javax.crypto.IllegalBlockSizeException;
import javax.crypto.BadPaddingException;
import javax.crypto.NoSuchPaddingException;
@@ -180,15 +179,12 @@ public abstract class Signature extends SignatureSpi {
private static final String RSA_CIPHER = "RSA/ECB/PKCS1Padding";
// all the services we need to lookup for compatibility with Cipher
- private static final List rsaIds = Arrays.asList(
- new ServiceId[] {
- new ServiceId("Signature", "NONEwithRSA"),
- new ServiceId("Cipher", "RSA/ECB/PKCS1Padding"),
- new ServiceId("Cipher", "RSA/ECB"),
- new ServiceId("Cipher", "RSA//PKCS1Padding"),
- new ServiceId("Cipher", "RSA"),
- }
- );
+ private static final List rsaIds = List.of(
+ new ServiceId("Signature", "NONEwithRSA"),
+ new ServiceId("Cipher", "RSA/ECB/PKCS1Padding"),
+ new ServiceId("Cipher", "RSA/ECB"),
+ new ServiceId("Cipher", "RSA//PKCS1Padding"),
+ new ServiceId("Cipher", "RSA"));
/**
* Returns a Signature object that implements the specified signature
diff --git a/jdk/src/java.base/share/classes/java/time/Duration.java b/jdk/src/java.base/share/classes/java/time/Duration.java
index e2c55a971ea..cacd3999a83 100644
--- a/jdk/src/java.base/share/classes/java/time/Duration.java
+++ b/jdk/src/java.base/share/classes/java/time/Duration.java
@@ -88,8 +88,6 @@ import java.time.temporal.Temporal;
import java.time.temporal.TemporalAmount;
import java.time.temporal.TemporalUnit;
import java.time.temporal.UnsupportedTemporalTypeException;
-import java.util.Arrays;
-import java.util.Collections;
import java.util.List;
import java.util.Objects;
import java.util.regex.Matcher;
@@ -578,8 +576,7 @@ public final class Duration
* the simple initialization in Duration.
*/
private static class DurationUnits {
- static final List UNITS =
- Collections.unmodifiableList(Arrays.asList(SECONDS, NANOS));
+ static final List UNITS = List.of(SECONDS, NANOS);
}
//-----------------------------------------------------------------------
diff --git a/jdk/src/java.base/share/classes/java/time/Instant.java b/jdk/src/java.base/share/classes/java/time/Instant.java
index 3fd40d04d9c..6e0dba1d506 100644
--- a/jdk/src/java.base/share/classes/java/time/Instant.java
+++ b/jdk/src/java.base/share/classes/java/time/Instant.java
@@ -610,7 +610,7 @@ public final class Instant
*
* The epoch second count is a simple incrementing count of seconds where
* second 0 is 1970-01-01T00:00:00Z.
- * The nanosecond part of the day is returned by {@code getNanosOfSecond}.
+ * The nanosecond part of the day is returned by {@link #getNano}.
*
* @return the seconds from the epoch of 1970-01-01T00:00:00Z
*/
@@ -623,7 +623,7 @@ public final class Instant
* of the second.
*
* The nanosecond-of-second value measures the total number of nanoseconds from
- * the second returned by {@code getEpochSecond}.
+ * the second returned by {@link #getEpochSecond}.
*
* @return the nanoseconds within the second, always positive, never exceeds 999,999,999
*/
diff --git a/jdk/src/java.base/share/classes/java/time/Period.java b/jdk/src/java.base/share/classes/java/time/Period.java
index c7c04435262..e93d8a35d99 100644
--- a/jdk/src/java.base/share/classes/java/time/Period.java
+++ b/jdk/src/java.base/share/classes/java/time/Period.java
@@ -83,8 +83,6 @@ import java.time.temporal.TemporalAmount;
import java.time.temporal.TemporalQueries;
import java.time.temporal.TemporalUnit;
import java.time.temporal.UnsupportedTemporalTypeException;
-import java.util.Arrays;
-import java.util.Collections;
import java.util.List;
import java.util.Objects;
import java.util.regex.Matcher;
@@ -152,8 +150,7 @@ public final class Period
/**
* The set of supported units.
*/
- private static final List SUPPORTED_UNITS =
- Collections.unmodifiableList(Arrays.asList(YEARS, MONTHS, DAYS));
+ private static final List SUPPORTED_UNITS = List.of(YEARS, MONTHS, DAYS);
/**
* The number of years.
diff --git a/jdk/src/java.base/share/classes/java/time/ZoneId.java b/jdk/src/java.base/share/classes/java/time/ZoneId.java
index bae99f601cc..5087888da4f 100644
--- a/jdk/src/java.base/share/classes/java/time/ZoneId.java
+++ b/jdk/src/java.base/share/classes/java/time/ZoneId.java
@@ -76,14 +76,14 @@ import java.time.temporal.UnsupportedTemporalTypeException;
import java.time.zone.ZoneRules;
import java.time.zone.ZoneRulesException;
import java.time.zone.ZoneRulesProvider;
-import java.util.Collections;
-import java.util.HashMap;
import java.util.Locale;
import java.util.Map;
import java.util.Objects;
import java.util.Set;
import java.util.TimeZone;
+import static java.util.Map.entry;
+
/**
* A time-zone ID, such as {@code Europe/Paris}.
*
@@ -220,39 +220,36 @@ public abstract class ZoneId implements Serializable {
*
* The map is unmodifiable.
*/
- public static final Map SHORT_IDS;
- static {
- Map map = new HashMap<>(64);
- map.put("ACT", "Australia/Darwin");
- map.put("AET", "Australia/Sydney");
- map.put("AGT", "America/Argentina/Buenos_Aires");
- map.put("ART", "Africa/Cairo");
- map.put("AST", "America/Anchorage");
- map.put("BET", "America/Sao_Paulo");
- map.put("BST", "Asia/Dhaka");
- map.put("CAT", "Africa/Harare");
- map.put("CNT", "America/St_Johns");
- map.put("CST", "America/Chicago");
- map.put("CTT", "Asia/Shanghai");
- map.put("EAT", "Africa/Addis_Ababa");
- map.put("ECT", "Europe/Paris");
- map.put("IET", "America/Indiana/Indianapolis");
- map.put("IST", "Asia/Kolkata");
- map.put("JST", "Asia/Tokyo");
- map.put("MIT", "Pacific/Apia");
- map.put("NET", "Asia/Yerevan");
- map.put("NST", "Pacific/Auckland");
- map.put("PLT", "Asia/Karachi");
- map.put("PNT", "America/Phoenix");
- map.put("PRT", "America/Puerto_Rico");
- map.put("PST", "America/Los_Angeles");
- map.put("SST", "Pacific/Guadalcanal");
- map.put("VST", "Asia/Ho_Chi_Minh");
- map.put("EST", "-05:00");
- map.put("MST", "-07:00");
- map.put("HST", "-10:00");
- SHORT_IDS = Collections.unmodifiableMap(map);
- }
+ public static final Map SHORT_IDS = Map.ofEntries(
+ entry("ACT", "Australia/Darwin"),
+ entry("AET", "Australia/Sydney"),
+ entry("AGT", "America/Argentina/Buenos_Aires"),
+ entry("ART", "Africa/Cairo"),
+ entry("AST", "America/Anchorage"),
+ entry("BET", "America/Sao_Paulo"),
+ entry("BST", "Asia/Dhaka"),
+ entry("CAT", "Africa/Harare"),
+ entry("CNT", "America/St_Johns"),
+ entry("CST", "America/Chicago"),
+ entry("CTT", "Asia/Shanghai"),
+ entry("EAT", "Africa/Addis_Ababa"),
+ entry("ECT", "Europe/Paris"),
+ entry("IET", "America/Indiana/Indianapolis"),
+ entry("IST", "Asia/Kolkata"),
+ entry("JST", "Asia/Tokyo"),
+ entry("MIT", "Pacific/Apia"),
+ entry("NET", "Asia/Yerevan"),
+ entry("NST", "Pacific/Auckland"),
+ entry("PLT", "Asia/Karachi"),
+ entry("PNT", "America/Phoenix"),
+ entry("PRT", "America/Puerto_Rico"),
+ entry("PST", "America/Los_Angeles"),
+ entry("SST", "Pacific/Guadalcanal"),
+ entry("VST", "Asia/Ho_Chi_Minh"),
+ entry("EST", "-05:00"),
+ entry("MST", "-07:00"),
+ entry("HST", "-10:00")
+ );
/**
* Serialization version.
*/
diff --git a/jdk/src/java.base/share/classes/java/time/chrono/ChronoPeriodImpl.java b/jdk/src/java.base/share/classes/java/time/chrono/ChronoPeriodImpl.java
index 911144d5b04..646af14d05a 100644
--- a/jdk/src/java.base/share/classes/java/time/chrono/ChronoPeriodImpl.java
+++ b/jdk/src/java.base/share/classes/java/time/chrono/ChronoPeriodImpl.java
@@ -77,8 +77,6 @@ import java.time.temporal.TemporalQueries;
import java.time.temporal.TemporalUnit;
import java.time.temporal.UnsupportedTemporalTypeException;
import java.time.temporal.ValueRange;
-import java.util.Arrays;
-import java.util.Collections;
import java.util.List;
import java.util.Objects;
@@ -105,8 +103,7 @@ final class ChronoPeriodImpl
/**
* The set of supported units.
*/
- private static final List SUPPORTED_UNITS =
- Collections.unmodifiableList(Arrays.asList(YEARS, MONTHS, DAYS));
+ private static final List SUPPORTED_UNITS = List.of(YEARS, MONTHS, DAYS);
/**
* The chronology.
diff --git a/jdk/src/java.base/share/classes/java/time/chrono/HijrahChronology.java b/jdk/src/java.base/share/classes/java/time/chrono/HijrahChronology.java
index ebe4e8a29d4..d61c2333303 100644
--- a/jdk/src/java.base/share/classes/java/time/chrono/HijrahChronology.java
+++ b/jdk/src/java.base/share/classes/java/time/chrono/HijrahChronology.java
@@ -59,10 +59,7 @@ package java.time.chrono;
import static java.time.temporal.ChronoField.EPOCH_DAY;
-import java.io.File;
-import java.io.FileInputStream;
import java.io.FilePermission;
-import java.io.IOException;
import java.io.InputStream;
import java.io.InvalidObjectException;
import java.io.ObjectInputStream;
@@ -83,7 +80,6 @@ import java.util.Arrays;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
-import java.util.Objects;
import java.util.Properties;
import sun.util.logging.PlatformLogger;
@@ -512,7 +508,7 @@ public final class HijrahChronology extends AbstractChronology implements Serial
@Override
public List eras() {
- return Arrays.asList(HijrahEra.values());
+ return List.of(HijrahEra.values());
}
//-----------------------------------------------------------------------
diff --git a/jdk/src/java.base/share/classes/java/time/chrono/IsoChronology.java b/jdk/src/java.base/share/classes/java/time/chrono/IsoChronology.java
index 7ce8e4ba21a..4919b3d7d3a 100644
--- a/jdk/src/java.base/share/classes/java/time/chrono/IsoChronology.java
+++ b/jdk/src/java.base/share/classes/java/time/chrono/IsoChronology.java
@@ -90,7 +90,6 @@ import java.time.temporal.ChronoField;
import java.time.temporal.TemporalAccessor;
import java.time.temporal.TemporalField;
import java.time.temporal.ValueRange;
-import java.util.Arrays;
import java.util.List;
import java.util.Locale;
import java.util.Map;
@@ -492,7 +491,7 @@ public final class IsoChronology extends AbstractChronology implements Serializa
@Override
public List eras() {
- return Arrays.asList(IsoEra.values());
+ return List.of(IsoEra.values());
}
//-----------------------------------------------------------------------
diff --git a/jdk/src/java.base/share/classes/java/time/chrono/JapaneseChronology.java b/jdk/src/java.base/share/classes/java/time/chrono/JapaneseChronology.java
index 2bd38c8d755..4478c4c7de1 100644
--- a/jdk/src/java.base/share/classes/java/time/chrono/JapaneseChronology.java
+++ b/jdk/src/java.base/share/classes/java/time/chrono/JapaneseChronology.java
@@ -81,7 +81,6 @@ import java.time.temporal.TemporalAdjusters;
import java.time.temporal.TemporalField;
import java.time.temporal.UnsupportedTemporalTypeException;
import java.time.temporal.ValueRange;
-import java.util.Arrays;
import java.util.Calendar;
import java.util.List;
import java.util.Locale;
@@ -379,7 +378,7 @@ public final class JapaneseChronology extends AbstractChronology implements Seri
@Override
public List eras() {
- return Arrays.asList(JapaneseEra.values());
+ return List.of(JapaneseEra.values());
}
JapaneseEra getCurrentEra() {
diff --git a/jdk/src/java.base/share/classes/java/time/chrono/MinguoChronology.java b/jdk/src/java.base/share/classes/java/time/chrono/MinguoChronology.java
index 8159adc0ac5..fd6fdc3e8cd 100644
--- a/jdk/src/java.base/share/classes/java/time/chrono/MinguoChronology.java
+++ b/jdk/src/java.base/share/classes/java/time/chrono/MinguoChronology.java
@@ -72,7 +72,6 @@ import java.time.temporal.ChronoField;
import java.time.temporal.TemporalAccessor;
import java.time.temporal.TemporalField;
import java.time.temporal.ValueRange;
-import java.util.Arrays;
import java.util.List;
import java.util.Locale;
import java.util.Map;
@@ -306,7 +305,7 @@ public final class MinguoChronology extends AbstractChronology implements Serial
@Override
public List eras() {
- return Arrays.asList(MinguoEra.values());
+ return List.of(MinguoEra.values());
}
//-----------------------------------------------------------------------
diff --git a/jdk/src/java.base/share/classes/java/time/chrono/ThaiBuddhistChronology.java b/jdk/src/java.base/share/classes/java/time/chrono/ThaiBuddhistChronology.java
index 6412c9dab15..c6938b2c530 100644
--- a/jdk/src/java.base/share/classes/java/time/chrono/ThaiBuddhistChronology.java
+++ b/jdk/src/java.base/share/classes/java/time/chrono/ThaiBuddhistChronology.java
@@ -342,7 +342,7 @@ public final class ThaiBuddhistChronology extends AbstractChronology implements
@Override
public List eras() {
- return Arrays.asList(ThaiBuddhistEra.values());
+ return List.of(ThaiBuddhistEra.values());
}
//-----------------------------------------------------------------------
diff --git a/jdk/src/java.base/share/classes/java/time/format/DateTimeFormatter.java b/jdk/src/java.base/share/classes/java/time/format/DateTimeFormatter.java
index ec5fd9c8086..a3f903a7d9a 100644
--- a/jdk/src/java.base/share/classes/java/time/format/DateTimeFormatter.java
+++ b/jdk/src/java.base/share/classes/java/time/format/DateTimeFormatter.java
@@ -1685,6 +1685,7 @@ public final class DateTimeFormatter {
public DateTimeFormatter withResolverFields(TemporalField... resolverFields) {
Set fields = null;
if (resolverFields != null) {
+ // Set.of cannot be used because it is hostile to nulls and duplicate elements
fields = Collections.unmodifiableSet(new HashSet<>(Arrays.asList(resolverFields)));
}
if (Objects.equals(this.resolverFields, fields)) {
diff --git a/jdk/src/java.base/share/classes/java/time/zone/ZoneOffsetTransition.java b/jdk/src/java.base/share/classes/java/time/zone/ZoneOffsetTransition.java
index c1568e46364..94264f32cce 100644
--- a/jdk/src/java.base/share/classes/java/time/zone/ZoneOffsetTransition.java
+++ b/jdk/src/java.base/share/classes/java/time/zone/ZoneOffsetTransition.java
@@ -387,9 +387,9 @@ public final class ZoneOffsetTransition
*/
List getValidOffsets() {
if (isGap()) {
- return Collections.emptyList();
+ return List.of();
}
- return Arrays.asList(getOffsetBefore(), getOffsetAfter());
+ return List.of(getOffsetBefore(), getOffsetAfter());
}
//-----------------------------------------------------------------------
diff --git a/jdk/src/java.base/share/classes/java/time/zone/ZoneRules.java b/jdk/src/java.base/share/classes/java/time/zone/ZoneRules.java
index f6154857b8d..ed2330f38ef 100644
--- a/jdk/src/java.base/share/classes/java/time/zone/ZoneRules.java
+++ b/jdk/src/java.base/share/classes/java/time/zone/ZoneRules.java
@@ -303,7 +303,6 @@ public final class ZoneRules implements Serializable {
* Creates an instance of ZoneRules that has fixed zone rules.
*
* @param offset the offset this fixed zone rules is based on, not null
- * @return the zone rules, not null
* @see #isFixedOffset()
*/
private ZoneRules(ZoneOffset offset) {
@@ -970,7 +969,7 @@ public final class ZoneRules implements Serializable {
* @return an immutable list of transition rules, not null
*/
public List getTransitionRules() {
- return Collections.unmodifiableList(Arrays.asList(lastRules));
+ return List.of(lastRules);
}
/**
diff --git a/jdk/src/java.base/share/classes/java/util/Date.java b/jdk/src/java.base/share/classes/java/util/Date.java
index 017ea0fef01..bb9494766bd 100644
--- a/jdk/src/java.base/share/classes/java/util/Date.java
+++ b/jdk/src/java.base/share/classes/java/util/Date.java
@@ -85,12 +85,12 @@ import sun.util.calendar.ZoneInfo;
* further information is the U.S. Naval Observatory, particularly
* the Directorate of Time at:
*
- * http://tycho.usno.navy.mil
+ * http://www.usno.navy.mil
*
*
* and their definitions of "Systems of Time" at:
*
- * http://tycho.usno.navy.mil/systime.html
+ * http://www.usno.navy.mil/USNO/time/master-clock/systems-of-time
*
*
* In all methods of class {@code Date} that accept or return
diff --git a/jdk/src/java.base/share/classes/java/util/ResourceBundle.java b/jdk/src/java.base/share/classes/java/util/ResourceBundle.java
index bc7aaae063e..1d84e2dee6b 100644
--- a/jdk/src/java.base/share/classes/java/util/ResourceBundle.java
+++ b/jdk/src/java.base/share/classes/java/util/ResourceBundle.java
@@ -2491,34 +2491,29 @@ public abstract class ResourceBundle {
/**
* The default format List, which contains the strings
* "java.class" and "java.properties", in
- * this order. This List is {@linkplain
- * Collections#unmodifiableList(List) unmodifiable}.
+ * this order. This List is unmodifiable.
*
* @see #getFormats(String)
*/
public static final List FORMAT_DEFAULT
- = Collections.unmodifiableList(Arrays.asList("java.class",
- "java.properties"));
+ = List.of("java.class", "java.properties");
/**
* The class-only format List containing
- * "java.class". This List is {@linkplain
- * Collections#unmodifiableList(List) unmodifiable}.
+ * "java.class". This List is unmodifiable.
*
* @see #getFormats(String)
*/
- public static final List FORMAT_CLASS
- = Collections.unmodifiableList(Arrays.asList("java.class"));
+ public static final List FORMAT_CLASS = List.of("java.class");
/**
* The properties-only format List containing
- * "java.properties". This List is
- * {@linkplain Collections#unmodifiableList(List) unmodifiable}.
+ * "java.properties". This List is unmodifiable.
*
* @see #getFormats(String)
*/
public static final List FORMAT_PROPERTIES
- = Collections.unmodifiableList(Arrays.asList("java.properties"));
+ = List.of("java.properties");
/**
* The time-to-live constant for not caching loaded resource bundle
diff --git a/jdk/src/java.base/share/classes/java/util/spi/ToolProvider.java b/jdk/src/java.base/share/classes/java/util/spi/ToolProvider.java
index 850f1df24ee..1d96cd1f326 100644
--- a/jdk/src/java.base/share/classes/java/util/spi/ToolProvider.java
+++ b/jdk/src/java.base/share/classes/java/util/spi/ToolProvider.java
@@ -56,8 +56,8 @@ public interface ToolProvider {
/**
* Returns the name of this tool provider.
*
- * @apiNote It is recommended that the name be the same as would be used on
- * the command line: for example, "javac", "jar", "jlink".
+ * @apiNote It is recommended that the name be the same as would be
+ * used on the command line: for example, "javac", "jar", "jlink".
*
* @return the name of this tool provider
*/
@@ -67,12 +67,13 @@ public interface ToolProvider {
* Runs an instance of the tool, returning zero for a successful run.
* Any non-zero return value indicates a tool-specific error during the
* execution.
+ *
* Two streams should be provided, for "expected" output, and for any
* error messages. If it is not necessary to distinguish the output,
* the same stream may be used for both.
*
* @apiNote The interpretation of the arguments will be specific to
- * each tool.
+ * each tool.
*
* @param out a stream to which "expected" output should be written
*
@@ -81,12 +82,13 @@ public interface ToolProvider {
* @param args the command-line arguments for the tool
*
* @return the result of executing the tool.
- * A return value of 0 means the tool did not encounter any errors;
- * any other value indicates that at least one error occurred during
- * execution.
+ * A return value of 0 means the tool did not encounter any errors;
+ * any other value indicates that at least one error occurred
+ * during execution.
*
* @throws NullPointerException if any of the arguments are {@code null},
- * or if there are any {@code null} values in the {@code args} array
+ * or if there are any {@code null} values in the {@code args}
+ * array
*/
int run(PrintWriter out, PrintWriter err, String... args);
@@ -94,16 +96,17 @@ public interface ToolProvider {
* Runs an instance of the tool, returning zero for a successful run.
* Any non-zero return value indicates a tool-specific error during the
* execution.
+ *
* Two streams should be provided, for "expected" output, and for any
* error messages. If it is not necessary to distinguish the output,
* the same stream may be used for both.
*
* @apiNote The interpretation of the arguments will be specific to
- * each tool.
+ * each tool.
*
* @implNote This implementation wraps the {@code out} and {@code err}
- * streams within {@link PrintWriter}s, and then calls
- * {@link run(PrintWriter, PrintWriter, String[])}.
+ * streams within {@link PrintWriter}s, and then calls
+ * {@link #run(PrintWriter, PrintWriter, String[])}.
*
* @param out a stream to which "expected" output should be written
*
@@ -112,12 +115,13 @@ public interface ToolProvider {
* @param args the command-line arguments for the tool
*
* @return the result of executing the tool.
- * A return value of 0 means the tool did not encounter any errors;
- * any other value indicates that at least one error occurred during
- * execution.
+ * A return value of 0 means the tool did not encounter any errors;
+ * any other value indicates that at least one error occurred
+ * during execution.
*
* @throws NullPointerException if any of the arguments are {@code null},
- * or if there are any {@code null} values in the {@code args} array
+ * or if there are any {@code null} values in the {@code args}
+ * array
*/
default int run(PrintStream out, PrintStream err, String... args) {
Objects.requireNonNull(out);
diff --git a/jdk/src/java.base/share/classes/java/util/stream/Collectors.java b/jdk/src/java.base/share/classes/java/util/stream/Collectors.java
index 018bb5fc1b6..fd7b0a477fa 100644
--- a/jdk/src/java.base/share/classes/java/util/stream/Collectors.java
+++ b/jdk/src/java.base/share/classes/java/util/stream/Collectors.java
@@ -27,7 +27,6 @@ package java.util.stream;
import java.util.AbstractMap;
import java.util.AbstractSet;
import java.util.ArrayList;
-import java.util.Arrays;
import java.util.Collection;
import java.util.Collections;
import java.util.Comparator;
@@ -1720,12 +1719,12 @@ public final class Collectors {
@Override
public Set> entrySet() {
- return new AbstractSet>() {
+ return new AbstractSet<>() {
@Override
public Iterator> iterator() {
Map.Entry falseEntry = new SimpleImmutableEntry<>(false, forFalse);
Map.Entry trueEntry = new SimpleImmutableEntry<>(true, forTrue);
- return Arrays.asList(falseEntry, trueEntry).iterator();
+ return List.of(falseEntry, trueEntry).iterator();
}
@Override
diff --git a/jdk/src/java.base/share/classes/java/util/stream/Stream.java b/jdk/src/java.base/share/classes/java/util/stream/Stream.java
index 62ed4c82b6e..1ec21ed2b57 100644
--- a/jdk/src/java.base/share/classes/java/util/stream/Stream.java
+++ b/jdk/src/java.base/share/classes/java/util/stream/Stream.java
@@ -282,7 +282,7 @@ public interface Stream extends BaseStream> {
*/
Stream flatMap(Function super T, ? extends Stream extends R>> mapper);
- /**:
+ /**
* Returns an {@code IntStream} consisting of the results of replacing each
* element of this stream with the contents of a mapped stream produced by
* applying the provided mapping function to each element. Each mapped
diff --git a/jdk/src/java.base/share/classes/module-info.java b/jdk/src/java.base/share/classes/module-info.java
index 4cb223881bc..e376a502579 100644
--- a/jdk/src/java.base/share/classes/module-info.java
+++ b/jdk/src/java.base/share/classes/module-info.java
@@ -154,7 +154,6 @@ module java.base {
exports jdk.internal.module to
java.instrument,
java.management,
- jdk.dynalink,
jdk.jartool,
jdk.jlink;
exports jdk.internal.misc to
diff --git a/jdk/src/java.base/share/classes/sun/nio/cs/HKSCS.java b/jdk/src/java.base/share/classes/sun/nio/cs/HKSCS.java
index ed920e74ade..1b166447b78 100644
--- a/jdk/src/java.base/share/classes/sun/nio/cs/HKSCS.java
+++ b/jdk/src/java.base/share/classes/sun/nio/cs/HKSCS.java
@@ -432,6 +432,8 @@ public class HKSCS {
continue;
for (int i = 0; i < s.length(); i++) {
char c = s.charAt(i);
+ if (c == UNMAPPABLE_DECODING)
+ continue;
int hi = c >> 8;
if (c2b[hi] == C2B_UNMAPPABLE) {
c2b[hi] = new char[0x100];
diff --git a/jdk/src/java.base/share/classes/sun/security/ssl/EllipticCurvesExtension.java b/jdk/src/java.base/share/classes/sun/security/ssl/EllipticCurvesExtension.java
index 632d0da18f1..d4f2848c973 100644
--- a/jdk/src/java.base/share/classes/sun/security/ssl/EllipticCurvesExtension.java
+++ b/jdk/src/java.base/share/classes/sun/security/ssl/EllipticCurvesExtension.java
@@ -282,7 +282,7 @@ final class EllipticCurvesExtension extends HelloExtension {
private static int getPreferredCurve(int[] curves,
AlgorithmConstraints constraints) {
for (int curveId : curves) {
- if (constraints.permits(
+ if (isSupported(curveId) && constraints.permits(
EnumSet.of(CryptoPrimitive.KEY_AGREEMENT),
"EC", idToParams.get(curveId))) {
return curveId;
diff --git a/jdk/src/java.base/share/classes/sun/security/ssl/HandshakeMessage.java b/jdk/src/java.base/share/classes/sun/security/ssl/HandshakeMessage.java
index b3740cfcd86..4717fbba178 100644
--- a/jdk/src/java.base/share/classes/sun/security/ssl/HandshakeMessage.java
+++ b/jdk/src/java.base/share/classes/sun/security/ssl/HandshakeMessage.java
@@ -49,6 +49,7 @@ import sun.security.internal.spec.TlsPrfParameterSpec;
import sun.security.ssl.CipherSuite.*;
import static sun.security.ssl.CipherSuite.PRF.*;
import sun.security.util.KeyUtil;
+import sun.security.util.MessageDigestSpi2;
import sun.security.provider.certpath.OCSPResponse;
/**
@@ -2124,63 +2125,14 @@ static final class CertificateVerify extends HandshakeMessage {
md.update(temp);
}
- private static final Class> delegate;
- private static final Field spiField;
-
- static {
- try {
- delegate = Class.forName("java.security.MessageDigest$Delegate");
- spiField = delegate.getDeclaredField("digestSpi");
- } catch (Exception e) {
- throw new RuntimeException("Reflection failed", e);
- }
- makeAccessible(spiField);
- }
-
- private static void makeAccessible(final AccessibleObject o) {
- AccessController.doPrivileged(new PrivilegedAction