Skip to content

Commit 57dba0b

Browse files
author
duke
committed
Merge
2 parents 1aa4740 + 4207bf7 commit 57dba0b

File tree

596 files changed

+44622
-1284
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

596 files changed

+44622
-1284
lines changed

Diff for: .hgtags-top-repo

+1
Original file line numberDiff line numberDiff line change
@@ -362,3 +362,4 @@ f900d5afd9c83a0df8f36161c27c5e4c86a66f4c jdk-9+111
362362
e882bcdbdac436523f3d5681611d3118a3804ea7 jdk-9+117
363363
047f95de8f918d8ff5e8cd2636a2abb5c3c8adb8 jdk-9+118
364364
3463a3f14f0f0e8a68f29ac6405454f2fa2f598a jdk-9+119
365+
647e0142a5a52749db572b5e6638d561def6479e jdk-9+120

Diff for: common/autoconf/configure.ac

+1
Original file line numberDiff line numberDiff line change
@@ -229,6 +229,7 @@ LIB_SETUP_LIBRARIES
229229

230230
JDKOPT_DETECT_INTREE_EC
231231
JDKOPT_ENABLE_DISABLE_FAILURE_HANDLER
232+
JDKOPT_ENABLE_DISABLE_GENERATE_CLASSLIST
232233

233234
###############################################################################
234235
#

Diff for: common/autoconf/generated-configure.sh

+58-1
Original file line numberDiff line numberDiff line change
@@ -650,6 +650,7 @@ TEST_JOBS
650650
JOBS
651651
MEMORY_SIZE
652652
NUM_CORES
653+
ENABLE_GENERATE_CLASSLIST
653654
BUILD_FAILURE_HANDLER
654655
ENABLE_INTREE_EC
655656
STLPORT_LIB
@@ -1226,6 +1227,7 @@ with_dxsdk
12261227
with_dxsdk_lib
12271228
with_dxsdk_include
12281229
enable_jtreg_failure_handler
1230+
enable_generate_classlist
12291231
with_num_cores
12301232
with_memory_size
12311233
with_jobs
@@ -2005,6 +2007,10 @@ Optional Features:
20052007
Default is auto, where the failure handler is built
20062008
if all dependencies are present and otherwise just
20072009
disabled.
2010+
--disable-generate-classlist
2011+
forces enabling or disabling of the generation of a
2012+
CDS classlist at build time. Default is to generate
2013+
it when either the server or client JVMs are built.
20082014
--enable-sjavac use sjavac to do fast incremental compiles
20092015
[disabled]
20102016
--disable-javac-server disable javac server [enabled]
@@ -4391,6 +4397,12 @@ VALID_JVM_VARIANTS="server client minimal core zero zeroshark custom"
43914397
#
43924398

43934399

4400+
################################################################################
4401+
#
4402+
# Enable or disable generation of the classlist at build time
4403+
#
4404+
4405+
43944406
#
43954407
# Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
43964408
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -5080,7 +5092,7 @@ VS_SDK_PLATFORM_NAME_2013=
50805092
#CUSTOM_AUTOCONF_INCLUDE
50815093

50825094
# Do not change or remove the following line, it is needed for consistency checks:
5083-
DATE_WHEN_GENERATED=1463732692
5095+
DATE_WHEN_GENERATED=1464173584
50845096

50855097
###############################################################################
50865098
#
@@ -64812,6 +64824,51 @@ $as_echo "yes, jtreg present" >&6; }
6481264824

6481364825

6481464826

64827+
# Check whether --enable-generate-classlist was given.
64828+
if test "${enable_generate_classlist+set}" = set; then :
64829+
enableval=$enable_generate_classlist;
64830+
fi
64831+
64832+
64833+
# Check if it's likely that it's possible to generate the classlist. Depending
64834+
# on exact jvm configuration it could be possible anyway.
64835+
if [[ " $JVM_VARIANTS " =~ " server " ]] || [[ " $JVM_VARIANTS " =~ " client " ]] ; then
64836+
ENABLE_GENERATE_CLASSLIST_POSSIBLE="true"
64837+
else
64838+
ENABLE_GENERATE_CLASSLIST_POSSIBLE="false"
64839+
fi
64840+
64841+
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if the CDS classlist generation should be enabled" >&5
64842+
$as_echo_n "checking if the CDS classlist generation should be enabled... " >&6; }
64843+
if test "x$enable_generate_classlist" = "xyes"; then
64844+
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, forced" >&5
64845+
$as_echo "yes, forced" >&6; }
64846+
ENABLE_GENERATE_CLASSLIST="true"
64847+
if test "x$ENABLE_GENERATE_CLASSLIST_POSSIBLE" = "xfalse"; then
64848+
{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Generation of classlist might not be possible with JVM Variants $JVM_VARIANTS" >&5
64849+
$as_echo "$as_me: WARNING: Generation of classlist might not be possible with JVM Variants $JVM_VARIANTS" >&2;}
64850+
fi
64851+
elif test "x$enable_generate_classlist" = "xno"; then
64852+
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no, forced" >&5
64853+
$as_echo "no, forced" >&6; }
64854+
ENABLE_GENERATE_CLASSLIST="false"
64855+
elif test "x$enable_generate_classlist" = "x"; then
64856+
if test "x$ENABLE_GENERATE_CLASSLIST_POSSIBLE" = "xtrue"; then
64857+
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
64858+
$as_echo "yes" >&6; }
64859+
ENABLE_GENERATE_CLASSLIST="true"
64860+
else
64861+
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
64862+
$as_echo "no" >&6; }
64863+
ENABLE_GENERATE_CLASSLIST="false"
64864+
fi
64865+
else
64866+
as_fn_error $? "Invalid value for --enable-generate-classlist: $enable_generate_classlist" "$LINENO" 5
64867+
fi
64868+
64869+
64870+
64871+
6481564872
###############################################################################
6481664873
#
6481764874
# Configure parts of the build that only affect the build performance,

