This commit is contained in:
Jesper Wilhelmsson 2017-09-03 13:39:27 +00:00
commit f975e2ac52
216 changed files with 139406 additions and 2531 deletions

View File

@ -445,3 +445,4 @@ e6d70017f5b9adbb2ec82d826973d0251800a3c3 jdk-10+12
3739654290616e533fc6f51bf9ad69ed47a6abba jdk-10+18
14df107500cc3b8ab238c3e4ad2c74e12bfe6067 jdk-10+19
4586bc5d28d13d3147b993e6237eaf29a7073bbb jdk-10+20
a85884d55ce32799f5c7382b7ea4839052b362a2 jdk-10+21

View File

@ -445,3 +445,4 @@ b803e6cff41e72a1e6d8782e1ef7c25a6e3e5ee3 jdk-10+19
d2982a786f53814367698e63efe6349c9128e1db jdk-9+180
b656dea9398ef601f7fc08d1a5157a560e0ccbe0 jdk-9+181
682e2a6df836f4731f92eb2ddcd467075047f6ea jdk-10+20
90cdfe56f1543267a8005e638bd1b44551fda189 jdk-10+21

View File

@ -1046,7 +1046,7 @@ AC_DEFUN([FLAGS_SETUP_COMPILER_FLAGS_FOR_JDK_HELPER],
# Set some additional per-CPU defines.
if test "x$OPENJDK_$1_OS-$OPENJDK_$1_CPU" = xwindows-x86; then
$2JVM_CFLAGS="[$]$2JVM_CFLAGS -arch:IA32"
elif test "x$OPENJDK_$1_CPU" = xsparcv9; then
elif test "x$OPENJDK_$1_OS-$OPENJDK_$1_CPU" = xsolaris-sparcv9; then
$2JVM_CFLAGS="[$]$2JVM_CFLAGS -xarch=sparc"
elif test "x$OPENJDK_$1_CPU" = xppc64; then
if test "x$OPENJDK_$1_OS" = xlinux; then
@ -1358,7 +1358,7 @@ $2LDFLAGS_JDKLIB="${$2LDFLAGS_JDKLIB} ${$2JAVA_BASE_LDFLAGS}"
$2SOLARIS_LIBM_LIBS="/usr/lib/sparcv9/libm.so.1"
fi
$2JVM_LIBS="[$]$2JVM_LIBS -lsocket -lsched -ldl $SOLARIS_LIBM_LIBS -lCrun \
-lthread -ldoor -lc -ldemangle -lnsl -lkstat -lrt"
-lthread -ldoor -lc -ldemangle -lnsl -lrt"
elif test "x$OPENJDK_$1_OS" = xmacosx; then
$2JVM_LIBS="[$]$2JVM_LIBS -lm"
elif test "x$OPENJDK_$1_OS" = xaix; then

View File

@ -5151,7 +5151,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=1503411624
DATE_WHEN_GENERATED=1504187184
###############################################################################
#
@ -15719,6 +15719,12 @@ test -n "$target_alias" &&
VAR_CPU_BITS=32
VAR_CPU_ENDIAN=little
;;
alpha*)
VAR_CPU=alpha
VAR_CPU_ARCH=alpha
VAR_CPU_BITS=64
VAR_CPU_ENDIAN=little
;;
arm*)
VAR_CPU=arm
VAR_CPU_ARCH=arm
@ -15731,6 +15737,36 @@ test -n "$target_alias" &&
VAR_CPU_BITS=64
VAR_CPU_ENDIAN=little
;;
m68k)
VAR_CPU=m68k
VAR_CPU_ARCH=m68k
VAR_CPU_BITS=32
VAR_CPU_ENDIAN=big
;;
mips)
VAR_CPU=mips
VAR_CPU_ARCH=mips
VAR_CPU_BITS=32
VAR_CPU_ENDIAN=big
;;
mipsel)
VAR_CPU=mipsel
VAR_CPU_ARCH=mipsel
VAR_CPU_BITS=32
VAR_CPU_ENDIAN=little
;;
mips64)
VAR_CPU=mips64
VAR_CPU_ARCH=mips64
VAR_CPU_BITS=64
VAR_CPU_ENDIAN=big
;;
mips64el)
VAR_CPU=mips64el
VAR_CPU_ARCH=mips64el
VAR_CPU_BITS=64
VAR_CPU_ENDIAN=little
;;
powerpc)
VAR_CPU=ppc
VAR_CPU_ARCH=ppc
@ -15761,6 +15797,18 @@ test -n "$target_alias" &&
VAR_CPU_BITS=64
VAR_CPU_ENDIAN=big
;;
sh*eb)
VAR_CPU=sh
VAR_CPU_ARCH=sh
VAR_CPU_BITS=32
VAR_CPU_ENDIAN=big
;;
sh*)
VAR_CPU=sh
VAR_CPU_ARCH=sh
VAR_CPU_BITS=32
VAR_CPU_ENDIAN=little
;;
sparc)
VAR_CPU=sparc
VAR_CPU_ARCH=sparc
@ -15858,6 +15906,12 @@ $as_echo "$OPENJDK_BUILD_OS-$OPENJDK_BUILD_CPU" >&6; }
VAR_CPU_BITS=32
VAR_CPU_ENDIAN=little
;;
alpha*)
VAR_CPU=alpha
VAR_CPU_ARCH=alpha
VAR_CPU_BITS=64
VAR_CPU_ENDIAN=little
;;
arm*)
VAR_CPU=arm
VAR_CPU_ARCH=arm
@ -15870,6 +15924,36 @@ $as_echo "$OPENJDK_BUILD_OS-$OPENJDK_BUILD_CPU" >&6; }
VAR_CPU_BITS=64
VAR_CPU_ENDIAN=little
;;
m68k)
VAR_CPU=m68k
VAR_CPU_ARCH=m68k
VAR_CPU_BITS=32
VAR_CPU_ENDIAN=big
;;
mips)
VAR_CPU=mips
VAR_CPU_ARCH=mips
VAR_CPU_BITS=32
VAR_CPU_ENDIAN=big
;;
mipsel)
VAR_CPU=mipsel
VAR_CPU_ARCH=mipsel
VAR_CPU_BITS=32
VAR_CPU_ENDIAN=little
;;
mips64)
VAR_CPU=mips64
VAR_CPU_ARCH=mips64
VAR_CPU_BITS=64
VAR_CPU_ENDIAN=big
;;
mips64el)
VAR_CPU=mips64el
VAR_CPU_ARCH=mips64el
VAR_CPU_BITS=64
VAR_CPU_ENDIAN=little
;;
powerpc)
VAR_CPU=ppc
VAR_CPU_ARCH=ppc
@ -15900,6 +15984,18 @@ $as_echo "$OPENJDK_BUILD_OS-$OPENJDK_BUILD_CPU" >&6; }
VAR_CPU_BITS=64
VAR_CPU_ENDIAN=big
;;
sh*eb)
VAR_CPU=sh
VAR_CPU_ARCH=sh
VAR_CPU_BITS=32
VAR_CPU_ENDIAN=big
;;
sh*)
VAR_CPU=sh
VAR_CPU_ARCH=sh
VAR_CPU_BITS=32
VAR_CPU_ENDIAN=little
;;
sparc)
VAR_CPU=sparc
VAR_CPU_ARCH=sparc
@ -16045,6 +16141,12 @@ $as_echo "$COMPILE_TYPE" >&6; }
elif test "x$OPENJDK_TARGET_OS" != xmacosx && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
# On all platforms except MacOSX replace x86_64 with amd64.
OPENJDK_TARGET_CPU_LEGACY="amd64"
elif test "x$OPENJDK_TARGET_CPU" = xalpha; then
# Avoid name collisions with variables named alpha
OPENJDK_TARGET_CPU_LEGACY="_alpha_"
elif test "x$OPENJDK_TARGET_CPU" = xsh; then
# Avoid name collisions with variables named sh
OPENJDK_TARGET_CPU_LEGACY="_sh_"
fi
@ -16197,6 +16299,12 @@ $as_echo "$COMPILE_TYPE" >&6; }
elif test "x$OPENJDK_BUILD_OS" != xmacosx && test "x$OPENJDK_BUILD_CPU" = xx86_64; then
# On all platforms except MacOSX replace x86_64 with amd64.
OPENJDK_BUILD_CPU_LEGACY="amd64"
elif test "x$OPENJDK_BUILD_CPU" = xalpha; then
# Avoid name collisions with variables named alpha
OPENJDK_BUILD_CPU_LEGACY="_alpha_"
elif test "x$OPENJDK_BUILD_CPU" = xsh; then
# Avoid name collisions with variables named sh
OPENJDK_BUILD_CPU_LEGACY="_sh_"
fi
@ -51563,7 +51671,7 @@ $as_echo "$as_me: GCC >= 6 detected; adding ${NO_DELETE_NULL_POINTER_CHECKS_CFLA
# Set some additional per-CPU defines.
if test "x$OPENJDK_TARGET_OS-$OPENJDK_TARGET_CPU" = xwindows-x86; then
JVM_CFLAGS="$JVM_CFLAGS -arch:IA32"
elif test "x$OPENJDK_TARGET_CPU" = xsparcv9; then
elif test "x$OPENJDK_TARGET_OS-$OPENJDK_TARGET_CPU" = xsolaris-sparcv9; then
JVM_CFLAGS="$JVM_CFLAGS -xarch=sparc"
elif test "x$OPENJDK_TARGET_CPU" = xppc64; then
if test "x$OPENJDK_TARGET_OS" = xlinux; then
@ -51968,7 +52076,7 @@ LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} ${JAVA_BASE_LDFLAGS}"
SOLARIS_LIBM_LIBS="/usr/lib/sparcv9/libm.so.1"
fi
JVM_LIBS="$JVM_LIBS -lsocket -lsched -ldl $SOLARIS_LIBM_LIBS -lCrun \
-lthread -ldoor -lc -ldemangle -lnsl -lkstat -lrt"
-lthread -ldoor -lc -ldemangle -lnsl -lrt"
elif test "x$OPENJDK_TARGET_OS" = xmacosx; then
JVM_LIBS="$JVM_LIBS -lm"
elif test "x$OPENJDK_TARGET_OS" = xaix; then
@ -52442,7 +52550,7 @@ $as_echo "$as_me: GCC >= 6 detected; adding ${NO_DELETE_NULL_POINTER_CHECKS_CFLA
# Set some additional per-CPU defines.
if test "x$OPENJDK_BUILD_OS-$OPENJDK_BUILD_CPU" = xwindows-x86; then
OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -arch:IA32"
elif test "x$OPENJDK_BUILD_CPU" = xsparcv9; then
elif test "x$OPENJDK_BUILD_OS-$OPENJDK_BUILD_CPU" = xsolaris-sparcv9; then
OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -xarch=sparc"
elif test "x$OPENJDK_BUILD_CPU" = xppc64; then
if test "x$OPENJDK_BUILD_OS" = xlinux; then
@ -52847,7 +52955,7 @@ OPENJDK_BUILD_LDFLAGS_JDKLIB="${OPENJDK_BUILD_LDFLAGS_JDKLIB} ${OPENJDK_BUILD_JA
OPENJDK_BUILD_SOLARIS_LIBM_LIBS="/usr/lib/sparcv9/libm.so.1"
fi
OPENJDK_BUILD_JVM_LIBS="$OPENJDK_BUILD_JVM_LIBS -lsocket -lsched -ldl $SOLARIS_LIBM_LIBS -lCrun \
-lthread -ldoor -lc -ldemangle -lnsl -lkstat -lrt"
-lthread -ldoor -lc -ldemangle -lnsl -lrt"
elif test "x$OPENJDK_BUILD_OS" = xmacosx; then
OPENJDK_BUILD_JVM_LIBS="$OPENJDK_BUILD_JVM_LIBS -lm"
elif test "x$OPENJDK_BUILD_OS" = xaix; then

View File