Diff for: common/autoconf/jdk-options.m4

+43
Original file line numberDiff line numberDiff line change
@@ -491,3 +491,46 @@ AC_DEFUN_ONCE([JDKOPT_ENABLE_DISABLE_FAILURE_HANDLER],
491491
492492
AC_SUBST(BUILD_FAILURE_HANDLER)
493493
])
494+
495+
################################################################################
496+
#
497+
# Enable or disable generation of the classlist at build time
498+
#
499+
AC_DEFUN_ONCE([JDKOPT_ENABLE_DISABLE_GENERATE_CLASSLIST],
500+
[
501+
AC_ARG_ENABLE([generate-classlist], [AS_HELP_STRING([--disable-generate-classlist],
502+
[forces enabling or disabling of the generation of a CDS classlist at build time.
503+
Default is to generate it when either the server or client JVMs are built.])])
504+
505+
# Check if it's likely that it's possible to generate the classlist. Depending
506+
# on exact jvm configuration it could be possible anyway.
507+
if HOTSPOT_CHECK_JVM_VARIANT(server) || HOTSPOT_CHECK_JVM_VARIANT(client); then
508+
ENABLE_GENERATE_CLASSLIST_POSSIBLE="true"
509+
else
510+
ENABLE_GENERATE_CLASSLIST_POSSIBLE="false"
511+
fi
512+
513+
AC_MSG_CHECKING([if the CDS classlist generation should be enabled])
514+
if test "x$enable_generate_classlist" = "xyes"; then
515+
AC_MSG_RESULT([yes, forced])
516+
ENABLE_GENERATE_CLASSLIST="true"
517+
if test "x$ENABLE_GENERATE_CLASSLIST_POSSIBLE" = "xfalse"; then
518+
AC_MSG_WARN([Generation of classlist might not be possible with JVM Variants $JVM_VARIANTS])
519+
fi
520+
elif test "x$enable_generate_classlist" = "xno"; then
521+
AC_MSG_RESULT([no, forced])
522+
ENABLE_GENERATE_CLASSLIST="false"
523+
elif test "x$enable_generate_classlist" = "x"; then
524+
if test "x$ENABLE_GENERATE_CLASSLIST_POSSIBLE" = "xtrue"; then
525+
AC_MSG_RESULT([yes])
526+
ENABLE_GENERATE_CLASSLIST="true"
527+
else
528+
AC_MSG_RESULT([no])
529+
ENABLE_GENERATE_CLASSLIST="false"
530+
fi
531+
else
532+
AC_MSG_ERROR([Invalid value for --enable-generate-classlist: $enable_generate_classlist])
533+
fi
534+
535+
AC_SUBST([ENABLE_GENERATE_CLASSLIST])
536+
])

Diff for: common/autoconf/spec.gmk.in

+2
Original file line numberDiff line numberDiff line change
@@ -285,6 +285,8 @@ BUILD_HOTSPOT=@BUILD_HOTSPOT@
285285

286286
BUILD_FAILURE_HANDLER := @BUILD_FAILURE_HANDLER@
287287

288+
ENABLE_GENERATE_CLASSLIST := @ENABLE_GENERATE_CLASSLIST@
289+
288290
# The boot jdk to use. This is overridden in bootcycle-spec.gmk. Make sure to keep
289291
# it in sync.
290292
BOOT_JDK:=@BOOT_JDK@

Diff for: corba/.hgtags