@ -42,6 +42,12 @@ AC_DEFUN([PLATFORM_EXTRACT_VARS_FROM_CPU],
VAR_CPU_BITS=32
VAR_CPU_ENDIAN=little
;;
alpha*)
VAR_CPU=alpha
VAR_CPU_ARCH=alpha
VAR_CPU_BITS=64
VAR_CPU_ENDIAN=little
;;
arm*)
VAR_CPU=arm
VAR_CPU_ARCH=arm
@ -54,6 +60,36 @@ AC_DEFUN([PLATFORM_EXTRACT_VARS_FROM_CPU],
VAR_CPU_BITS=64
VAR_CPU_ENDIAN=little
;;
m68k)
VAR_CPU=m68k
VAR_CPU_ARCH=m68k
VAR_CPU_BITS=32
VAR_CPU_ENDIAN=big
;;
mips)
VAR_CPU=mips
VAR_CPU_ARCH=mips
VAR_CPU_BITS=32
VAR_CPU_ENDIAN=big
;;
mipsel)
VAR_CPU=mipsel
VAR_CPU_ARCH=mipsel
VAR_CPU_BITS=32
VAR_CPU_ENDIAN=little
;;
mips64)
VAR_CPU=mips64
VAR_CPU_ARCH=mips64
VAR_CPU_BITS=64
VAR_CPU_ENDIAN=big
;;
mips64el)
VAR_CPU=mips64el
VAR_CPU_ARCH=mips64el
VAR_CPU_BITS=64
VAR_CPU_ENDIAN=little
;;
powerpc)
VAR_CPU=ppc
VAR_CPU_ARCH=ppc
@ -84,6 +120,18 @@ AC_DEFUN([PLATFORM_EXTRACT_VARS_FROM_CPU],
VAR_CPU_BITS=64
VAR_CPU_ENDIAN=big
;;
sh*eb)
VAR_CPU=sh
VAR_CPU_ARCH=sh
VAR_CPU_BITS=32
VAR_CPU_ENDIAN=big
;;
sh*)
VAR_CPU=sh
VAR_CPU_ARCH=sh
VAR_CPU_BITS=32
VAR_CPU_ENDIAN=little
;;
sparc)
VAR_CPU=sparc
VAR_CPU_ARCH=sparc
@ -289,6 +337,12 @@ AC_DEFUN([PLATFORM_SETUP_LEGACY_VARS_HELPER],
elif test "x$OPENJDK_$1_OS" != xmacosx && test "x$OPENJDK_$1_CPU" = xx86_64; then
# On all platforms except MacOSX replace x86_64 with amd64.
OPENJDK_$1_CPU_LEGACY="amd64"
elif test "x$OPENJDK_$1_CPU" = xalpha; then
# Avoid name collisions with variables named alpha
OPENJDK_$1_CPU_LEGACY="_alpha_"
elif test "x$OPENJDK_$1_CPU" = xsh; then
# Avoid name collisions with variables named sh
OPENJDK_$1_CPU_LEGACY="_sh_"
fi
AC_SUBST(OPENJDK_$1_CPU_LEGACY)

View File

@ -200,7 +200,7 @@ var getJibProfiles = function (input) {
data.configuration_make_arg = "CONF_NAME=";
// Exclude list to use when Jib creates a source bundle
data.src_bundle_excludes = "./build webrev .hg */.hg */*/.hg */*/*/.hg";
data.src_bundle_excludes = "./build webrev* */webrev* */*/webrev* */*/*/webrev* .hg */.hg */*/.hg */*/*/.hg";
// Include list to use when creating a minimal jib source bundle which
// contains just the jib configuration files.
data.conf_bundle_includes = "*/conf/jib-profiles.* common/autoconf/version-numbers"

View File

@ -445,3 +445,4 @@ a923b3f30e7bddb4f960059ddfc7978fc63e2e6e jdk-10+18
6ce6cb8ff41c71c49f23b15e0f0468aca5d52b17 jdk-9+180
ba71941ad9dba53b8fffb30602ef673eee88696c jdk-9+181
7a54ec280513a33e49e60546c0cf9ca573925a43 jdk-10+20
68b5f8eeac3325c02aac2f4b452b8a37c20c970e jdk-10+21

View File

@ -606,3 +606,4 @@ d7baadc223e790c08bc69bf7e553bce65b4e7e40 jdk-9+180
4a443796f6f57842d6a0434ac27ca3d1033ccc20 jdk-9+181
e93ed1a092409351c90b3a76d80b9aa8b44d5e6a jdk-10+20
bdb2dbc43ff065b74c2121bdfb0d6e1fa8684b73 jdk-10+21
71337910df60ff2b62daf10357f553def25e2d0b jdk-10+22

View File

@ -445,3 +445,4 @@ f5789425c26cee0274d0e2ebabb21faf268f218f jdk-10+19
9934a03646f91ce55f61f53d8448c629828f8088 jdk-9+180
ea18d767c9ec50ea7f40bbe6cf7379d3538110f1 jdk-9+181
f7d596aa57aece4e5f473b1ac97e26cd0aebc647 jdk-10+20
dcd49f380d7504a49769c26d7bd756623cb9b828 jdk-10+21

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 2000, 2016, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2000, 2017, 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
@ -85,8 +85,7 @@ public class SAXSource implements Source {
* Create a <code>SAXSource</code>, using a SAX <code>InputSource</code>.
* The {@link javax.xml.transform.Transformer} or
* {@link javax.xml.transform.sax.SAXTransformerFactory} creates a
* reader via {@link org.xml.sax.helpers.XMLReaderFactory}
* (if setXMLReader is not used), sets itself as
* reader (if setXMLReader is not used), sets itself as
* the reader's {@link org.xml.sax.ContentHandler}, and calls
* reader.parse(inputSource).
*

View File

@ -448,3 +448,4 @@ d0190aaf1816081d9b2e0577b65b793804896d1e jdk-9+178
f112f294a89ea61260b645f450bd37fd6578a5e8 jdk-9+180
4f852cc3a1c998e78a989ba4667ffa9b867d9d01 jdk-9+181
1658a5e7d171e9c3cc2462fac2789ec63294ecca jdk-10+20
30ed8fb6a1d17e4065d07bc031cf2368aeca8d1e jdk-10+21

View File

@ -445,3 +445,4 @@ b561eeca30decc6258b4aca8bb23beffbb6e2f7d jdk-10+19
4feab1acec6a9c3620a19ff379a65ab8618d0e2a jdk-9+180
bd66ea2fdde3d60a73b5272263a7b8b0ca926a33 jdk-9+181
6256e94781f55e6f9e04eb284298d00eb9c5e106 jdk-10+20
4e08a69241eab6e7a67a819a7b4fe29e7398855d jdk-10+21

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,16 @@
#
0xA15A 0xFF3F #SPACING UNDERSCORE
0xA1FE 0x2571 #LT DIAG UP RIGHT TO LOW LEFT
0xA240 0x2572 #LT DIAG UP LEFT TO LOW RIGHTG
0xA2CC 0x5341 #HANGHZOU NUMERAL TEN
0xA2CE 0x5345 #HANGZHOU NUMERAL THIRTY
#
0xA27E 0x256D # BOX DRAWINGS LIGHT ARC DOWN AND RIGHT
0xA2A1 0x256E # BOX DRAWINGS LIGHT ARC DOWN AND LEFT
0xA2A2 0x2570 # BOX DRAWINGS LIGHT ARC UP AND RIGHT
0xA2A3 0x256F # BOX DRAWINGS LIGHT ARC UP AND LEFT
0xA2A4 0x2550 # BOX DRAWINGS DOUBLE HORIZONTAL
0xA2A5 0x255E # BOX DRAWINGS VERTICAL SINGLE AND RIGHT DOUBLE
0xA2A6 0x256A # BOX DRAWINGS VERTICAL SINGLE AND HORIZONTAL DOUBLE
0xA2A7 0x2561 # BOX DRAWINGS VERTICAL SINGLE AND LEFT DOUBLE

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1 @@
a4bf 5344

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1 @@
0x25 U+000a

View File

@ -0,0 +1 @@
0x25 U+000a

View File

@ -0,0 +1 @@
0x25 U+000a

View File

@ -0,0 +1 @@
0x25 U+000a

View File

@ -0,0 +1 @@
0x25 U+000a

View File

@ -0,0 +1 @@
0x25 U+000a

View File

@ -0,0 +1 @@
0x25 U+000a

View File

@ -0,0 +1 @@
0x25 U+000a

View File

@ -0,0 +1 @@
0x25 U+000a

View File

@ -0,0 +1 @@
0x25 U+000a

File diff suppressed because it is too large Load Diff

View File

@ -681,7 +681,7 @@ charset x-euc-jp-linux EUC_JP_LINUX
alias euc_jp_linux # JDK historical
alias euc-jp-linux
charset x-eucjp-open EUC_JP_Open
charset x-eucJP-Open EUC_JP_Open
package sun.nio.cs.ext
type template
hisname EUC_JP_Solari

View File

@ -1,5 +1,5 @@
#
# Copyright (c) 2001, 2016, Oracle and/or its affiliates. All rights reserved.
# Copyright (c) 2001, 2017, 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
@ -54,7 +54,6 @@ SUNWprivate_1.1 {
Java_sun_nio_ch_EPollPort_drain1;
Java_sun_nio_ch_EPollPort_interrupt;
Java_sun_nio_ch_EPollPort_socketpair;
Java_sun_nio_ch_FileChannelImpl_close0;
Java_sun_nio_ch_FileChannelImpl_initIDs;
Java_sun_nio_ch_FileChannelImpl_map0;
Java_sun_nio_ch_FileChannelImpl_position0;

View File

@ -1,5 +1,5 @@
#
# Copyright (c) 2001, 2016, Oracle and/or its affiliates. All rights reserved.
# Copyright (c) 2001, 2017, 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
@ -37,7 +37,6 @@ SUNWprivate_1.1 {
Java_sun_nio_ch_DatagramDispatcher_readv0;
Java_sun_nio_ch_DatagramDispatcher_write0;
Java_sun_nio_ch_DatagramDispatcher_writev0;
Java_sun_nio_ch_FileChannelImpl_close0;
Java_sun_nio_ch_FileChannelImpl_initIDs;
Java_sun_nio_ch_FileChannelImpl_map0;
Java_sun_nio_ch_FileChannelImpl_position0;

View File

@ -1,5 +1,5 @@
#
# Copyright (c) 2001, 2016, Oracle and/or its affiliates. All rights reserved.
# Copyright (c) 2001, 2017, 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
@ -42,7 +42,6 @@ SUNWprivate_1.1 {
Java_sun_nio_ch_DevPollArrayWrapper_poll0;
Java_sun_nio_ch_DevPollArrayWrapper_register;
Java_sun_nio_ch_DevPollArrayWrapper_registerMultiple;
Java_sun_nio_ch_FileChannelImpl_close0;
Java_sun_nio_ch_FileChannelImpl_initIDs;
Java_sun_nio_ch_FileChannelImpl_map0;
Java_sun_nio_ch_FileChannelImpl_position0;

View File

@ -179,7 +179,7 @@ public class DBCS {
.replace("$NAME_CLZ$", clzName)
.replace("$NAME_ALIASES$",
"sun.nio.cs".equals(pkgName) ?
"StandardCharsets.aliases_" + clzName :
"StandardCharsets.aliases_" + clzName + "()" :
"ExtendedCharsets.aliasesFor(\"" + csName + "\")")
.replace("$NAME_CS$" , csName)
.replace("$CONTAINS$",

View File

@ -82,7 +82,7 @@ public class EUC_TW {
static void genClass(String pkg, String args[]) throws Exception
{
InputStream is = new FileInputStream(new File(args[0], "euc_tw.map"));
InputStream is = new FileInputStream(new File(args[0], "EUC_TW.map"));
PrintStream ps = new PrintStream(new File(args[1], "EUC_TWMapping.java"),
"ISO-8859-1");
String copyright = getCopyright(new File(args[7], "EUC_TW.java"));

View File

@ -161,7 +161,7 @@ public class SBCS {
if (line.indexOf("$NAME_ALIASES$", i) != -1) {
if ("sun.nio.cs".equals(pkgName))
line = line.replace("$NAME_ALIASES$",
"StandardCharsets.aliases_" + clzName);
"StandardCharsets.aliases_" + clzName + "()");
else
line = line.replace("$NAME_ALIASES$",
"ExtendedCharsets.aliasesFor(\"" + csName + "\")");

View File

@ -93,21 +93,28 @@ public class SPI {
.filter(cs -> cs.pkgName.equals("sun.nio.cs"))
.forEach( cs -> {
if (cs.aliases == null || cs.aliases.length == 0) {
out.printf(" static final String[] aliases_%s = null;%n%n",
out.printf(" static String[] aliases_%s() { return null; }%n%n",
cs.clzName);
} else {
boolean methodEnd = true;
// non-final for SJIS and MS932 to support sun.nio.cs.map
if (cs.clzName.equals("SJIS") || cs.clzName.equals("MS932")) {
out.printf(" static String[] aliases_%s() { return aliases_%s; }%n%n",
cs.clzName, cs.clzName);
out.printf(" static String[] aliases_%s = new String[] {%n",
cs.clzName);
methodEnd = false;
} else {
out.printf(" static final String[] aliases_%s = new String[] {%n",
out.printf(" static String[] aliases_%s() { return new String[] {%n",
cs.clzName);
}
for (String alias : cs.aliases) {
out.printf(" \"%s\",%n", alias);
out.printf(" \"%s\",%n", alias);
}
out.printf(" };%n%n");
if (methodEnd) {
out.printf(" }%n%n");
}
out.printf(" };%n%n");
}
});
Charset cs = charsets.get("SJIS");

View File

@ -51,7 +51,7 @@ public class SRC {
} else if (line.indexOf("$ALIASES$") != -1) {
if ("sun.nio.cs".equals(pkgName))
out.println(line.replace("$ALIASES$",
"StandardCharsets.aliases_" + clzName));
"StandardCharsets.aliases_" + clzName + "()"));
else
out.println(line.replace("$ALIASES$",
"ExtendedCharsets.aliasesFor(\"" + csName + "\")"));

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 2008, 2011, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2008, 2017, 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
@ -30,7 +30,7 @@ package java.lang;
* failed to find its bootstrap method,
* or the bootstrap method has failed to provide a
* {@linkplain java.lang.invoke.CallSite call site} with a {@linkplain java.lang.invoke.CallSite#getTarget target}
* of the correct {@linkplain java.lang.invoke.MethodHandle#type method type}.
* of the correct {@linkplain java.lang.invoke.MethodHandle#type() method type}.
*
* @author John Rose, JSR 292 EG
* @since 1.7

View File

@ -822,7 +822,7 @@ public final class ModuleLayer {
/**
* Returns the module with the given name in this layer, or if not in this
* layer, the {@linkplain #parents parent} layers. Finding a module in
* layer, the {@linkplain #parents() parent} layers. Finding a module in
* parent layers is equivalent to invoking {@code findModule} on each
* parent, in search order, until the module is found or all parents have
* been searched. In a <em>tree of layers</em> then this is equivalent to
@ -854,7 +854,7 @@ public final class ModuleLayer {
/**
* Returns the {@code ClassLoader} for the module with the given name. If
* a module of the given name is not in this layer then the {@link #parents
* a module of the given name is not in this layer then the {@link #parents()
* parent} layers are searched in the manner specified by {@link
* #findModule(String) findModule}.
*

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 2003, 2015, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2003, 2017, 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
@ -1149,7 +1149,7 @@ public final class ProcessBuilder
* The {@link Process#getInputStream standard output} of all processes
* except the last process are <i>null input streams</i>.
* <p>
* The {@link #redirectErrorStream} of each ProcessBuilder applies to the
* The {@link #redirectErrorStream()} of each ProcessBuilder applies to the
* respective process. If set to {@code true}, the error stream is written
* to the same stream as standard output.
* <p>

View File

@ -42,6 +42,7 @@ import jdk.internal.HotSpotIntrinsicCandidate;
import sun.nio.cs.HistoricallyNamedCharset;
import sun.nio.cs.ArrayDecoder;
import sun.nio.cs.ArrayEncoder;
import sun.nio.cs.StandardCharsets;
import static java.lang.String.LATIN1;
import static java.lang.String.UTF16;
@ -61,9 +62,9 @@ class StringCoding {
private static final ThreadLocal<SoftReference<StringEncoder>> encoder =
new ThreadLocal<>();
private static final Charset ISO_8859_1 = Charset.forName("iso-8859-1");
private static final Charset US_ASCII = Charset.forName("us-ascii");
private static final Charset UTF_8 = Charset.forName("utf-8");
private static final Charset ISO_8859_1 = sun.nio.cs.ISO_8859_1.INSTANCE;
private static final Charset US_ASCII = sun.nio.cs.US_ASCII.INSTANCE;
private static final Charset UTF_8 = sun.nio.cs.UTF_8.INSTANCE;
private static boolean warnUnsupportedCharset = true;

View File

@ -47,9 +47,9 @@ import static java.lang.invoke.MethodHandleStatics.*;
* Method handles are dynamically and strongly typed according to their parameter and return types.
* They are not distinguished by the name or the defining class of their underlying methods.
* A method handle must be invoked using a symbolic type descriptor which matches
* the method handle's own {@linkplain #type type descriptor}.
* the method handle's own {@linkplain #type() type descriptor}.
* <p>
* Every method handle reports its type descriptor via the {@link #type type} accessor.
* Every method handle reports its type descriptor via the {@link #type() type} accessor.
* This type descriptor is a {@link java.lang.invoke.MethodType MethodType} object,
* whose structure is a series of classes, one of which is
* the return type of the method (or {@code void.class} if none).
@ -468,7 +468,7 @@ public abstract class MethodHandle {
/**
* Invokes the method handle, allowing any caller type descriptor, but requiring an exact type match.
* The symbolic type descriptor at the call site of {@code invokeExact} must
* exactly match this method handle's {@link #type type}.
* exactly match this method handle's {@link #type() type}.
* No conversions are allowed on arguments or return values.
* <p>
* When this method is observed via the Core Reflection API,
@ -489,7 +489,7 @@ public abstract class MethodHandle {
* Invokes the method handle, allowing any caller type descriptor,
* and optionally performing conversions on arguments and return values.
* <p>
* If the call site's symbolic type descriptor exactly matches this method handle's {@link #type type},
* If the call site's symbolic type descriptor exactly matches this method handle's {@link #type() type},
* the call proceeds as if by {@link #invokeExact invokeExact}.
* <p>
* Otherwise, the call proceeds as if this method handle were first

View File

@ -131,7 +131,7 @@ public class MethodHandles {
* It can only be used to create method handles to public members of
* public classes in packages that are exported unconditionally.
* <p>
* As a matter of pure convention, the {@linkplain Lookup#lookupClass lookup class}
* As a matter of pure convention, the {@linkplain Lookup#lookupClass() lookup class}
* of this lookup object will be {@link java.lang.Object}.
*
* @apiNote The use of Object is conventional, and because the lookup modes are
@ -259,10 +259,10 @@ public class MethodHandles {
* Therefore, method handle access
* restrictions must be enforced when a method handle is created.
* The caller class against which those restrictions are enforced
* is known as the {@linkplain #lookupClass lookup class}.
* is known as the {@linkplain #lookupClass() lookup class}.
* <p>
* A lookup class which needs to create method handles will call
* {@link MethodHandles#lookup MethodHandles.lookup} to create a factory for itself.
* {@link MethodHandles#lookup() MethodHandles.lookup} to create a factory for itself.
* When the {@code Lookup} factory object is created, the identity of the lookup class is
* determined, and securely stored in the {@code Lookup} object.
* The lookup class (or its delegates) may then use factory methods
@ -776,7 +776,7 @@ public class MethodHandles {
/**
* Creates a lookup on the specified new lookup class.
* The resulting object will report the specified
* class as its own {@link #lookupClass lookupClass}.
* class as its own {@link #lookupClass() lookupClass}.
* <p>
* However, the resulting {@code Lookup} object is guaranteed
* to have no more access capabilities than the original.
@ -4602,7 +4602,7 @@ assertEquals("boojum", (String) catTrace.invokeExact("boo", "jum"));
* <li>At this point, every non-init function parameter list is effectively identical to the internal parameter
* list {@code (V... A...)}, but some lists may be shorter. For every non-init function with a short parameter list,
* pad out the end of the list.
* <li>Argument lists are padded out by {@linkplain #dropArgumentsToMatch dropping unused trailing arguments}.
* <li>Argument lists are padded out by {@linkplain #dropArgumentsToMatch(MethodHandle, int, List, int) dropping unused trailing arguments}.
* </ol>
* <p>
* <em>Final observations.</em><ol type="a">
@ -4697,7 +4697,7 @@ assertEquals("boojum", (String) catTrace.invokeExact("boo", "jum"));
* }</pre></blockquote>
* Note that the parameter type lists {@code (V...)} and {@code (A...)} have been expanded
* to their full length, even though individual clause functions may neglect to take them all.
* As noted above, missing parameters are filled in as if by {@link #dropArgumentsToMatch}.
* As noted above, missing parameters are filled in as if by {@link #dropArgumentsToMatch(MethodHandle, int, List, int)}.
*
* @apiNote Example:
* <blockquote><pre>{@code

View File

@ -1826,7 +1826,7 @@ public abstract class VarHandle {
* value associated with method name (indicating the method
* name does not correspond to a {@code VarHandle}
* signature-polymorphic method name).
* @see #methodName
* @see #methodName()
*/
public static AccessMode valueFromMethodName(String methodName) {
AccessMode am = methodNameToAccessMode.get(methodName);

View File

@ -47,7 +47,8 @@ import jdk.internal.module.ModuleTarget;
/**
* A configuration that is the result of <a href="package-summary.html#resolution">
* resolution</a> or resolution with <a href="#service-binding">service binding</a>.
* resolution</a> or resolution with
* <a href="{@docRoot}/java/lang/module/Configuration.html#service-binding">service binding</a>.
*
* <p> A configuration encapsulates the <em>readability graph</em> that is the
* output of resolution. A readability graph is a directed graph whose vertices
@ -421,7 +422,7 @@ public final class Configuration {
* resolve} except that the graph of resolved modules is augmented
* with modules induced by the service-use dependence relation. </p>
*
* <p id="service-binding"> More specifically, the root modules are
* <p><a id="service-binding"></a>More specifically, the root modules are
* resolved as if by calling {@code resolve}. The resolved modules, and
* all modules in the parent configurations, with {@link ModuleDescriptor#uses()
* service dependences} are then examined. All modules found by the given
@ -520,7 +521,7 @@ public final class Configuration {
/**
* Finds a resolved module in this configuration, or if not in this
* configuration, the {@linkplain #parents parent} configurations.
* configuration, the {@linkplain #parents() parent} configurations.
* Finding a module in parent configurations is equivalent to invoking
* {@code findModule} on each parent, in search order, until the module
* is found or all parents have been searched. In a <em>tree of

View File

@ -1331,7 +1331,7 @@ public class ModuleDescriptor
/**
* <p> Returns {@code true} if this is an open module. </p>
*
* <p> This method is equivalent to testing if the set of {@link #modifiers
* <p> This method is equivalent to testing if the set of {@link #modifiers()
* modifiers} contains the {@link Modifier#OPEN OPEN} modifier. </p>
*
* @return {@code true} if this is an open module
@ -1343,7 +1343,7 @@ public class ModuleDescriptor
/**
* <p> Returns {@code true} if this is an automatic module. </p>
*
* <p> This method is equivalent to testing if the set of {@link #modifiers
* <p> This method is equivalent to testing if the set of {@link #modifiers()
* modifiers} contains the {@link Modifier#OPEN AUTOMATIC} modifier. </p>
*
* @return {@code true} if this is an automatic module
@ -1689,7 +1689,7 @@ public class ModuleDescriptor
* @return This builder
*
* @throws IllegalStateException
* If the {@link Exports#source package} is already declared as
* If the {@link Exports#source() package} is already declared as
* exported or this builder is for an automatic module
*/
public Builder exports(Exports e) {

View File

@ -37,7 +37,6 @@ import java.nio.charset.CoderResult;
import java.nio.charset.CodingErrorAction;
import java.nio.charset.CharacterCodingException;
import java.text.Normalizer;
import jdk.internal.loader.URLClassPath;
import jdk.internal.misc.JavaNetUriAccess;
import jdk.internal.misc.SharedSecrets;
import sun.nio.cs.ThreadLocalCoders;
@ -2528,51 +2527,54 @@ public final class URI
// precompiling the mask information so that a character's presence in a
// given mask could be determined by a single table lookup.
// To save startup time, we manually calculate the low-/highMask constants.
// For reference, the following methods were used to calculate the values:
// Compute the low-order mask for the characters in the given string
private static long lowMask(String chars) {
int n = chars.length();
long m = 0;
for (int i = 0; i < n; i++) {
char c = chars.charAt(i);
if (c < 64)
m |= (1L << c);
}
return m;
}
// private static long lowMask(String chars) {
// int n = chars.length();
// long m = 0;
// for (int i = 0; i < n; i++) {
// char c = chars.charAt(i);
// if (c < 64)
// m |= (1L << c);
// }
// return m;
// }
// Compute the high-order mask for the characters in the given string
private static long highMask(String chars) {
int n = chars.length();
long m = 0;
for (int i = 0; i < n; i++) {
char c = chars.charAt(i);
if ((c >= 64) && (c < 128))
m |= (1L << (c - 64));
}
return m;
}
// private static long highMask(String chars) {
// int n = chars.length();
// long m = 0;
// for (int i = 0; i < n; i++) {
// char c = chars.charAt(i);
// if ((c >= 64) && (c < 128))
// m |= (1L << (c - 64));
// }
// return m;
// }
// Compute a low-order mask for the characters
// between first and last, inclusive
private static long lowMask(char first, char last) {
long m = 0;
int f = Math.max(Math.min(first, 63), 0);
int l = Math.max(Math.min(last, 63), 0);
for (int i = f; i <= l; i++)
m |= 1L << i;
return m;
}
// private static long lowMask(char first, char last) {
// long m = 0;
// int f = Math.max(Math.min(first, 63), 0);
// int l = Math.max(Math.min(last, 63), 0);
// for (int i = f; i <= l; i++)
// m |= 1L << i;
// return m;
// }
// Compute a high-order mask for the characters
// between first and last, inclusive
private static long highMask(char first, char last) {
long m = 0;
int f = Math.max(Math.min(first, 127), 64) - 64;
int l = Math.max(Math.min(last, 127), 64) - 64;
for (int i = f; i <= l; i++)
m |= 1L << i;
return m;
}
// private static long highMask(char first, char last) {
// long m = 0;
// int f = Math.max(Math.min(first, 127), 64) - 64;
// int l = Math.max(Math.min(last, 127), 64) - 64;
// for (int i = f; i <= l; i++)
// m |= 1L << i;
// return m;
// }
// Tell whether the given character is permitted by the given mask pair
private static boolean match(char c, long lowMask, long highMask) {
@ -2590,20 +2592,20 @@ public final class URI
// digit = "0" | "1" | "2" | "3" | "4" | "5" | "6" | "7" |
// "8" | "9"
private static final long L_DIGIT = lowMask('0', '9');
private static final long L_DIGIT = 0x3FF000000000000L; // lowMask('0', '9');
private static final long H_DIGIT = 0L;
// upalpha = "A" | "B" | "C" | "D" | "E" | "F" | "G" | "H" | "I" |
// "J" | "K" | "L" | "M" | "N" | "O" | "P" | "Q" | "R" |
// "S" | "T" | "U" | "V" | "W" | "X" | "Y" | "Z"
private static final long L_UPALPHA = 0L;
private static final long H_UPALPHA = highMask('A', 'Z');
private static final long H_UPALPHA = 0x7FFFFFEL; // highMask('A', 'Z');
// lowalpha = "a" | "b" | "c" | "d" | "e" | "f" | "g" | "h" | "i" |
// "j" | "k" | "l" | "m" | "n" | "o" | "p" | "q" | "r" |
// "s" | "t" | "u" | "v" | "w" | "x" | "y" | "z"
private static final long L_LOWALPHA = 0L;
private static final long H_LOWALPHA = highMask('a', 'z');
private static final long H_LOWALPHA = 0x7FFFFFE00000000L; // highMask('a', 'z');
// alpha = lowalpha | upalpha
private static final long L_ALPHA = L_LOWALPHA | L_UPALPHA;
@ -2616,12 +2618,12 @@ public final class URI
// hex = digit | "A" | "B" | "C" | "D" | "E" | "F" |
// "a" | "b" | "c" | "d" | "e" | "f"
private static final long L_HEX = L_DIGIT;
private static final long H_HEX = highMask('A', 'F') | highMask('a', 'f');
private static final long H_HEX = 0x7E0000007EL; // highMask('A', 'F') | highMask('a', 'f');
// mark = "-" | "_" | "." | "!" | "~" | "*" | "'" |
// "(" | ")"
private static final long L_MARK = lowMask("-_.!~*'()");
private static final long H_MARK = highMask("-_.!~*'()");
private static final long L_MARK = 0x678200000000L; // lowMask("-_.!~*'()");
private static final long H_MARK = 0x4000000080000000L; // highMask("-_.!~*'()");
// unreserved = alphanum | mark
private static final long L_UNRESERVED = L_ALPHANUM | L_MARK;
@ -2630,8 +2632,8 @@ public final class URI
// reserved = ";" | "/" | "?" | ":" | "@" | "&" | "=" | "+" |
// "$" | "," | "[" | "]"
// Added per RFC2732: "[", "]"
private static final long L_RESERVED = lowMask(";/?:@&=+$,[]");
private static final long H_RESERVED = highMask(";/?:@&=+$,[]");
private static final long L_RESERVED = 0xAC00985000000000L; // lowMask(";/?:@&=+$,[]");
private static final long H_RESERVED = 0x28000001L; // highMask(";/?:@&=+$,[]");
// The zero'th bit is used to indicate that escape pairs and non-US-ASCII
// characters are allowed; this is handled by the scanEscape method below.
@ -2645,60 +2647,58 @@ public final class URI
// pchar = unreserved | escaped |
// ":" | "@" | "&" | "=" | "+" | "$" | ","
private static final long L_PCHAR
= L_UNRESERVED | L_ESCAPED | lowMask(":@&=+$,");
= L_UNRESERVED | L_ESCAPED | 0x2400185000000000L; // lowMask(":@&=+$,");
private static final long H_PCHAR
= H_UNRESERVED | H_ESCAPED | highMask(":@&=+$,");
= H_UNRESERVED | H_ESCAPED | 0x1L; // highMask(":@&=+$,");
// All valid path characters
private static final long L_PATH = L_PCHAR | lowMask(";/");
private static final long H_PATH = H_PCHAR | highMask(";/");
private static final long L_PATH = L_PCHAR | 0x800800000000000L; // lowMask(";/");
private static final long H_PATH = H_PCHAR; // highMask(";/") == 0x0L;
// Dash, for use in domainlabel and toplabel
private static final long L_DASH = lowMask("-");
private static final long H_DASH = highMask("-");
private static final long L_DASH = 0x200000000000L; // lowMask("-");
private static final long H_DASH = 0x0L; // highMask("-");
// Dot, for use in hostnames
private static final long L_DOT = lowMask(".");
private static final long H_DOT = highMask(".");
private static final long L_DOT = 0x400000000000L; // lowMask(".");
private static final long H_DOT = 0x0L; // highMask(".");
// userinfo = *( unreserved | escaped |
// ";" | ":" | "&" | "=" | "+" | "$" | "," )
private static final long L_USERINFO
= L_UNRESERVED | L_ESCAPED | lowMask(";:&=+$,");
= L_UNRESERVED | L_ESCAPED | 0x2C00185000000000L; // lowMask(";:&=+$,");
private static final long H_USERINFO
= H_UNRESERVED | H_ESCAPED | highMask(";:&=+$,");
= H_UNRESERVED | H_ESCAPED; // | highMask(";:&=+$,") == 0L;
// reg_name = 1*( unreserved | escaped | "$" | "," |
// ";" | ":" | "@" | "&" | "=" | "+" )
private static final long L_REG_NAME
= L_UNRESERVED | L_ESCAPED | lowMask("$,;:@&=+");
= L_UNRESERVED | L_ESCAPED | 0x2C00185000000000L; // lowMask("$,;:@&=+");
private static final long H_REG_NAME
= H_UNRESERVED | H_ESCAPED | highMask("$,;:@&=+");
= H_UNRESERVED | H_ESCAPED | 0x1L; // highMask("$,;:@&=+");
// All valid characters for server-based authorities
private static final long L_SERVER
= L_USERINFO | L_ALPHANUM | L_DASH | lowMask(".:@[]");
= L_USERINFO | L_ALPHANUM | L_DASH | 0x400400000000000L; // lowMask(".:@[]");
private static final long H_SERVER
= H_USERINFO | H_ALPHANUM | H_DASH | highMask(".:@[]");
= H_USERINFO | H_ALPHANUM | H_DASH | 0x28000001L; // highMask(".:@[]");
// Special case of server authority that represents an IPv6 address
// In this case, a % does not signify an escape sequence
private static final long L_SERVER_PERCENT
= L_SERVER | lowMask("%");
= L_SERVER | 0x2000000000L; // lowMask("%");
private static final long H_SERVER_PERCENT
= H_SERVER | highMask("%");
private static final long L_LEFT_BRACKET = lowMask("[");
private static final long H_LEFT_BRACKET = highMask("[");
= H_SERVER; // | highMask("%") == 0L;
// scheme = alpha *( alpha | digit | "+" | "-" | "." )
private static final long L_SCHEME = L_ALPHA | L_DIGIT | lowMask("+-.");
private static final long H_SCHEME = H_ALPHA | H_DIGIT | highMask("+-.");
private static final long L_SCHEME = L_ALPHA | L_DIGIT | 0x680000000000L; // lowMask("+-.");
private static final long H_SCHEME = H_ALPHA | H_DIGIT; // | highMask("+-.") == 0L
// scope_id = alpha | digit | "_" | "."
private static final long L_SCOPE_ID
= L_ALPHANUM | lowMask("_.");
= L_ALPHANUM | 0x400000000000L; // lowMask("_.");
private static final long H_SCOPE_ID
= H_ALPHANUM | highMask("_.");
= H_ALPHANUM | 0x80000000L; // highMask("_.");
// -- Escaping and encoding --

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 1995, 2013, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 1995, 2017, 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
@ -531,7 +531,6 @@ public abstract class URLStreamHandler {
* @param ref the reference.
* @exception SecurityException if the protocol handler of the URL is
* different from this one
* @see java.net.URL#set(java.lang.String, java.lang.String, int, java.lang.String, java.lang.String)
* @since 1.3
*/
protected void setURL(URL u, String protocol, String host, int port,

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 2000, 2013, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2000, 2017, 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
@ -45,7 +45,7 @@ import sun.nio.ch.Interruptible;
* invoked, these methods should be used within a
* {@code try}&nbsp;...&nbsp;{@code finally} block:
*
* <blockquote><pre>
* <blockquote><pre id="be">
* boolean completed = false;
* try {
* begin();

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 2000, 2013, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2000, 2017, 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
@ -45,7 +45,7 @@ import java.util.concurrent.atomic.AtomicBoolean;
* invoked, these methods should be used within a
* {@code try}&nbsp;...&nbsp;{@code finally} block:
*
* <blockquote><pre>
* <blockquote><pre id="be">
* try {
* begin();
* // Perform blocking I/O operation here

View File

@ -609,7 +609,7 @@ public abstract class Charset
if (cs != null)
defaultCharset = cs;
else
defaultCharset = forName("UTF-8");
defaultCharset = sun.nio.cs.UTF_8.INSTANCE;
}
}
return defaultCharset;
@ -639,11 +639,10 @@ public abstract class Charset
String[] as = Objects.requireNonNullElse(aliases, zeroAliases);
// Skip checks for the standard, built-in Charsets we always load
// during initialization. Use of identity is intentional to be
// consistent with sun.nio.cs.StandardCharsets
if (canonicalName != StandardCharsets.ISO_8859_1
&& canonicalName != StandardCharsets.US_ASCII
&& canonicalName != StandardCharsets.UTF_8) {
// during initialization.
if (canonicalName != "ISO-8859-1"
&& canonicalName != "US-ASCII"
&& canonicalName != "UTF-8") {
checkName(canonicalName);
for (int i = 0; i < as.length; i++) {
checkName(as[i]);

View File

@ -41,15 +41,15 @@ public final class StandardCharsets {
* Seven-bit ASCII, a.k.a. ISO646-US, a.k.a. the Basic Latin block of the
* Unicode character set
*/
public static final Charset US_ASCII = Charset.forName("US-ASCII");
public static final Charset US_ASCII = sun.nio.cs.US_ASCII.INSTANCE;
/**
* ISO Latin Alphabet No. 1, a.k.a. ISO-LATIN-1
*/
public static final Charset ISO_8859_1 = Charset.forName("ISO-8859-1");
public static final Charset ISO_8859_1 = sun.nio.cs.ISO_8859_1.INSTANCE;
/**
* Eight-bit UCS Transformation Format
*/
public static final Charset UTF_8 = Charset.forName("UTF-8");
public static final Charset UTF_8 = sun.nio.cs.UTF_8.INSTANCE;
/**
* Sixteen-bit UCS Transformation Format, big-endian byte order
*/

View File

@ -50,7 +50,7 @@ import jdk.internal.misc.VM;
* machine. If the process of loading or initializing the default provider fails
* then an unspecified error is thrown.
*
* <p> The first invocation of the {@link FileSystemProvider#installedProviders
* <p> The first invocation of the {@link FileSystemProvider#installedProviders()
* installedProviders} method, by way of invoking any of the {@code
* newFileSystem} methods defined by this class, locates and loads all
* installed file system providers. Installed providers are loaded using the

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 2007, 2013, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2007, 2017, 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
@ -48,7 +48,7 @@ import java.util.*;
* {@link AclEntryPermission permissions}
* </p></li>
*
* <li><p> The {@link #flags flags} component is a set of {@link AclEntryFlag
* <li><p> The {@link #flags() flags} component is a set of {@link AclEntryFlag
* flags} to indicate how entries are inherited and propagated </p></li>
* </ol>
*

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2013, 2017, 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
@ -85,7 +85,8 @@ public final class PKCS12Attribute implements KeyStore.Entry.Attribute {
// Validate value
int length = value.length();
String[] values;
if (value.charAt(0) == '[' && value.charAt(length - 1) == ']') {
if (length > 1 &&
value.charAt(0) == '[' && value.charAt(length - 1) == ']') {
values = value.substring(1, length - 1).split(", ");
} else {
values = new String[]{ value };

View File

@ -88,7 +88,7 @@ import sun.util.locale.provider.LocaleServiceProviderPool;
* comparisons. Four strengths are provided: <code>PRIMARY</code>,
* <code>SECONDARY</code>, <code>TERTIARY</code>, and <code>IDENTICAL</code>.
* The exact assignment of strengths to language features is
* locale dependant. For example, in Czech, "e" and "f" are considered
* locale dependent. For example, in Czech, "e" and "f" are considered
* primary differences, while "e" and "&#283;" are secondary differences,
* "e" and "E" are tertiary differences and "e" and "e" are identical.
* The following shows how both case and accents could be ignored for
@ -132,7 +132,7 @@ public abstract class Collator
/**
* Collator strength value. When set, only PRIMARY differences are
* considered significant during comparison. The assignment of strengths
* to language features is locale dependant. A common example is for
* to language features is locale dependent. A common example is for
* different base letters ("a" vs "b") to be considered a PRIMARY difference.
* @see java.text.Collator#setStrength
* @see java.text.Collator#getStrength
@ -141,7 +141,7 @@ public abstract class Collator
/**
* Collator strength value. When set, only SECONDARY and above differences are
* considered significant during comparison. The assignment of strengths
* to language features is locale dependant. A common example is for
* to language features is locale dependent. A common example is for
* different accented forms of the same base letter ("a" vs "\u00E4") to be
* considered a SECONDARY difference.
* @see java.text.Collator#setStrength
@ -151,7 +151,7 @@ public abstract class Collator
/**
* Collator strength value. When set, only TERTIARY and above differences are
* considered significant during comparison. The assignment of strengths
* to language features is locale dependant. A common example is for
* to language features is locale dependent. A common example is for
* case differences ("a" vs "A") to be considered a TERTIARY difference.
* @see java.text.Collator#setStrength
* @see java.text.Collator#getStrength
@ -161,7 +161,7 @@ public abstract class Collator
/**
* Collator strength value. When set, all differences are
* considered significant during comparison. The assignment of strengths
* to language features is locale dependant. A common example is for control
* to language features is locale dependent. A common example is for control
* characters ("&#092;u0001" vs "&#092;u0002") to be considered equal at the
* PRIMARY, SECONDARY, and TERTIARY levels but different at the IDENTICAL
* level. Additionally, differences between pre-composed accents such as

View File

@ -181,6 +181,17 @@ import sun.util.locale.provider.LocaleServiceProviderPool;
* The subclass may provide its own implementation and specification about
* {@code NullPointerException}.
*
* <p>
* The default implementation provides rounding modes defined
* in {@link java.math.RoundingMode} for formatting numbers. It
* uses the {@linkplain java.math.RoundingMode#HALF_EVEN
* round half-even algorithm}. To change the rounding mode use
* {@link #setRoundingMode(java.math.RoundingMode) setRoundingMode}.
* The {@code NumberFormat} returned by the static factory methods is
* configured to round floating point numbers using half-even
* rounding (see {@link java.math.RoundingMode#HALF_EVEN
* RoundingMode.HALF_EVEN}) for formatting.
*
* @see DecimalFormat
* @see ChoiceFormat
* @author Mark Davis
@ -401,7 +412,7 @@ public abstract class NumberFormat extends Format {
* For example in the English locale, with ParseIntegerOnly true, the
* string "1234." would be parsed as the integer value 1234 and parsing
* would stop at the "." character. Of course, the exact format accepted
* by the parse operation is locale dependant and determined by sub-classes
* by the parse operation is locale dependent and determined by sub-classes
* of NumberFormat.
*
* @return {@code true} if numbers should be parsed as integers only;
@ -646,7 +657,7 @@ public abstract class NumberFormat extends Format {
* Returns true if grouping is used in this format. For example, in the
* English locale, with grouping on, the number 1234567 might be formatted
* as "1,234,567". The grouping separator as well as the size of each group
* is locale dependant and is determined by sub-classes of NumberFormat.
* is locale dependent and is determined by sub-classes of NumberFormat.
*
* @return {@code true} if grouping is used;
* {@code false} otherwise

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 2012, 2013, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2012, 2017, 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
@ -64,10 +64,13 @@ package java.time.chrono;
import static java.time.temporal.ChronoField.ERA;
import java.time.DateTimeException;
import java.time.format.DateTimeFormatterBuilder;
import java.time.format.TextStyle;
import java.time.temporal.ChronoField;
import java.time.temporal.TemporalField;
import java.time.temporal.UnsupportedTemporalTypeException;
import java.time.temporal.ValueRange;
import java.util.Locale;
/**
* An era in the Hijrah calendar system.
@ -155,4 +158,18 @@ public enum HijrahEra implements Era {
return Era.super.range(field);
}
/**
* {@inheritDoc}
*
* @param style {@inheritDoc}
* @param locale {@inheritDoc}
*/
@Override
public String getDisplayName(TextStyle style, Locale locale) {
return new DateTimeFormatterBuilder()
.appendText(ERA, style)
.toFormatter(locale)
.withChronology(HijrahChronology.INSTANCE)
.format(HijrahDate.now());
}
}

View File

@ -73,6 +73,7 @@ import java.io.ObjectStreamException;
import java.io.Serializable;
import java.time.DateTimeException;
import java.time.LocalDate;
import java.time.format.DateTimeFormatterBuilder;
import java.time.format.TextStyle;
import java.time.temporal.ChronoField;
import java.time.temporal.TemporalField;
@ -253,7 +254,12 @@ public final class JapaneseEra
Objects.requireNonNull(locale, "locale");
return style.asNormal() == TextStyle.NARROW ? getAbbreviation() : getName();
}
return Era.super.getDisplayName(style, locale);
return new DateTimeFormatterBuilder()
.appendText(ERA, style)
.toFormatter(locale)
.withChronology(JapaneseChronology.INSTANCE)
.format(this == MEIJI ? MEIJI_6_ISODATE : since);
}
//-----------------------------------------------------------------------

View File

@ -61,7 +61,12 @@
*/
package java.time.chrono;
import static java.time.temporal.ChronoField.ERA;
import java.time.DateTimeException;
import java.time.format.DateTimeFormatterBuilder;
import java.time.format.TextStyle;
import java.util.Locale;
/**
* An era in the Minguo calendar system.
@ -153,4 +158,19 @@ public enum MinguoEra implements Era {
return ordinal();
}
/**
* {@inheritDoc}
*
* @param style {@inheritDoc}
* @param locale {@inheritDoc}
*/
@Override
public String getDisplayName(TextStyle style, Locale locale) {
return new DateTimeFormatterBuilder()
.appendText(ERA, style)
.toFormatter(locale)
.withChronology(MinguoChronology.INSTANCE)
.format(this == ROC ? MinguoDate.of(1, 1, 1) : MinguoDate.of(0, 1, 1));
}
}

View File

@ -61,7 +61,12 @@
*/
package java.time.chrono;
import static java.time.temporal.ChronoField.ERA;
import java.time.DateTimeException;
import java.time.format.DateTimeFormatterBuilder;
import java.time.format.TextStyle;
import java.util.Locale;
/**
* An era in the Thai Buddhist calendar system.
@ -153,4 +158,19 @@ public enum ThaiBuddhistEra implements Era {
return ordinal();
}
/**
* {@inheritDoc}
*
* @param style {@inheritDoc}
* @param locale {@inheritDoc}
*/
@Override
public String getDisplayName(TextStyle style, Locale locale) {
return new DateTimeFormatterBuilder()
.appendText(ERA, style)
.toFormatter(locale)
.withChronology(ThaiBuddhistChronology.INSTANCE)
.format(this == BE ? ThaiBuddhistDate.of(1, 1, 1) : ThaiBuddhistDate.of(0, 1, 1));
}
}

View File

@ -1399,7 +1399,7 @@ public abstract class Calendar implements Serializable, Cloneable, Comparable<Ca
/**
* Sets the week definition parameters to the values given by
* {@code firstDayOfWeek} and {@code minimalDaysInFirstWeek} that are
* used to determine the <a href="Calendar.html#First_Week">first
* used to determine the <a href="Calendar.html#first_week">first
* week</a> of a year. The parameters given by this method have
* precedence over the default values given by the
* {@linkplain #setLocale(Locale) locale}.

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 1997, 2017, 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
@ -171,10 +171,10 @@ public interface Collection<E> extends Iterable<E> {
* element
* @throws ClassCastException if the type of the specified element
* is incompatible with this collection
* (<a href="#optional-restrictions">optional</a>)
* (<a href="{@docRoot}/java/util/Collection.html#optional-restrictions">optional</a>)
* @throws NullPointerException if the specified element is null and this
* collection does not permit null elements
* (<a href="#optional-restrictions">optional</a>)
* (<a href="{@docRoot}/java/util/Collection.html#optional-restrictions">optional</a>)
*/
boolean contains(Object o);
@ -301,10 +301,10 @@ public interface Collection<E> extends Iterable<E> {
* @return {@code true} if an element was removed as a result of this call
* @throws ClassCastException if the type of the specified element
* is incompatible with this collection
* (<a href="#optional-restrictions">optional</a>)
* (<a href="{@docRoot}/java/util/Collection.html#optional-restrictions">optional</a>)
* @throws NullPointerException if the specified element is null and this
* collection does not permit null elements
* (<a href="#optional-restrictions">optional</a>)
* (<a href="{@docRoot}/java/util/Collection.html#optional-restrictions">optional</a>)
* @throws UnsupportedOperationException if the {@code remove} operation
* is not supported by this collection
*/
@ -323,11 +323,11 @@ public interface Collection<E> extends Iterable<E> {
* @throws ClassCastException if the types of one or more elements
* in the specified collection are incompatible with this
* collection
* (<a href="#optional-restrictions">optional</a>)
* (<a href="{@docRoot}/java/util/Collection.html#optional-restrictions">optional</a>)
* @throws NullPointerException if the specified collection contains one
* or more null elements and this collection does not permit null
* elements
* (<a href="#optional-restrictions">optional</a>),
* (<a href="{@docRoot}/java/util/Collection.html#optional-restrictions">optional</a>),
* or if the specified collection is null.
* @see #contains(Object)
*/
@ -373,11 +373,11 @@ public interface Collection<E> extends Iterable<E> {
* @throws ClassCastException if the types of one or more elements
* in this collection are incompatible with the specified
* collection
* (<a href="#optional-restrictions">optional</a>)
* (<a href="{@docRoot}/java/util/Collection.html#optional-restrictions">optional</a>)
* @throws NullPointerException if this collection contains one or more
* null elements and the specified collection does not support
* null elements
* (<a href="#optional-restrictions">optional</a>),
* (<a href="{@docRoot}/java/util/Collection.html#optional-restrictions">optional</a>),
* or if the specified collection is null
* @see #remove(Object)
* @see #contains(Object)
@ -432,11 +432,11 @@ public interface Collection<E> extends Iterable<E> {
* @throws ClassCastException if the types of one or more elements
* in this collection are incompatible with the specified
* collection
* (<a href="#optional-restrictions">optional</a>)
* (<a href="{@docRoot}/java/util/Collection.html#optional-restrictions">optional</a>)
* @throws NullPointerException if this collection contains one or more
* null elements and the specified collection does not permit null
* elements
* (<a href="#optional-restrictions">optional</a>),
* (<a href="{@docRoot}/java/util/Collection.html#optional-restrictions">optional</a>),
* or if the specified collection is null
* @see #remove(Object)
* @see #contains(Object)

View File

@ -1229,7 +1229,7 @@ import jdk.internal.math.FormattedFloatingDecimal;
* than the number of digits which would appear after the decimal point in
* the string returned by {@link Float#toString(float)} or {@link
* Double#toString(double)} respectively, then the value will be rounded
* using the {@linkplain java.math.BigDecimal#ROUND_HALF_UP round half up
* using the {@linkplain java.math.RoundingMode#HALF_UP round half up
* algorithm}. Otherwise, zeros may be appended to reach the precision.
* For a canonical representation of the value, use {@link
* Float#toString(float)} or {@link Double#toString(double)} as
@ -1298,7 +1298,7 @@ import jdk.internal.math.FormattedFloatingDecimal;
* than the number of digits which would appear after the decimal point in
* the string returned by {@link Float#toString(float)} or {@link
* Double#toString(double)} respectively, then the value will be rounded
* using the {@linkplain java.math.BigDecimal#ROUND_HALF_UP round half up
* using the {@linkplain java.math.RoundingMode#HALF_UP round half up
* algorithm}. Otherwise, zeros may be appended to reach the precision.
* For a canonical representation of the value, use {@link
* Float#toString(float)} or {@link Double#toString(double)} as
@ -1461,7 +1461,7 @@ import jdk.internal.math.FormattedFloatingDecimal;
* specified then the default value is {@code 6}. If the precision is
* less than the number of digits to the right of the decimal point then
* the value will be rounded using the
* {@linkplain java.math.BigDecimal#ROUND_HALF_UP round half up
* {@linkplain java.math.RoundingMode#HALF_UP round half up
* algorithm}. Otherwise, zeros may be appended to reach the precision.
* For a canonical representation of the value, use {@link
* BigDecimal#toString()}.
@ -1524,7 +1524,7 @@ import jdk.internal.math.FormattedFloatingDecimal;
* specified then the default value is {@code 6}. If the precision is
* less than the number of digits to the right of the decimal point
* then the value will be rounded using the
* {@linkplain java.math.BigDecimal#ROUND_HALF_UP round half up
* {@linkplain java.math.RoundingMode#HALF_UP round half up
* algorithm}. Otherwise, zeros may be appended to reach the precision.
* For a canonical representation of the value, use {@link
* BigDecimal#toString()}.

View File

@ -1345,7 +1345,6 @@ class Properties extends Hashtable<Object,Object> {
return map.remove(key, value);
}
/** @hidden */
@Override
public synchronized boolean replace(Object key, Object oldValue, Object newValue) {
return map.replace(key, oldValue, newValue);

View File

@ -49,7 +49,9 @@ import java.security.ProtectionDomain;
* and termination methods surrounding the main task processing loop.
* If you do create such a subclass, you will also need to supply a
* custom {@link ForkJoinPool.ForkJoinWorkerThreadFactory} to
* {@linkplain ForkJoinPool#ForkJoinPool use it} in a {@code ForkJoinPool}.
* {@linkplain ForkJoinPool#ForkJoinPool(int, ForkJoinWorkerThreadFactory,
* UncaughtExceptionHandler, boolean, int, int, int, Predicate, long, TimeUnit)
* use it} in a {@code ForkJoinPool}.
*
* @since 1.7
* @author Doug Lea

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 1998, 2006, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 1998, 2017, 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
@ -37,7 +37,7 @@
* <ul>
* <li><b>Info-ZIP file format</b> - The JAR format is based on the Info-ZIP
* file format. See
* <a href="../zip/package-summary.html#package_description">java.util.zip
* <a href="../zip/package-summary.html#package.description">java.util.zip
* package description.</a> <p>
* In JAR files, all file names must be encoded in the UTF-8 encoding.
* <li><a href="{@docRoot}/../specs/jar/jar.html">

View File

@ -137,9 +137,10 @@ public abstract class AbstractResourceBundleProvider implements ResourceBundlePr
*
* <p>For example, if {@code baseName} is {@code "p.resources.Bundle"} then
* the resource bundle name of {@code "p.resources.Bundle"} of
* {@code Locale("ja",&nbsp;"",&nbsp;"XX")} and {@code Locale("en")}
* could be {@code "p.resources.ja.Bundle_ja_&thinsp;_XX"} and
* {@code p.resources.Bundle_en"} respectively
* <code style="white-space:nowrap">Locale("ja", "", "XX")</code>
* and {@code Locale("en")} could be <code style="white-space:nowrap">
* "p.resources.ja.Bundle_ja_&thinsp;_XX"</code> and
* {@code "p.resources.Bundle_en"} respectively.
*
* <p> This method is called from the default implementation of the
* {@link #getBundle(String, Locale)} method.

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 2012, 2015, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2012, 2017, 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
@ -415,7 +415,7 @@
* elements -- but a properly constructed reduce operation is inherently
* parallelizable, so long as the function(s) used to process the elements
* are <a href="package-summary.html#Associativity">associative</a> and
* <a href="package-summary.html#NonInterfering">stateless</a>.
* <a href="package-summary.html#Statelessness">stateless</a>.
* For example, given a stream of numbers for which we want to find the sum, we
* can write:
* <pre>{@code

View File

@ -30,7 +30,7 @@ package java.util.zip;
* popular ZLIB compression library. The ZLIB compression library was
* initially developed as part of the PNG graphics standard and is not
* protected by patents. It is fully described in the specifications at
* the <a href="package-summary.html#package_description">java.util.zip
* the <a href="package-summary.html#package.description">java.util.zip
* package description</a>.
*
* <p>The following code fragment demonstrates a trivial compression

View File

@ -30,7 +30,7 @@ package java.util.zip;
* popular ZLIB compression library. The ZLIB compression library was
* initially developed as part of the PNG graphics standard and is not
* protected by patents. It is fully described in the specifications at
* the <a href="package-summary.html#package_description">java.util.zip
* the <a href="package-summary.html#package.description">java.util.zip
* package description</a>.
*
* <p>The following code fragment demonstrates a trivial compression

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 2003, 2015, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2003, 2017, 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
@ -213,7 +213,7 @@ public class SSLEngineResult {
*
* @param sequenceNumber
* the sequence number (unsigned long) of the produced or
* consumed SSL/TLS/DTLS record, or ${@code -1L} if no record
* consumed SSL/TLS/DTLS record, or {@code -1L} if no record
* produced or consumed
*
* @throws IllegalArgumentException
@ -299,7 +299,7 @@ public class SSLEngineResult {
* implementation.
*
* @return the sequence number of the produced or consumed SSL/TLS/DTLS
* record; or ${@code -1L} if no record is produced or consumed,
* record; or {@code -1L} if no record is produced or consumed,
* or this operation is not supported by the underlying provider
*
* @see java.lang.Long#compareUnsigned(long, long)

View File

@ -215,10 +215,10 @@ public final class ModuleBootstrap {
// Step 2a: If --validate-modules is specified then the VM needs to
// start with only java.base, all other options are ignored.
// start with only system modules, all other options are ignored.
if (getAndRemoveProperty("jdk.module.minimumBoot") != null) {
return createMinimalBootLayer();
if (getAndRemoveProperty("jdk.module.validation") != null) {
return createBootLayerForValidation();
}
@ -421,12 +421,19 @@ public final class ModuleBootstrap {
}
/**
* Create a "minimal" boot module layer that only contains java.base.
* Create a boot module layer for validation that resolves all
* system modules.
*/
private static ModuleLayer createMinimalBootLayer() {
private static ModuleLayer createBootLayerForValidation() {
Set<String> allSystem = ModuleFinder.ofSystem().findAll()
.stream()
.map(ModuleReference::descriptor)
.map(ModuleDescriptor::name)
.collect(Collectors.toSet());
Configuration cf = SharedSecrets.getJavaLangModuleAccess()
.resolveAndBind(ModuleFinder.ofSystem(),
Set.of(JAVA_BASE),
allSystem,
null);
Function<String, ClassLoader> clf = ModuleLoaderMap.mappingFunction(cf);

View File

@ -25,7 +25,6 @@
package sun.net.www;
import java.util.BitSet;
import java.io.File;
import java.net.URL;
import java.net.MalformedURLException;
@ -34,6 +33,7 @@ import java.net.URISyntaxException;
import java.nio.ByteBuffer;
import java.nio.CharBuffer;
import java.nio.charset.CharacterCodingException;
import sun.nio.cs.ThreadLocalCoders;
import java.nio.charset.CharsetDecoder;
import java.nio.charset.CoderResult;
@ -45,43 +45,6 @@ import java.nio.charset.CodingErrorAction;
*/
public class ParseUtil {
static BitSet encodedInPath;
static {
encodedInPath = new BitSet(128);
// Set the bits corresponding to characters that are encoded in the
// path component of a URI.
// These characters are reserved in the path segment as described in
// RFC2396 section 3.3.
encodedInPath.set('=');
encodedInPath.set(';');
encodedInPath.set('?');
encodedInPath.set('/');
// These characters are defined as excluded in RFC2396 section 2.4.3
// and must be escaped if they occur in the data part of a URI.
encodedInPath.set('#');
encodedInPath.set(' ');
encodedInPath.set('<');
encodedInPath.set('>');
encodedInPath.set('%');
encodedInPath.set('"');
encodedInPath.set('{');
encodedInPath.set('}');
encodedInPath.set('|');
encodedInPath.set('\\');
encodedInPath.set('^');
encodedInPath.set('[');
encodedInPath.set(']');
encodedInPath.set('`');
// US ASCII control characters 00-1F and 7F.
for (int i=0; i<32; i++)
encodedInPath.set(i);
encodedInPath.set(127);
}
/**
* Constructs an encoded version of the specified path string suitable
@ -122,7 +85,7 @@ public class ParseUtil {
c >= 'A' && c <= 'Z' ||
c >= '0' && c <= '9') {
continue;
} else if (c > 0x007F || encodedInPath.get(c)) {
} else if (c > 0x007F || match(c, L_ENCODED, H_ENCODED)) {
return i;
}
}
@ -147,7 +110,7 @@ public class ParseUtil {
c >= 'A' && c <= 'Z' ||
c >= '0' && c <= '9') {
retCC[retLen++] = c;
} else if (encodedInPath.get(c)) {
} else if (match(c, L_ENCODED, H_ENCODED)) {
retLen = escape(retCC, c, retLen);
} else {
retCC[retLen++] = c;
@ -570,76 +533,79 @@ public class ParseUtil {
// -- Character classes for parsing --
// To save startup time, we manually calculate the low-/highMask constants.
// For reference, the following methods were used to calculate the values:
// Compute a low-order mask for the characters
// between first and last, inclusive
private static long lowMask(char first, char last) {
long m = 0;
int f = Math.max(Math.min(first, 63), 0);
int l = Math.max(Math.min(last, 63), 0);
for (int i = f; i <= l; i++)
m |= 1L << i;
return m;
}
// private static long lowMask(char first, char last) {
// long m = 0;
// int f = Math.max(Math.min(first, 63), 0);
// int l = Math.max(Math.min(last, 63), 0);
// for (int i = f; i <= l; i++)
// m |= 1L << i;
// return m;
// }
// Compute the low-order mask for the characters in the given string
private static long lowMask(String chars) {
int n = chars.length();
long m = 0;
for (int i = 0; i < n; i++) {
char c = chars.charAt(i);
if (c < 64)
m |= (1L << c);
}
return m;
}
// private static long lowMask(String chars) {
// int n = chars.length();
// long m = 0;
// for (int i = 0; i < n; i++) {
// char c = chars.charAt(i);
// if (c < 64)
// m |= (1L << c);
// }
// return m;
// }
// Compute a high-order mask for the characters
// between first and last, inclusive
private static long highMask(char first, char last) {
long m = 0;
int f = Math.max(Math.min(first, 127), 64) - 64;
int l = Math.max(Math.min(last, 127), 64) - 64;
for (int i = f; i <= l; i++)
m |= 1L << i;
return m;
}
// private static long highMask(char first, char last) {
// long m = 0;
// int f = Math.max(Math.min(first, 127), 64) - 64;
// int l = Math.max(Math.min(last, 127), 64) - 64;
// for (int i = f; i <= l; i++)
// m |= 1L << i;
// return m;
// }
// Compute the high-order mask for the characters in the given string
private static long highMask(String chars) {
int n = chars.length();
long m = 0;
for (int i = 0; i < n; i++) {
char c = chars.charAt(i);
if ((c >= 64) && (c < 128))
m |= (1L << (c - 64));
}
return m;
}
// private static long highMask(String chars) {
// int n = chars.length();
// long m = 0;
// for (int i = 0; i < n; i++) {
// char c = chars.charAt(i);
// if ((c >= 64) && (c < 128))
// m |= (1L << (c - 64));
// }
// return m;
// }
// Character-class masks
// digit = "0" | "1" | "2" | "3" | "4" | "5" | "6" | "7" |
// "8" | "9"
private static final long L_DIGIT = lowMask('0', '9');
private static final long L_DIGIT = 0x3FF000000000000L; // lowMask('0', '9');
private static final long H_DIGIT = 0L;
// hex = digit | "A" | "B" | "C" | "D" | "E" | "F" |
// "a" | "b" | "c" | "d" | "e" | "f"
private static final long L_HEX = L_DIGIT;
private static final long H_HEX = highMask('A', 'F') | highMask('a', 'f');
private static final long H_HEX = 0x7E0000007EL; // highMask('A', 'F') | highMask('a', 'f');
// upalpha = "A" | "B" | "C" | "D" | "E" | "F" | "G" | "H" | "I" |
// "J" | "K" | "L" | "M" | "N" | "O" | "P" | "Q" | "R" |
// "S" | "T" | "U" | "V" | "W" | "X" | "Y" | "Z"
private static final long L_UPALPHA = 0L;
private static final long H_UPALPHA = highMask('A', 'Z');
private static final long H_UPALPHA = 0x7FFFFFEL; // highMask('A', 'Z');
// lowalpha = "a" | "b" | "c" | "d" | "e" | "f" | "g" | "h" | "i" |
// "j" | "k" | "l" | "m" | "n" | "o" | "p" | "q" | "r" |
// "s" | "t" | "u" | "v" | "w" | "x" | "y" | "z"
private static final long L_LOWALPHA = 0L;
private static final long H_LOWALPHA = highMask('a', 'z');
private static final long H_LOWALPHA = 0x7FFFFFE00000000L; // highMask('a', 'z');
// alpha = lowalpha | upalpha
private static final long L_ALPHA = L_LOWALPHA | L_UPALPHA;
@ -651,8 +617,8 @@ public class ParseUtil {
// mark = "-" | "_" | "." | "!" | "~" | "*" | "'" |
// "(" | ")"
private static final long L_MARK = lowMask("-_.!~*'()");
private static final long H_MARK = highMask("-_.!~*'()");
private static final long L_MARK = 0x678200000000L; // lowMask("-_.!~*'()");
private static final long H_MARK = 0x4000000080000000L; // highMask("-_.!~*'()");
// unreserved = alphanum | mark
private static final long L_UNRESERVED = L_ALPHANUM | L_MARK;
@ -661,18 +627,14 @@ public class ParseUtil {
// reserved = ";" | "/" | "?" | ":" | "@" | "&" | "=" | "+" |
// "$" | "," | "[" | "]"
// Added per RFC2732: "[", "]"
private static final long L_RESERVED = lowMask(";/?:@&=+$,[]");
private static final long H_RESERVED = highMask(";/?:@&=+$,[]");
private static final long L_RESERVED = 0xAC00985000000000L; // lowMask(";/?:@&=+$,[]");
private static final long H_RESERVED = 0x28000001L; // highMask(";/?:@&=+$,[]");
// The zero'th bit is used to indicate that escape pairs and non-US-ASCII
// characters are allowed; this is handled by the scanEscape method below.
private static final long L_ESCAPED = 1L;
private static final long H_ESCAPED = 0L;
// Dash, for use in domainlabel and toplabel
private static final long L_DASH = lowMask("-");
private static final long H_DASH = highMask("-");
// uric = reserved | unreserved | escaped
private static final long L_URIC = L_RESERVED | L_UNRESERVED | L_ESCAPED;
private static final long H_URIC = H_RESERVED | H_UNRESERVED | H_ESCAPED;
@ -680,31 +642,55 @@ public class ParseUtil {
// pchar = unreserved | escaped |
// ":" | "@" | "&" | "=" | "+" | "$" | ","
private static final long L_PCHAR
= L_UNRESERVED | L_ESCAPED | lowMask(":@&=+$,");
= L_UNRESERVED | L_ESCAPED | 0x2400185000000000L; // lowMask(":@&=+$,");
private static final long H_PCHAR
= H_UNRESERVED | H_ESCAPED | highMask(":@&=+$,");
= H_UNRESERVED | H_ESCAPED | 0x1L; // highMask(":@&=+$,");
// All valid path characters
private static final long L_PATH = L_PCHAR | lowMask(";/");
private static final long H_PATH = H_PCHAR | highMask(";/");
private static final long L_PATH = L_PCHAR | 0x800800000000000L; // lowMask(";/");
private static final long H_PATH = H_PCHAR; // highMask(";/") == 0x0L;
// Dash, for use in domainlabel and toplabel
private static final long L_DASH = 0x200000000000L; // lowMask("-");
private static final long H_DASH = 0x0L; // highMask("-");
// userinfo = *( unreserved | escaped |
// ";" | ":" | "&" | "=" | "+" | "$" | "," )
private static final long L_USERINFO
= L_UNRESERVED | L_ESCAPED | lowMask(";:&=+$,");
= L_UNRESERVED | L_ESCAPED | 0x2C00185000000000L; // lowMask(";:&=+$,");
private static final long H_USERINFO
= H_UNRESERVED | H_ESCAPED | highMask(";:&=+$,");
= H_UNRESERVED | H_ESCAPED; // | highMask(";:&=+$,") == 0L;
// reg_name = 1*( unreserved | escaped | "$" | "," |
// ";" | ":" | "@" | "&" | "=" | "+" )
private static final long L_REG_NAME
= L_UNRESERVED | L_ESCAPED | lowMask("$,;:@&=+");
= L_UNRESERVED | L_ESCAPED | 0x2C00185000000000L; // lowMask("$,;:@&=+");
private static final long H_REG_NAME
= H_UNRESERVED | H_ESCAPED | highMask("$,;:@&=+");
= H_UNRESERVED | H_ESCAPED | 0x1L; // highMask("$,;:@&=+");
// All valid characters for server-based authorities
private static final long L_SERVER
= L_USERINFO | L_ALPHANUM | L_DASH | lowMask(".:@[]");
= L_USERINFO | L_ALPHANUM | L_DASH | 0x400400000000000L; // lowMask(".:@[]");
private static final long H_SERVER
= H_USERINFO | H_ALPHANUM | H_DASH | highMask(".:@[]");
= H_USERINFO | H_ALPHANUM | H_DASH | 0x28000001L; // highMask(".:@[]");
// Characters that are encoded in the path component of a URI.
//
// These characters are reserved in the path segment as described in
// RFC2396 section 3.3:
// "=" | ";" | "?" | "/"
//
// These characters are defined as excluded in RFC2396 section 2.4.3
// and must be escaped if they occur in the data part of a URI:
// "#" | " " | "<" | ">" | "%" | "\"" | "{" | "}" | "|" | "\\" | "^" |
// "[" | "]" | "`"
//
// Also US ASCII control characters 00-1F and 7F.
// lowMask((char)0, (char)31) | lowMask("=;?/# <>%\"{}|\\^[]`");
private static final long L_ENCODED = 0xF800802DFFFFFFFFL;
// highMask((char)0x7F, (char)0x7F) | highMask("=;?/# <>%\"{}|\\^[]`");
private static final long H_ENCODED = 0xB800000178000000L;
}

View File

@ -602,7 +602,7 @@ public class Net {
/**
* Event masks for the various poll system calls.
* They will be set platform dependant in the static initializer below.
* They will be set platform dependent in the static initializer below.
*/
public static final short POLLIN;
public static final short POLLOUT;

View File

@ -52,7 +52,7 @@ import java.nio.charset.CodingErrorAction;
class CESU_8 extends Unicode
{
public CESU_8() {
super("CESU-8", StandardCharsets.aliases_CESU_8);
super("CESU-8", StandardCharsets.aliases_CESU_8());
}
public String historicalName() {

View File

@ -31,18 +31,19 @@ import java.nio.charset.Charset;
import java.nio.charset.CharsetDecoder;
import java.nio.charset.CharsetEncoder;
import java.nio.charset.CoderResult;
import java.util.Arrays;
import java.util.Objects;
import jdk.internal.HotSpotIntrinsicCandidate;
class ISO_8859_1
public class ISO_8859_1
extends Charset
implements HistoricallyNamedCharset
{
public static final ISO_8859_1 INSTANCE = new ISO_8859_1();
public ISO_8859_1() {
super(StandardCharsets.ISO_8859_1, StandardCharsets.aliases_ISO_8859_1);
super("ISO-8859-1", StandardCharsets.aliases_ISO_8859_1());
}
public String historicalName() {

View File

@ -33,6 +33,8 @@ import java.nio.charset.Charset;
import java.nio.charset.spi.CharsetProvider;
import java.util.Iterator;
import java.util.Map;
import java.util.Set;
import jdk.internal.vm.annotation.Stable;
import sun.security.action.GetPropertyAction;
public class StandardCharsets extends CharsetProvider {
@ -43,31 +45,52 @@ public class StandardCharsets extends CharsetProvider {
_INCLUDE_CACHE_MAP_
// Maps canonical names to class names
private final Map<String,String> classMap;
private @Stable Map<String,String> classMap;
// Maps alias names to canonical names
private final Map<String,String> aliasMap;
private @Stable Map<String,String> aliasMap;
// Maps canonical names to cached instances
private final Map<String,Charset> cache;
private @Stable Map<String,Charset> cache;
private static final String packagePrefix = "sun.nio.cs";
public static final String US_ASCII = "US-ASCII";
public static final String ISO_8859_1 = "ISO-8859-1";
public static final String UTF_8 = "UTF-8";
private static final String packagePrefix = "sun.nio.cs.";
public StandardCharsets() {
this.aliasMap = new Aliases();
this.classMap = new Classes();
this.cache = new Cache();
}
private String canonicalize(String csn) {
String acn = aliasMap.get(csn);
String acn = aliasMap().get(csn);
return (acn != null) ? acn : csn;
}
private Map<String,String> aliasMap() {
Map<String,String> map = aliasMap;
if (map == null) {
aliasMap = map = new Aliases();
}
return map;
}
private Map<String,String> classMap() {
Map<String,String> map = classMap;
if (map == null) {
classMap = map = new Classes();
}
return map;
}
private Map<String,Charset> cache() {
Map<String,Charset> map = cache;
if (map == null) {
map = new Cache();
map.put("utf-8", UTF_8.INSTANCE);
map.put("iso-8859-1", ISO_8859_1.INSTANCE);
map.put("us-ascii", US_ASCII.INSTANCE);
cache = map;
}
return map;
}
// Private ASCII-only version, optimized for interpretation during startup
//
private static String toLower(String s) {
@ -82,47 +105,47 @@ public class StandardCharsets extends CharsetProvider {
}
if (allLower)
return s;
char[] ca = new char[n];
StringBuilder sb = new StringBuilder(n);
for (int i = 0; i < n; i++) {
int c = s.charAt(i);
if (((c - 'A') | ('Z' - c)) >= 0)
ca[i] = (char)(c + 0x20);
sb.append((char)(c + 0x20));
else
ca[i] = (char)c;
sb.append((char)c);
}
return new String(ca);
return sb.toString();
}
private Charset lookup(String charsetName) {
init();
String csn = canonicalize(toLower(charsetName));
// By checking these built-ins we can avoid initializing Aliases and
// Classes eagerly during bootstrap
String csn;
if (charsetName.equals("UTF-8")) {
return UTF_8.INSTANCE;
} else if (charsetName.equals("US-ASCII")) {
return US_ASCII.INSTANCE;
} else if (charsetName.equals("ISO-8859-1")) {
return ISO_8859_1.INSTANCE;
} else {
csn = canonicalize(toLower(charsetName));
}
// Check cache first
Charset cs = cache.get(csn);
Charset cs = cache().get(csn);
if (cs != null)
return cs;
// Do we even support this charset?
String cln = classMap.get(csn);
String cln = classMap().get(csn);
if (cln == null)
return null;
// As all charset class names added to classMap are string literals we
// can check identity here as an optimization
if (cln == US_ASCII) {
return cache(csn, new US_ASCII());
}
if (cln == ISO_8859_1) {
return cache(csn, new ISO_8859_1());
}
if (cln == UTF_8) {
return cache(csn, new UTF_8());
}
// Instantiate the charset and cache it
try {
@SuppressWarnings("deprecation")
Object o = Class.forName(packagePrefix + "." + cln,
Object o = Class.forName(packagePrefix + cln,
true,
this.getClass().getClassLoader()).newInstance();
return cache(csn, (Charset)o);
@ -134,23 +157,28 @@ public class StandardCharsets extends CharsetProvider {
}
private Charset cache(String csn, Charset cs) {
cache.put(csn, cs);
cache().put(csn, cs);
return cs;
}
public final Charset charsetForName(String charsetName) {
synchronized (this) {
return lookup(canonicalize(charsetName));
return lookup(charsetName);
}
}
public final Iterator<Charset> charsets() {
Set<String> charsetNames;
synchronized (this) {
init();
// Ensure initialized in synchronized block
charsetNames = classMap().keySet();
aliasMap();
cache();
}
return new Iterator<Charset>() {
Iterator<String> i = classMap.keySet().iterator();
Iterator<String> i = charsetNames.iterator();
public boolean hasNext() {
return i.hasNext();
@ -181,6 +209,8 @@ public class StandardCharsets extends CharsetProvider {
String map = GetPropertyAction.privilegedGetProperty("sun.nio.cs.map");
if (map != null) {
Map<String,String> aliasMap = aliasMap();
Map<String,String> classMap = classMap();
String[] maps = map.split(",");
for (int i = 0; i < maps.length; i++) {
if (maps[i].equalsIgnoreCase("Windows-31J/Shift_JIS")) {
@ -207,7 +237,7 @@ public class StandardCharsets extends CharsetProvider {
for (String alias : aliases_MS932) {
aliasMap.put(toLower(alias), "windows-31j");
}
cache.put("shift_jis", null);
cache().put("shift_jis", null);
break;
}
}

View File

@ -36,9 +36,10 @@ public class US_ASCII
extends Charset
implements HistoricallyNamedCharset
{
public static final US_ASCII INSTANCE = new US_ASCII();
public US_ASCII() {
super(StandardCharsets.US_ASCII, StandardCharsets.aliases_US_ASCII);
super("US-ASCII", StandardCharsets.aliases_US_ASCII());
}
public String historicalName() {

View File

@ -33,7 +33,7 @@ class UTF_16 extends Unicode
{
public UTF_16() {
super("UTF-16", StandardCharsets.aliases_UTF_16);
super("UTF-16", StandardCharsets.aliases_UTF_16());
}
public String historicalName() {

View File

@ -33,7 +33,7 @@ class UTF_16BE extends Unicode
{
public UTF_16BE() {
super("UTF-16BE", StandardCharsets.aliases_UTF_16BE);
super("UTF-16BE", StandardCharsets.aliases_UTF_16BE());
}
public String historicalName() {

View File

@ -33,7 +33,7 @@ class UTF_16LE extends Unicode
{
public UTF_16LE() {
super("UTF-16LE", StandardCharsets.aliases_UTF_16LE);
super("UTF-16LE", StandardCharsets.aliases_UTF_16LE());
}
public String historicalName() {

View File

@ -33,7 +33,7 @@ class UTF_16LE_BOM extends Unicode
{
public UTF_16LE_BOM() {
super("x-UTF-16LE-BOM", StandardCharsets.aliases_UTF_16LE_BOM);
super("x-UTF-16LE-BOM", StandardCharsets.aliases_UTF_16LE_BOM());
}
public String historicalName() {

View File

@ -31,7 +31,7 @@ import java.nio.charset.CharsetEncoder;
public class UTF_32 extends Unicode
{
public UTF_32() {
super("UTF-32", StandardCharsets.aliases_UTF_32);
super("UTF-32", StandardCharsets.aliases_UTF_32());
}
public String historicalName() {

View File

@ -31,7 +31,7 @@ import java.nio.charset.CharsetEncoder;
public class UTF_32BE extends Unicode
{
public UTF_32BE() {
super("UTF-32BE", StandardCharsets.aliases_UTF_32BE);
super("UTF-32BE", StandardCharsets.aliases_UTF_32BE());
}
public String historicalName() {

View File

@ -31,7 +31,7 @@ import java.nio.charset.CharsetEncoder;
public class UTF_32BE_BOM extends Unicode
{
public UTF_32BE_BOM() {
super("X-UTF-32BE-BOM", StandardCharsets.aliases_UTF_32BE_BOM);
super("X-UTF-32BE-BOM", StandardCharsets.aliases_UTF_32BE_BOM());
}
public String historicalName() {

View File

@ -32,7 +32,7 @@ import java.nio.charset.CharsetEncoder;
public class UTF_32LE extends Unicode
{
public UTF_32LE() {
super("UTF-32LE", StandardCharsets.aliases_UTF_32LE);
super("UTF-32LE", StandardCharsets.aliases_UTF_32LE());
}
public String historicalName() {

View File

@ -31,7 +31,7 @@ import java.nio.charset.CharsetEncoder;
public class UTF_32LE_BOM extends Unicode
{
public UTF_32LE_BOM() {
super("X-UTF-32LE-BOM", StandardCharsets.aliases_UTF_32LE_BOM);
super("X-UTF-32LE-BOM", StandardCharsets.aliases_UTF_32LE_BOM());
}
public String historicalName() {

View File

@ -54,10 +54,12 @@ import java.nio.charset.CodingErrorAction;
*
*/
class UTF_8 extends Unicode
{
public final class UTF_8 extends Unicode {
public static final UTF_8 INSTANCE = new UTF_8();
public UTF_8() {
super(StandardCharsets.UTF_8, StandardCharsets.aliases_UTF_8);
super("UTF-8", StandardCharsets.aliases_UTF_8());
}
public String historicalName() {
@ -72,7 +74,7 @@ class UTF_8 extends Unicode
return new Encoder(this);
}
private static final void updatePositions(Buffer src, int sp,
static final void updatePositions(Buffer src, int sp,
Buffer dst, int dp) {
src.position(sp - src.arrayOffset());
dst.position(dp - dst.arrayOffset());

View File

@ -87,9 +87,15 @@ public class CalendarNameProviderImpl extends CalendarNameProvider implements Av
Era[] jeras = CalendarSystem.forName("japanese").getEras();
if (jeras.length == value) {
Era supEra = jeras[value - 1]; // 0-based index
return style == LONG ?
supEra.getName() :
supEra.getAbbreviation();
if (javatime) {
return getBaseStyle(style) == NARROW_FORMAT ?
supEra.getAbbreviation() :
supEra.getName();
} else {
return (style & LONG) != 0 ?
supEra.getName() :
supEra.getAbbreviation();
}
}
}
return null;

View File

@ -678,6 +678,7 @@ jdk.jar.disabledAlgorithms=MD2, MD5, RSA keySize < 1024, \
jdk.tls.disabledAlgorithms=SSLv3, RC4, MD5withRSA, DH keySize < 1024, \
EC keySize < 224
#
# Legacy algorithms for Secure Socket Layer/Transport Layer Security (SSL/TLS)
# processing in JSSE implementation.
#
@ -742,6 +743,7 @@ jdk.tls.legacyAlgorithms= \
RC4_128, RC4_40, DES_CBC, DES40_CBC, \
3DES_EDE_CBC
#
# The pre-defined default finite field Diffie-Hellman ephemeral (DHE)
# parameters for Transport Layer Security (SSL/TLS/DTLS) processing.
#
@ -799,54 +801,38 @@ jdk.tls.legacyAlgorithms= \
# EE386BFB 5A899FA5 AE9F2411 7C4B1FE6 49286651 ECE65381 \
# FFFFFFFF FFFFFFFF, 2}
#
# Cryptographic Jurisdiction Policy defaults
#
# Due to the import control restrictions of some countries, the default
# JCE policy files allow for strong but "limited" cryptographic key
# lengths to be used. If your country's cryptographic regulations allow,
# the "unlimited" strength policy files can be used instead, which contain
# no restrictions on cryptographic strengths.
# Import and export control rules on cryptographic software vary from
# country to country. By default, Java provides two different sets of
# cryptographic policy files[1]:
#
# If your country has restrictions that don't fit either "limited" or
# "unlimited", an appropriate set of policy files should be created and
# configured before using this distribution. The jurisdiction policy file
# configuration must reflect the cryptographic restrictions appropriate
# for your country.
# unlimited: These policy files contain no restrictions on cryptographic
# strengths or algorithms
#
# limited: These policy files contain more restricted cryptographic
# strengths
#
# The default setting is determined by the value of the “crypto.policy”
# Security property below. If your country or usage requires the
# traditional restrictive policy, the “limited” Java cryptographic
# policy is still available and may be appropriate for your environment.
#
# If you have restrictions that do not fit either use case mentioned
# above, Java provides the capability to customize these policy files.
# The “crypto.policy” security property points to a subdirectory
# within <java-home>/conf/security/policy/ which can be customized.
# Please see the <java-home>/conf/security/policy/README.txt file or consult
# the Java Security Guide/JCA documentation for more information.
#
# YOU ARE ADVISED TO CONSULT YOUR EXPORT/IMPORT CONTROL COUNSEL OR ATTORNEY
# TO DETERMINE THE EXACT REQUIREMENTS.
#
# The policy files are flat text files organized into subdirectories of
# <java-home>/conf/security/policy. Each directory contains a complete
# set of policy files.
#
# The "crypto.policy" Security property controls the directory selection,
# and thus the effective cryptographic policy.
#
# The default set of directories is:
#
# limited | unlimited
#
# however other directories can be created and configured.
#
# Within a directory, the effective policy is the combined minimum
# permissions of the grant statements in the file(s) with the filename
# pattern "default_*.policy". At least one grant is required. For
# example:
#
# limited = Export (all) + Import (limited) = Limited
# unlimited = Export (all) + Import (all) = Unlimited
#
# The effective exemption policy is the combined minimum permissions
# of the grant statements in the file(s) with the filename pattern
# "exempt_*.policy". Exemption grants are optional.
#
# limited = grants exemption permissions, by which the
# effective policy can be circumvented.
# e.g. KeyRecovery/Escrow/Weakening.
#
# Please see the JCA documentation for additional information on these
# files and formats.
# [1] Please note that the JCE for Java SE, including the JCE framework,
# cryptographic policy files, and standard JCE providers provided with
# the Java SE, have been reviewed and approved for export as mass market
# encryption item by the US Bureau of Industry and Security.
#
# Note: This property is currently used by the JDK Reference implementation.
# It is not guaranteed to be examined and used by other implementations.

View File

@ -5,30 +5,50 @@
README
------------------------------------------------------------------------
Import and export control rules on cryptographic software vary from
country to country. The Java Cryptography Extension (JCE) architecture
allows flexible cryptographic key strength to be configured via the
jurisdiction policy files which are referenced by the “crypto.policy”
security property in the <java-home>/conf/security/java.security file.
The JCE architecture allows flexible cryptographic strength to be
configured via the jurisdiction policy files contained within these
directories.
By default, Java provides two different sets of cryptographic policy
files:
The default JCE policy files bundled in this Java Runtime Environment
allow for "unlimited" cryptographic strengths. For convenience,
this build also contains the historic "limited" strength policy files
which contain restrictions on cryptographic strengths, but they must be
specifically activated by updating the "crypto.policy" Security property
(e.g. <java-home>/conf/security/java.security) to point to the appropriate
directory.
unlimited: These policy files contain no restrictions on cryptographic
strengths or algorithms
Each subdirectory contains a complete policy configuration, and additional
subdirectories can be added/removed to reflect local regulations.
limited: These policy files contain more restricted cryptographic
strengths
JCE for Java SE has been through the U.S. export review process. The JCE
framework, along with the various JCE providers that come standard with it
(SunJCE, SunEC, SunPKCS11, SunMSCAPI, etc), is exportable from the
United States.
These files reside in <java-home>/conf/security/policy in the “unlimited”
or “limited” subdirectories respectively.
You are advised to consult your export/import control counsel or attorney
to determine the exact requirements of your location, and what policy
settings should be used.
Each subdirectory contains a complete policy configuration,
and subdirectories can be added/edited/removed to reflect your
import or export control product requirements.
Please see The Java(TM) Cryptography Architecture (JCA) Reference
Guide and the java.security file for more information.
Within a subdirectory, the effective policy is the combined minimum
permissions of the grant statements in the file(s) matching the filename
pattern "default_*.policy". At least one grant is required. For example:
limited = Export (all) + Import (limited) = Limited
unlimited = Export (all) + Import (all) = Unlimited
The effective exemption policy is the combined minimum permissions
of the grant statements in the file(s) matching the filename pattern
"exempt_*.policy". Exemption grants are optional. For example:
limited = grants exemption permissions, by which the
effective policy can be circumvented.
e.g. KeyRecovery/KeyEscrow/KeyWeakening.
Please see the Java Cryptography Architecture (JCA) documentation for
additional information on these files and formats.
YOU ARE ADVISED TO CONSULT YOUR EXPORT/IMPORT CONTROL COUNSEL OR ATTORNEY
TO DETERMINE THE EXACT REQUIREMENTS.
Please note that the JCE for Java SE, including the JCE framework,
cryptographic policy files, and standard JCE providers provided with
the Java SE, have been reviewed and approved for export as mass market
encryption item by the US Bureau of Industry and Security.

View File

@ -1296,7 +1296,7 @@ ParseArguments(int *pargc, char ***pargv,
} else if (JLI_StrCmp(arg, "--show-resolved-modules") == 0) {
showResolvedModules = JNI_TRUE;
} else if (JLI_StrCmp(arg, "--validate-modules") == 0) {
AddOption("-Djdk.module.minimumBoot=true", NULL);
AddOption("-Djdk.module.validation=true", NULL);
validateModules = JNI_TRUE;
} else if (JLI_StrCmp(arg, "--describe-module") == 0 ||
JLI_StrCCmp(arg, "--describe-module=") == 0 ||

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 2000, 2012, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2000, 2017, 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
@ -140,18 +140,6 @@ Java_sun_nio_ch_FileChannelImpl_position0(JNIEnv *env, jobject this,
}
JNIEXPORT void JNICALL
Java_sun_nio_ch_FileChannelImpl_close0(JNIEnv *env, jobject this, jobject fdo)
{
jint fd = fdval(env, fdo);
if (fd != -1) {
jlong result = close(fd);
if (result < 0) {
JNU_ThrowIOExceptionWithLastError(env, "Close failed");
}
}
}
JNIEXPORT jlong JNICALL
Java_sun_nio_ch_FileChannelImpl_transferTo0(JNIEnv *env, jobject this,
jobject srcFDO,

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 2000, 2016, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2000, 2017, 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
@ -176,7 +176,5 @@ class FileDispatcherImpl extends FileDispatcher {
static native void close0(FileDescriptor fd) throws IOException;
static native void closeByHandle(long fd) throws IOException;
static native long duplicateHandle(long fd) throws IOException;
}

Some files were not shown because too many files have changed in this diff Show More