+1
Original file line numberDiff line numberDiff line change
@@ -362,3 +362,4 @@ cc30faa2da498c478e89ab062ff160653ca1b170 jdk-9+113
362362
7a1b36bf2fe55a9a7732489ccdd326c910329a7e jdk-9+117
363363
8c2c2d17f7ce92a31c9ccb44a122ec62f5a85ace jdk-9+118
364364
daf533920b1266603b5cbdab31908d2a931c5361 jdk-9+119
365+
5943b791e131e79b969d4cea053aecda34801723 jdk-9+120

Diff for: hotspot/.hgtags

+1
Original file line numberDiff line numberDiff line change
@@ -522,3 +522,4 @@ b64432bae5271735fd53300b2005b713e98ef411 jdk-9+114
522522
88170d3642905b9e6cac03e8efcc976885a7e6da jdk-9+117
523523
9b1075cac08dc836ec32e7b368415cbe3aceaf8c jdk-9+118
524524
15f3fe264872766bcb205696198f0c1502420e17 jdk-9+119
525+
0be6f4f5d18671184e62583668cb1d783dffa128 jdk-9+120

Diff for: jaxp/.hgtags

+1
Original file line numberDiff line numberDiff line change
@@ -362,3 +362,4 @@ bdbf2342b21bd8ecad1b4e6499a0dfb314952bd7 jdk-9+103
362362
46b57560cd06ebcdd21489250628ff5f9d9d8916 jdk-9+117
363363
a8aa25fc6c5fda0ed7a93b8ffee62da326a752fc jdk-9+118
364364
f92e8518bb34a9628b11e662bf7308561a55eb3b jdk-9+119
365+
ecbe72546137cd29cb73d4dcc81cc099e847d543 jdk-9+120

Diff for: jaxws/.hgtags

+1
Original file line numberDiff line numberDiff line change
@@ -365,3 +365,4 @@ b314bb02182b9ca94708a91f312c377f5435f740 jdk-9+114
365365
58265b39fc74b932bda4d4f4649c530a89f55c4e jdk-9+117
366366
6ba73d04589ccc0705a5d8ae5111b63632b6ad20 jdk-9+118
367367
331a825f849afd2e5126c93c88e55bd9ef0c6b8f jdk-9+119
368+
ecd0d6a71c7ccf93584ba4dacdd4fa8455efd741 jdk-9+120

Diff for: jdk/.hgtags

+1
Original file line numberDiff line numberDiff line change
@@ -362,3 +362,4 @@ baeb5edb38939cdb78ae0ac6f4fd368465cbf188 jdk-9+116
362362
4da0f73ce03aaf245b92cc040cc0ab0e3fa54dc2 jdk-9+117
363363
e1eba5cfa5cc8c66d524396a05323dc93568730a jdk-9+118
364364
bad3f8a33db271a6143ba6eac0c8bd5bbd942417 jdk-9+119
365+
b9a518bf72516954e57ac2f6e3ef21e13008f1cd jdk-9+120

Diff for: jdk/make/mapfiles/libjava/mapfile-vers

+1
Original file line numberDiff line numberDiff line change
@@ -267,6 +267,7 @@ SUNWprivate_1.1 {
267267
Java_jdk_internal_misc_VM_geteuid;
268268
Java_jdk_internal_misc_VM_getgid;
269269
Java_jdk_internal_misc_VM_getegid;
270+
Java_jdk_internal_misc_VM_getRuntimeArguments;
270271
Java_jdk_internal_misc_VM_initialize;
271272

272273
Java_java_lang_reflect_Module_defineModule0;

Diff for: jdk/src/java.base/share/classes/java/lang/Boolean.java

+11-9
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,9 @@ public Boolean(String s) {
117117
* Parses the string argument as a boolean. The {@code boolean}
118118
* returned represents the value {@code true} if the string argument
119119
* is not {@code null} and is equal, ignoring case, to the string
120-
* {@code "true"}. <p>
120+
* {@code "true"}.
121+
* Otherwise, a false value is returned, including for a null
122+
* argument.<p>
121123
* Example: {@code Boolean.parseBoolean("True")} returns {@code true}.<br>
122124
* Example: {@code Boolean.parseBoolean("yes")} returns {@code false}.
123125
*
@@ -165,6 +167,8 @@ public static Boolean valueOf(boolean b) {
165167
* specified string. The {@code Boolean} returned represents a
166168
* true value if the string argument is not {@code null}
167169
* and is equal, ignoring case, to the string {@code "true"}.
170+
* Otherwise, a false value is returned, including for a null
171+
* argument.
168172
*
169173
* @param s a string.
170174
* @return the {@code Boolean} value represented by the string.
@@ -241,14 +245,12 @@ public boolean equals(Object obj) {
241245

242246
/**
243247
* Returns {@code true} if and only if the system property named
244-
* by the argument exists and is equal to the string {@code
245-
* "true"}. (Beginning with version 1.0.2 of the Java&trade;
246-
* platform, the test of this string is case insensitive.) A
247-
* system property is accessible through {@code getProperty}, a
248-
* method defined by the {@code System} class.
249-
* <p>
250-
* If there is no property with the specified name, or if the specified
251-
* name is empty or null, then {@code false} is returned.
248+
* by the argument exists and is equal to, ignoring case, the
249+
* string {@code "true"}.
250+
* A system property is accessible through {@code getProperty}, a
251+
* method defined by the {@code System} class. <p> If there is no
252+
* property with the specified name, or if the specified name is
253+
* empty or null, then {@code false} is returned.
252254
*
253255
* @param name the system property name.
254256
* @return the {@code boolean} value of the system property.

Diff for: jdk/src/java.base/share/classes/java/lang/StackWalker.java

+9-9
Original file line numberDiff line numberDiff line change
@@ -306,8 +306,9 @@ public static StackWalker getInstance(Set<Option> options) {
306306
return DEFAULT_WALKER;
307307
}
308308

309-
checkPermission(options);
310-
return new StackWalker(toEnumSet(options));
309+
EnumSet<Option> optionSet = toEnumSet(options);
310+
checkPermission(optionSet);
311+
return new StackWalker(optionSet);
311312
}
312313

313314
/**
@@ -341,8 +342,9 @@ public static StackWalker getInstance(Set<Option> options, int estimateDepth) {
341342
if (estimateDepth <= 0) {
342343
throw new IllegalArgumentException("estimateDepth must be > 0");
343344
}
344-
checkPermission(options);
345-
return new StackWalker(toEnumSet(options), estimateDepth);
345+
EnumSet<Option> optionSet = toEnumSet(options);
346+
checkPermission(optionSet);
347+
return new StackWalker(optionSet, estimateDepth);
346348
}
347349

348350
// ----- private constructors ------
@@ -540,13 +542,11 @@ public Class<?> getCallerClass() {
540542
}
541543

542544
// ---- package access ----
543-
static StackWalker newInstanceNoCheck(EnumSet<Option> options) {
544-
return new StackWalker(options, 0, null);
545-
}
546545

547546
static StackWalker newInstance(Set<Option> options, ExtendedOption extendedOption) {
548-
checkPermission(options);
549-
return new StackWalker(toEnumSet(options), 0, extendedOption);
547+
EnumSet<Option> optionSet = toEnumSet(options);
548+
checkPermission(optionSet);
549+
return new StackWalker(optionSet, 0, extendedOption);
550550
}
551551

552552
int estimateDepth() {

Diff for: jdk/src/java.base/share/classes/java/lang/annotation/ElementType.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@
4646
* {@code @Target(ElementType.FIELD)} may only be written as a modifier for a
4747
* field declaration.
4848
*
49-
* <p>The constant {@link #TYPE_USE} corresponds to the 15 type contexts in JLS
49+
* <p>The constant {@link #TYPE_USE} corresponds to the type contexts in JLS
5050
* 4.11, as well as to two declaration contexts: type declarations (including
5151
* annotation type declarations) and type parameter declarations.
5252
*

Diff for: jdk/src/java.base/share/classes/java/lang/module/ModuleReader.java

+6-2
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@
3030
import java.io.InputStream;
3131
import java.net.URI;
3232
import java.nio.ByteBuffer;
33+
import java.util.Objects;
3334
import java.util.Optional;
3435

3536

@@ -163,9 +164,12 @@ default Optional<ByteBuffer> read(String name) throws IOException {
163164
* @param bb
164165
* The byte buffer to release
165166
*
166-
* @implSpec The default implementation does nothing.
167+
* @implSpec The default implementation doesn't do anything except check
168+
* if the byte buffer is null.
167169
*/
168-
default void release(ByteBuffer bb) { }
170+
default void release(ByteBuffer bb) {
171+
Objects.requireNonNull(bb);
172+
}
169173

170174
/**
171175
* Closes the module reader. Once closed then subsequent calls to locate or

Diff for: jdk/src/java.base/share/classes/java/lang/module/SystemModuleFinder.java

+2-1
Original file line numberDiff line numberDiff line change
@@ -272,9 +272,9 @@ private static void checkPermissionToConnect(URI uri) {
272272
* if not found.
273273
*/
274274
private ImageLocation findImageLocation(String name) throws IOException {
275+
Objects.requireNonNull(name);
275276
if (closed)
276277
throw new IOException("ModuleReader is closed");
277-
278278
if (imageReader != null) {
279279
return imageReader.findLocation(module, name);
280280
} else {
@@ -322,6 +322,7 @@ public Optional<ByteBuffer> read(String name) throws IOException {
322322

323323
@Override
324324
public void release(ByteBuffer bb) {
325+
Objects.requireNonNull(bb);
325326
ImageReader.releaseByteBuffer(bb);
326327
}
327328

0 commit comments

Comments
 (0)