Merge
This commit is contained in:
commit
4c6b313f24
@ -302,3 +302,4 @@ eb7febe45865ba6b81f2ea68082262d0708a0b22 jdk9-b56
|
||||
f25ee9f62427a9ba27418e5531a89754791a305b jdk9-b57
|
||||
6e78dd9b121037719a065fe8fb25b936babdfecb jdk9-b58
|
||||
39e8a131289e8386aa4c3e4b184faa812a7c0421 jdk9-b59
|
||||
9fa2185bee17462d1014538bff60af6e6f0b01e7 jdk9-b60
|
||||
|
@ -41,7 +41,8 @@
|
||||
The build is now a "<code>configure && make</code>" style build
|
||||
</li>
|
||||
<li>
|
||||
Any GNU make 3.81 or newer should work
|
||||
Any GNU make 3.81 or newer should work, except on
|
||||
Windows where 4.0 or newer is recommended.
|
||||
</li>
|
||||
<li>
|
||||
The build should scale, i.e. more processors should
|
||||
@ -358,8 +359,8 @@
|
||||
For all systems:
|
||||
<ul>
|
||||
<li>
|
||||
Be sure the GNU make utility is version 3.81 or newer,
|
||||
e.g. run "<code>make -version</code>"
|
||||
Be sure the GNU make utility is version 3.81 (4.0 on
|
||||
windows) or newer, e.g. run "<code>make -version</code>"
|
||||
</li>
|
||||
<li>
|
||||
Install a
|
||||
@ -1726,10 +1727,10 @@
|
||||
A few notes about using GNU make:
|
||||
<ul>
|
||||
<li>
|
||||
You need GNU make version 3.81 or newer.
|
||||
If the GNU make utility on your systems is not
|
||||
3.81 or newer,
|
||||
see <a href="#buildgmake">"Building GNU make"</a>.
|
||||
You need GNU make version 3.81 or newer. On Windows 4.0 or
|
||||
newer is recommended.
|
||||
If the GNU make utility on your systems is not of a suitable
|
||||
version see <a href="#buildgmake">"Building GNU make"</a>.
|
||||
</li>
|
||||
<li>
|
||||
Place the location of the GNU make binary in the
|
||||
|
@ -658,8 +658,6 @@ AC_DEFUN_ONCE([BASIC_SETUP_OUTPUT_DIR],
|
||||
fi
|
||||
OUTPUT_ROOT="$SRC_ROOT/build/${CONF_NAME}"
|
||||
$MKDIR -p "$OUTPUT_ROOT"
|
||||
CONFIGURESUPPORT_OUTPUTDIR="$OUTPUT_ROOT/configure-support"
|
||||
$MKDIR -p "$CONFIGURESUPPORT_OUTPUTDIR"
|
||||
if test ! -d "$OUTPUT_ROOT"; then
|
||||
AC_MSG_ERROR([Could not create build directory $OUTPUT_ROOT])
|
||||
fi
|
||||
@ -702,6 +700,9 @@ AC_DEFUN_ONCE([BASIC_SETUP_OUTPUT_DIR],
|
||||
|
||||
BASIC_FIXUP_PATH(OUTPUT_ROOT)
|
||||
|
||||
CONFIGURESUPPORT_OUTPUTDIR="$OUTPUT_ROOT/configure-support"
|
||||
$MKDIR -p "$CONFIGURESUPPORT_OUTPUTDIR"
|
||||
|
||||
AC_SUBST(SPEC, $OUTPUT_ROOT/spec.gmk)
|
||||
AC_SUBST(CONF_NAME, $CONF_NAME)
|
||||
AC_SUBST(OUTPUT_ROOT, $OUTPUT_ROOT)
|
||||
@ -730,6 +731,16 @@ AC_DEFUN([BASIC_CHECK_MAKE_VERSION],
|
||||
[
|
||||
MAKE_CANDIDATE="$1"
|
||||
DESCRIPTION="$2"
|
||||
|
||||
# On Cygwin, we require a newer version of make than on other platforms
|
||||
if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
|
||||
MAKE_VERSION_EXPR="-e 4\."
|
||||
MAKE_REQUIRED_VERSION="4.0"
|
||||
else
|
||||
MAKE_VERSION_EXPR="-e 3\.8[[12]] -e 4\."
|
||||
MAKE_REQUIRED_VERSION="3.81"
|
||||
fi
|
||||
|
||||
if test "x$MAKE_CANDIDATE" != x; then
|
||||
AC_MSG_NOTICE([Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION])
|
||||
MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
|
||||
@ -737,9 +748,9 @@ AC_DEFUN([BASIC_CHECK_MAKE_VERSION],
|
||||
if test "x$IS_GNU_MAKE" = x; then
|
||||
AC_MSG_NOTICE([Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring.])
|
||||
else
|
||||
IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP -e '3\.8[[12]]' -e '4\.'`
|
||||
IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
|
||||
if test "x$IS_MODERN_MAKE" = x; then
|
||||
AC_MSG_NOTICE([Found GNU make at $MAKE_CANDIDATE, however this is not version 3.81 or later. (it is: $MAKE_VERSION_STRING). Ignoring.])
|
||||
AC_MSG_NOTICE([Found GNU make at $MAKE_CANDIDATE, however this is not version $MAKE_REQUIRED_VERSION or later. (it is: $MAKE_VERSION_STRING). Ignoring.])
|
||||
else
|
||||
if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
|
||||
if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
|
||||
@ -803,7 +814,7 @@ AC_DEFUN([BASIC_CHECK_GNU_MAKE],
|
||||
fi
|
||||
BASIC_CHECK_MAKE_VERSION("$MAKE", [user supplied MAKE=$MAKE])
|
||||
if test "x$FOUND_MAKE" = x; then
|
||||
AC_MSG_ERROR([The specified make (by MAKE=$MAKE) is not GNU make 3.81 or newer.])
|
||||
AC_MSG_ERROR([The specified make (by MAKE=$MAKE) is not GNU make $MAKE_REQUIRED_VERSION or newer.])
|
||||
fi
|
||||
else
|
||||
# Try our hardest to locate a correct version of GNU make
|
||||
@ -831,13 +842,13 @@ AC_DEFUN([BASIC_CHECK_GNU_MAKE],
|
||||
fi
|
||||
|
||||
if test "x$FOUND_MAKE" = x; then
|
||||
AC_MSG_ERROR([Cannot find GNU make 3.81 or newer! Please put it in the path, or add e.g. MAKE=/opt/gmake3.81/make as argument to configure.])
|
||||
AC_MSG_ERROR([Cannot find GNU make $MAKE_REQUIRED_VERSION or newer! Please put it in the path, or add e.g. MAKE=/opt/gmake3.81/make as argument to configure.])
|
||||
fi
|
||||
fi
|
||||
|
||||
MAKE=$FOUND_MAKE
|
||||
AC_SUBST(MAKE)
|
||||
AC_MSG_NOTICE([Using GNU make 3.81 (or later) at $FOUND_MAKE (version: $MAKE_VERSION_STRING)])
|
||||
AC_MSG_NOTICE([Using GNU make at $FOUND_MAKE (version: $MAKE_VERSION_STRING)])
|
||||
|
||||
BASIC_CHECK_MAKE_OUTPUT_SYNC
|
||||
])
|
||||
|
@ -745,8 +745,6 @@ JT_HOME
|
||||
JTREGEXE
|
||||
USING_BROKEN_SUSE_LD
|
||||
PACKAGE_PATH
|
||||
LDEXECXX
|
||||
LDEXE
|
||||
USE_CLANG
|
||||
HOTSPOT_LD
|
||||
HOTSPOT_CXX
|
||||
@ -4365,7 +4363,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=1428676283
|
||||
DATE_WHEN_GENERATED=1429271657
|
||||
|
||||
###############################################################################
|
||||
#
|
||||
@ -15266,8 +15264,6 @@ $as_echo "in build directory with custom name" >&6; }
|
||||
fi
|
||||
OUTPUT_ROOT="$SRC_ROOT/build/${CONF_NAME}"
|
||||
$MKDIR -p "$OUTPUT_ROOT"
|
||||
CONFIGURESUPPORT_OUTPUTDIR="$OUTPUT_ROOT/configure-support"
|
||||
$MKDIR -p "$CONFIGURESUPPORT_OUTPUTDIR"
|
||||
if test ! -d "$OUTPUT_ROOT"; then
|
||||
as_fn_error $? "Could not create build directory $OUTPUT_ROOT" "$LINENO" 5
|
||||
fi
|
||||
@ -15445,6 +15441,9 @@ $as_echo "$as_me: The path of OUTPUT_ROOT, which resolves as \"$path\", is inval
|
||||
fi
|
||||
|
||||
|
||||
CONFIGURESUPPORT_OUTPUTDIR="$OUTPUT_ROOT/configure-support"
|
||||
$MKDIR -p "$CONFIGURESUPPORT_OUTPUTDIR"
|
||||
|
||||
SPEC=$OUTPUT_ROOT/spec.gmk
|
||||
|
||||
CONF_NAME=$CONF_NAME
|
||||
@ -15530,6 +15529,16 @@ done
|
||||
|
||||
MAKE_CANDIDATE=""$MAKE""
|
||||
DESCRIPTION="user supplied MAKE=$MAKE"
|
||||
|
||||
# On Cygwin, we require a newer version of make than on other platforms
|
||||
if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
|
||||
MAKE_VERSION_EXPR="-e 4\."
|
||||
MAKE_REQUIRED_VERSION="4.0"
|
||||
else
|
||||
MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
|
||||
MAKE_REQUIRED_VERSION="3.81"
|
||||
fi
|
||||
|
||||
if test "x$MAKE_CANDIDATE" != x; then
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
|
||||
$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
|
||||
@ -15539,10 +15548,10 @@ $as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRI
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
|
||||
$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
|
||||
else
|
||||
IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP -e '3\.8[12]' -e '4\.'`
|
||||
IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
|
||||
if test "x$IS_MODERN_MAKE" = x; then
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: Found GNU make at $MAKE_CANDIDATE, however this is not version 3.81 or later. (it is: $MAKE_VERSION_STRING). Ignoring." >&5
|
||||
$as_echo "$as_me: Found GNU make at $MAKE_CANDIDATE, however this is not version 3.81 or later. (it is: $MAKE_VERSION_STRING). Ignoring." >&6;}
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: Found GNU make at $MAKE_CANDIDATE, however this is not version $MAKE_REQUIRED_VERSION or later. (it is: $MAKE_VERSION_STRING). Ignoring." >&5
|
||||
$as_echo "$as_me: Found GNU make at $MAKE_CANDIDATE, however this is not version $MAKE_REQUIRED_VERSION or later. (it is: $MAKE_VERSION_STRING). Ignoring." >&6;}
|
||||
else
|
||||
if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
|
||||
if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
|
||||
@ -15855,7 +15864,7 @@ $as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
|
||||
fi
|
||||
|
||||
if test "x$FOUND_MAKE" = x; then
|
||||
as_fn_error $? "The specified make (by MAKE=$MAKE) is not GNU make 3.81 or newer." "$LINENO" 5
|
||||
as_fn_error $? "The specified make (by MAKE=$MAKE) is not GNU make $MAKE_REQUIRED_VERSION or newer." "$LINENO" 5
|
||||
fi
|
||||
else
|
||||
# Try our hardest to locate a correct version of GNU make
|
||||
@ -15907,6 +15916,16 @@ done
|
||||
|
||||
MAKE_CANDIDATE=""$CHECK_GMAKE""
|
||||
DESCRIPTION="gmake in PATH"
|
||||
|
||||
# On Cygwin, we require a newer version of make than on other platforms
|
||||
if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
|
||||
MAKE_VERSION_EXPR="-e 4\."
|
||||
MAKE_REQUIRED_VERSION="4.0"
|
||||
else
|
||||
MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
|
||||
MAKE_REQUIRED_VERSION="3.81"
|
||||
fi
|
||||
|
||||
if test "x$MAKE_CANDIDATE" != x; then
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
|
||||
$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
|
||||
@ -15916,10 +15935,10 @@ $as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRI
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
|
||||
$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
|
||||
else
|
||||
IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP -e '3\.8[12]' -e '4\.'`
|
||||
IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
|
||||
if test "x$IS_MODERN_MAKE" = x; then
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: Found GNU make at $MAKE_CANDIDATE, however this is not version 3.81 or later. (it is: $MAKE_VERSION_STRING). Ignoring." >&5
|
||||
$as_echo "$as_me: Found GNU make at $MAKE_CANDIDATE, however this is not version 3.81 or later. (it is: $MAKE_VERSION_STRING). Ignoring." >&6;}
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: Found GNU make at $MAKE_CANDIDATE, however this is not version $MAKE_REQUIRED_VERSION or later. (it is: $MAKE_VERSION_STRING). Ignoring." >&5
|
||||
$as_echo "$as_me: Found GNU make at $MAKE_CANDIDATE, however this is not version $MAKE_REQUIRED_VERSION or later. (it is: $MAKE_VERSION_STRING). Ignoring." >&6;}
|
||||
else
|
||||
if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
|
||||
if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
|
||||
@ -16281,6 +16300,16 @@ done
|
||||
|
||||
MAKE_CANDIDATE=""$CHECK_MAKE""
|
||||
DESCRIPTION="make in PATH"
|
||||
|
||||
# On Cygwin, we require a newer version of make than on other platforms
|
||||
if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
|
||||
MAKE_VERSION_EXPR="-e 4\."
|
||||
MAKE_REQUIRED_VERSION="4.0"
|
||||
else
|
||||
MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
|
||||
MAKE_REQUIRED_VERSION="3.81"
|
||||
fi
|
||||
|
||||
if test "x$MAKE_CANDIDATE" != x; then
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
|
||||
$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
|
||||
@ -16290,10 +16319,10 @@ $as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRI
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
|
||||
$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
|
||||
else
|
||||
IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP -e '3\.8[12]' -e '4\.'`
|
||||
IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
|
||||
if test "x$IS_MODERN_MAKE" = x; then
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: Found GNU make at $MAKE_CANDIDATE, however this is not version 3.81 or later. (it is: $MAKE_VERSION_STRING). Ignoring." >&5
|
||||
$as_echo "$as_me: Found GNU make at $MAKE_CANDIDATE, however this is not version 3.81 or later. (it is: $MAKE_VERSION_STRING). Ignoring." >&6;}
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: Found GNU make at $MAKE_CANDIDATE, however this is not version $MAKE_REQUIRED_VERSION or later. (it is: $MAKE_VERSION_STRING). Ignoring." >&5
|
||||
$as_echo "$as_me: Found GNU make at $MAKE_CANDIDATE, however this is not version $MAKE_REQUIRED_VERSION or later. (it is: $MAKE_VERSION_STRING). Ignoring." >&6;}
|
||||
else
|
||||
if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
|
||||
if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
|
||||
@ -16660,6 +16689,16 @@ done
|
||||
|
||||
MAKE_CANDIDATE=""$CHECK_TOOLSDIR_GMAKE""
|
||||
DESCRIPTION="gmake in tools-dir"
|
||||
|
||||
# On Cygwin, we require a newer version of make than on other platforms
|
||||
if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
|
||||
MAKE_VERSION_EXPR="-e 4\."
|
||||
MAKE_REQUIRED_VERSION="4.0"
|
||||
else
|
||||
MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
|
||||
MAKE_REQUIRED_VERSION="3.81"
|
||||
fi
|
||||
|
||||
if test "x$MAKE_CANDIDATE" != x; then
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
|
||||
$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
|
||||
@ -16669,10 +16708,10 @@ $as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRI
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
|
||||
$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
|
||||
else
|
||||
IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP -e '3\.8[12]' -e '4\.'`
|
||||
IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
|
||||
if test "x$IS_MODERN_MAKE" = x; then
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: Found GNU make at $MAKE_CANDIDATE, however this is not version 3.81 or later. (it is: $MAKE_VERSION_STRING). Ignoring." >&5
|
||||
$as_echo "$as_me: Found GNU make at $MAKE_CANDIDATE, however this is not version 3.81 or later. (it is: $MAKE_VERSION_STRING). Ignoring." >&6;}
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: Found GNU make at $MAKE_CANDIDATE, however this is not version $MAKE_REQUIRED_VERSION or later. (it is: $MAKE_VERSION_STRING). Ignoring." >&5
|
||||
$as_echo "$as_me: Found GNU make at $MAKE_CANDIDATE, however this is not version $MAKE_REQUIRED_VERSION or later. (it is: $MAKE_VERSION_STRING). Ignoring." >&6;}
|
||||
else
|
||||
if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
|
||||
if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
|
||||
@ -17033,6 +17072,16 @@ done
|
||||
|
||||
MAKE_CANDIDATE=""$CHECK_TOOLSDIR_MAKE""
|
||||
DESCRIPTION="make in tools-dir"
|
||||
|
||||
# On Cygwin, we require a newer version of make than on other platforms
|
||||
if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
|
||||
MAKE_VERSION_EXPR="-e 4\."
|
||||
MAKE_REQUIRED_VERSION="4.0"
|
||||
else
|
||||
MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
|
||||
MAKE_REQUIRED_VERSION="3.81"
|
||||
fi
|
||||
|
||||
if test "x$MAKE_CANDIDATE" != x; then
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
|
||||
$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
|
||||
@ -17042,10 +17091,10 @@ $as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRI
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
|
||||
$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
|
||||
else
|
||||
IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP -e '3\.8[12]' -e '4\.'`
|
||||
IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
|
||||
if test "x$IS_MODERN_MAKE" = x; then
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: Found GNU make at $MAKE_CANDIDATE, however this is not version 3.81 or later. (it is: $MAKE_VERSION_STRING). Ignoring." >&5
|
||||
$as_echo "$as_me: Found GNU make at $MAKE_CANDIDATE, however this is not version 3.81 or later. (it is: $MAKE_VERSION_STRING). Ignoring." >&6;}
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: Found GNU make at $MAKE_CANDIDATE, however this is not version $MAKE_REQUIRED_VERSION or later. (it is: $MAKE_VERSION_STRING). Ignoring." >&5
|
||||
$as_echo "$as_me: Found GNU make at $MAKE_CANDIDATE, however this is not version $MAKE_REQUIRED_VERSION or later. (it is: $MAKE_VERSION_STRING). Ignoring." >&6;}
|
||||
else
|
||||
if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
|
||||
if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
|
||||
@ -17363,14 +17412,14 @@ $as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
|
||||
fi
|
||||
|
||||
if test "x$FOUND_MAKE" = x; then
|
||||
as_fn_error $? "Cannot find GNU make 3.81 or newer! Please put it in the path, or add e.g. MAKE=/opt/gmake3.81/make as argument to configure." "$LINENO" 5
|
||||
as_fn_error $? "Cannot find GNU make $MAKE_REQUIRED_VERSION or newer! Please put it in the path, or add e.g. MAKE=/opt/gmake3.81/make as argument to configure." "$LINENO" 5
|
||||
fi
|
||||
fi
|
||||
|
||||
MAKE=$FOUND_MAKE
|
||||
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: Using GNU make 3.81 (or later) at $FOUND_MAKE (version: $MAKE_VERSION_STRING)" >&5
|
||||
$as_echo "$as_me: Using GNU make 3.81 (or later) at $FOUND_MAKE (version: $MAKE_VERSION_STRING)" >&6;}
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: Using GNU make at $FOUND_MAKE (version: $MAKE_VERSION_STRING)" >&5
|
||||
$as_echo "$as_me: Using GNU make at $FOUND_MAKE (version: $MAKE_VERSION_STRING)" >&6;}
|
||||
|
||||
|
||||
# Check if make supports the output sync option and if so, setup using it.
|
||||
@ -40837,13 +40886,6 @@ $as_echo "$as_me: Rewriting BUILD_LD to \"$new_complete\"" >&6;}
|
||||
fi
|
||||
|
||||
|
||||
# LDEXE is the linker to use, when creating executables. Not really used.
|
||||
# FIXME: These should just be removed!
|
||||
LDEXE="$LD"
|
||||
LDEXECXX="$LDCXX"
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
@ -182,6 +182,7 @@ else
|
||||
FULL_VERSION=$(RELEASE)-$(JDK_BUILD_NUMBER)
|
||||
endif
|
||||
JRE_RELEASE_VERSION:=$(FULL_VERSION)
|
||||
JDK_VERSION_FOR_MANIFEST := $(JDK_MINOR_VERSION).$(JDK_MICRO_VERSION).$(if $(JDK_UPDATE_VERSION),$(JDK_UPDATE_VERSION),0).$(COOKED_BUILD_NUMBER)
|
||||
|
||||
# How to compile the code: release, fastdebug or slowdebug
|
||||
DEBUG_LEVEL:=@DEBUG_LEVEL@
|
||||
@ -354,10 +355,6 @@ USING_BROKEN_SUSE_LD:=@USING_BROKEN_SUSE_LD@
|
||||
LDFLAGS_JDKLIB:=@LDFLAGS_JDKLIB@
|
||||
LDFLAGS_JDKLIB_SUFFIX:=@LDFLAGS_JDKLIB_SUFFIX@
|
||||
|
||||
# On some platforms the linker cannot be used to create executables, thus
|
||||
# the need for a separate LDEXE command.
|
||||
LDEXE:=@FIXPATH@ @LDEXE@
|
||||
|
||||
# LDFLAGS used to link the jdk native launchers (C-code)
|
||||
LDFLAGS_JDKEXE:=@LDFLAGS_JDKEXE@
|
||||
LDFLAGS_JDKEXE_SUFFIX:=@LDFLAGS_JDKEXE_SUFFIX@
|
||||
@ -370,9 +367,6 @@ LDCXX:=@FIXPATH@ @LDCXX@
|
||||
# The flags for linking libstdc++ linker.
|
||||
LIBCXX:=@LIBCXX@
|
||||
|
||||
# Sometimes a different linker is needed for c++ executables
|
||||
LDEXECXX:=@FIXPATH@ @LDEXECXX@
|
||||
|
||||
# Compiler and linker flags used when building native tests
|
||||
CFLAGS_TESTLIB:=@CFLAGS_TESTLIB@
|
||||
CXXFLAGS_TESTLIB:=@CXXFLAGS_TESTLIB@
|
||||
|
@ -662,13 +662,6 @@ AC_DEFUN_ONCE([TOOLCHAIN_SETUP_LEGACY],
|
||||
USE_CLANG=true
|
||||
fi
|
||||
AC_SUBST(USE_CLANG)
|
||||
|
||||
# LDEXE is the linker to use, when creating executables. Not really used.
|
||||
# FIXME: These should just be removed!
|
||||
LDEXE="$LD"
|
||||
LDEXECXX="$LDCXX"
|
||||
AC_SUBST(LDEXE)
|
||||
AC_SUBST(LDEXECXX)
|
||||
])
|
||||
|
||||
# Do some additional checks on the detected tools.
|
||||
|
@ -1294,6 +1294,9 @@ jdk/src/jdk.crypto.pkcs11/windows/native/libj2pkcs11/j2secmod_md.h : jdk/src/win
|
||||
jdk/src/jdk.crypto.pkcs11/windows/native/libj2pkcs11/p11_md.c : jdk/src/windows/native/sun/security/pkcs11/wrapper/p11_md.c
|
||||
jdk/src/jdk.crypto.pkcs11/windows/native/libj2pkcs11/p11_md.h : jdk/src/windows/native/sun/security/pkcs11/wrapper/p11_md.h
|
||||
jdk/src/jdk.deploy.osx/macosx/classes/com/apple/concurrent/package.html : jdk/src/macosx/classes/com/apple/concurrent/package.html
|
||||
jdk/src/jdk.deploy.osx/macosx/classes/apple/applescript : jdk/src/macosx/classes/apple/applescript
|
||||
jdk/src/jdk.deploy.osx/macosx/classes/apple/security : jdk/src/macosx/classes/apple/security
|
||||
jdk/src/jdk.deploy.osx/macosx/classes/com/apple/concurrent : jdk/src/macosx/classes/com/apple/concurrent
|
||||
jdk/src/jdk.deploy.osx/macosx/native/libapplescriptengine : jdk/src/macosx/native/apple/applescript
|
||||
jdk/src/jdk.deploy.osx/macosx/native/libosx/CFileManager.m : jdk/src/macosx/native/com/apple/eio/CFileManager.m
|
||||
jdk/src/jdk.deploy.osx/macosx/native/libosx/Dispatch.m : jdk/src/macosx/native/com/apple/concurrent/Dispatch.m
|
||||
|
@ -462,3 +462,4 @@ fd2d5ec7e7b16c7bf4043a7fe7cfd8af96b819e2 jdk9-b56
|
||||
56a85ffe743d3f9d70ba25d6ce82ddd2ad1bf33c jdk9-b57
|
||||
ee878f3d6732856f7725c590312bfbe2ffa52cc7 jdk9-b58
|
||||
96bcaec07cb165782bae1b9a1f28450b37a10e3a jdk9-b59
|
||||
9c916db4bf3bc164a47b5a9cefe5ffd71e111f6a jdk9-b60
|
||||
|
@ -39,6 +39,8 @@ class InterpreterMacroAssembler: public MacroAssembler {
|
||||
protected:
|
||||
|
||||
protected:
|
||||
using MacroAssembler::call_VM_leaf_base;
|
||||
|
||||
// Interpreter specific version of call_VM_base
|
||||
virtual void call_VM_leaf_base(address entry_point,
|
||||
int number_of_arguments);
|
||||
|
@ -60,7 +60,10 @@ class RegisterImpl: public AbstractRegisterImpl {
|
||||
bool has_byte_register() const { return 0 <= (intptr_t)this && (intptr_t)this < number_of_byte_registers; }
|
||||
const char* name() const;
|
||||
int encoding_nocheck() const { return (intptr_t)this; }
|
||||
unsigned long bit(bool yes = true) const { return yes << encoding(); }
|
||||
|
||||
// Return the bit which represents this register. This is intended
|
||||
// to be ORed into a bitmask: for usage see class RegSet below.
|
||||
unsigned long bit(bool should_set = true) const { return should_set ? 1 << encoding() : 0; }
|
||||
};
|
||||
|
||||
// The integer registers of the aarch64 architecture
|
||||
|
@ -731,10 +731,12 @@ class FindMethodsByErasedSig : public HierarchyVisitor<FindMethodsByErasedSig> {
|
||||
Method* m = iklass->find_method(_method_name, _method_signature);
|
||||
// private interface methods are not candidates for default methods
|
||||
// invokespecial to private interface methods doesn't use default method logic
|
||||
// private class methods are not candidates for default methods,
|
||||
// private methods do not override default methods, so need to perform
|
||||
// default method inheritance without including private methods
|
||||
// The overpasses are your supertypes' errors, we do not include them
|
||||
// future: take access controls into account for superclass methods
|
||||
if (m != NULL && !m->is_static() && !m->is_overpass() &&
|
||||
(!iklass->is_interface() || m->is_public())) {
|
||||
if (m != NULL && !m->is_static() && !m->is_overpass() && !m->is_private()) {
|
||||
if (_family == NULL) {
|
||||
_family = new StatefulMethodFamily();
|
||||
}
|
||||
@ -745,6 +747,9 @@ class FindMethodsByErasedSig : public HierarchyVisitor<FindMethodsByErasedSig> {
|
||||
} else {
|
||||
// This is the rule that methods in classes "win" (bad word) over
|
||||
// methods in interfaces. This works because of single inheritance
|
||||
// private methods in classes do not "win", they will be found
|
||||
// first on searching, but overriding for invokevirtual needs
|
||||
// to find default method candidates for the same signature
|
||||
_family->set_target_if_empty(m);
|
||||
}
|
||||
}
|
||||
|
@ -250,7 +250,7 @@ ReferenceProcessorStats ReferenceProcessor::process_discovered_references(
|
||||
// Cleaner references to be temporary, and don't want to deal with
|
||||
// possible incompatibilities arising from making it more visible.
|
||||
phantom_count +=
|
||||
process_discovered_reflist(_discoveredCleanerRefs, NULL, false,
|
||||
process_discovered_reflist(_discoveredCleanerRefs, NULL, true,
|
||||
is_alive, keep_alive, complete_gc, task_executor);
|
||||
}
|
||||
|
||||
|
@ -404,13 +404,15 @@ bool klassVtable::update_inherited_vtable(InstanceKlass* klass, methodHandle tar
|
||||
// get super_klass for method_holder for the found method
|
||||
InstanceKlass* super_klass = super_method->method_holder();
|
||||
|
||||
if (is_default
|
||||
// private methods are also never overridden
|
||||
if (!super_method->is_private() &&
|
||||
(is_default
|
||||
|| ((super_klass->is_override(super_method, target_loader, target_classname, THREAD))
|
||||
|| ((klass->major_version() >= VTABLE_TRANSITIVE_OVERRIDE_VERSION)
|
||||
&& ((super_klass = find_transitive_override(super_klass,
|
||||
target_method, i, target_loader,
|
||||
target_classname, THREAD))
|
||||
!= (InstanceKlass*)NULL))))
|
||||
!= (InstanceKlass*)NULL)))))
|
||||
{
|
||||
// Package private methods always need a new entry to root their own
|
||||
// overriding. They may also override other methods.
|
||||
@ -692,9 +694,15 @@ bool klassVtable::is_miranda_entry_at(int i) {
|
||||
// check if a method is a miranda method, given a class's methods table,
|
||||
// its default_method table and its super
|
||||
// Miranda methods are calculated twice:
|
||||
// first: before vtable size calculation: including abstract and default
|
||||
// first: before vtable size calculation: including abstract and superinterface default
|
||||
// We include potential default methods to give them space in the vtable.
|
||||
// During the first run, the default_methods list is empty
|
||||
// This is seen by default method creation
|
||||
// Second: recalculated during vtable initialization: only abstract
|
||||
// Second: recalculated during vtable initialization: only include abstract methods.
|
||||
// During the second run, default_methods is set up, so concrete methods from
|
||||
// superinterfaces with matching names/signatures to default_methods are already
|
||||
// in the default_methods list and do not need to be appended to the vtable
|
||||
// as mirandas
|
||||
// This is seen by link resolution and selection.
|
||||
// "miranda" means not static, not defined by this class.
|
||||
// private methods in interfaces do not belong in the miranda list.
|
||||
@ -709,8 +717,9 @@ bool klassVtable::is_miranda(Method* m, Array<Method*>* class_methods,
|
||||
}
|
||||
Symbol* name = m->name();
|
||||
Symbol* signature = m->signature();
|
||||
Method* mo;
|
||||
|
||||
if (InstanceKlass::find_instance_method(class_methods, name, signature) == NULL) {
|
||||
if ((mo = InstanceKlass::find_instance_method(class_methods, name, signature)) == NULL) {
|
||||
// did not find it in the method table of the current class
|
||||
if ((default_methods == NULL) ||
|
||||
InstanceKlass::find_method(default_methods, name, signature) == NULL) {
|
||||
@ -719,7 +728,7 @@ bool klassVtable::is_miranda(Method* m, Array<Method*>* class_methods,
|
||||
return true;
|
||||
}
|
||||
|
||||
Method* mo = InstanceKlass::cast(super)->lookup_method(name, signature);
|
||||
mo = InstanceKlass::cast(super)->lookup_method(name, signature);
|
||||
while (mo != NULL && mo->access_flags().is_static()
|
||||
&& mo->method_holder() != NULL
|
||||
&& mo->method_holder()->super() != NULL)
|
||||
@ -731,6 +740,18 @@ bool klassVtable::is_miranda(Method* m, Array<Method*>* class_methods,
|
||||
return true;
|
||||
}
|
||||
}
|
||||
} else {
|
||||
// if the local class has a private method, the miranda will not
|
||||
// override it, so a vtable slot is needed
|
||||
if (mo->access_flags().is_private()) {
|
||||
|
||||
// Second round, weed out any superinterface methods that turned
|
||||
// into default methods, i.e. were concrete not abstract in the end
|
||||
if ((default_methods == NULL) ||
|
||||
InstanceKlass::find_method(default_methods, name, signature) == NULL) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return false;
|
||||
|
@ -2320,7 +2320,7 @@ bool Arguments::check_vm_args_consistency() {
|
||||
"G1ConcMarkStepDurationMillis");
|
||||
status = status && verify_interval(G1ConcRSHotCardLimit, 0, max_jubyte,
|
||||
"G1ConcRSHotCardLimit");
|
||||
status = status && verify_interval(G1ConcRSLogCacheSize, 0, 31,
|
||||
status = status && verify_interval(G1ConcRSLogCacheSize, 0, 27,
|
||||
"G1ConcRSLogCacheSize");
|
||||
status = status && verify_interval(StringDeduplicationAgeThreshold, 1, markOopDesc::max_age,
|
||||
"StringDeduplicationAgeThreshold");
|
||||
|
@ -302,3 +302,4 @@ d49e247dade61f29f771f09b2105857492241156 jdk9-b55
|
||||
c76339e86ea7da5d9ac7856f3fae9ef73eef04a2 jdk9-b57
|
||||
36fc65e80d811ee43aedfc69284224b86a403662 jdk9-b58
|
||||
48ee960f29df93a9b2a895621321358a86909086 jdk9-b59
|
||||
84c5527f742bc64562e47d3149c16197fe1c4c1a jdk9-b60
|
||||
|
@ -45,7 +45,7 @@ DEMO_SHARE_SRC := $(JDK_TOPDIR)/src/demo/share
|
||||
DEMO_CLOSED_SHARE_SRC := $(JDK_TOPDIR)/src/closed/demo/share
|
||||
DEMO_SOLARIS_SRC := $(JDK_TOPDIR)/src/demo/solaris
|
||||
DEMO_OS_TYPE_SRC := $(JDK_TOPDIR)/src/demo/$(OPENJDK_TARGET_OS_TYPE)
|
||||
VERSION_INFO_RESOURCE := $(JDK_TOPDIR)/src/java.base/windows/native/common/version.rc
|
||||
GLOBAL_VERSION_INFO_RESOURCE := $(JDK_TOPDIR)/src/java.base/windows/native/common/version.rc
|
||||
|
||||
##################################################################################################
|
||||
|
||||
@ -230,11 +230,8 @@ define SetupJVMTIDemo
|
||||
$$(wildcard $$(patsubst %, $(DEMO_SHARE_SRC)/jvmti/%/README.txt, $2)) \
|
||||
$$(wildcard $$(patsubst %, $(DEMO_SHARE_SRC)/jvmti/%/sample.makefile.txt, $2))
|
||||
BUILD_DEMO_JVMTI_$1_EXTRA_INC := $$(addprefix -I, $$(BUILD_DEMO_JVMTI_$1_EXTRA_SRC))
|
||||
BUILD_DEMO_JVMTI_$1_LANG := C
|
||||
ifneq (, $4)
|
||||
BUILD_DEMO_JVMTI_$1_LANG := $4
|
||||
endif
|
||||
ifeq (C++, $4)
|
||||
BUILD_DEMO_JVMTI_$1_TOOLCHAIN := TOOLCHAIN_LINK_CXX
|
||||
$1_EXTRA_CXX := $(LDFLAGS_CXX_JDK) $(LIBCXX)
|
||||
endif
|
||||
|
||||
@ -254,7 +251,7 @@ define SetupJVMTIDemo
|
||||
# Remove the -incremental:no setting to get .ilk-files like in the old build.
|
||||
$$(eval $$(call SetupNativeCompilation,BUILD_DEMO_JVMTI_$1, \
|
||||
SRC := $(DEMO_SHARE_SRC)/jvmti/$1 $$(BUILD_DEMO_JVMTI_$1_EXTRA_SRC), \
|
||||
LANG := $$(BUILD_DEMO_JVMTI_$1_LANG), \
|
||||
TOOLCHAIN := $$(BUILD_DEMO_JVMTI_$1_TOOLCHAIN), \
|
||||
OPTIMIZATION := LOW, \
|
||||
CXXFLAGS := $$($1_CXXFLAGS), \
|
||||
DISABLED_WARNINGS_gcc := $(10), \
|
||||
@ -267,7 +264,7 @@ define SetupJVMTIDemo
|
||||
LDFLAGS_SUFFIX_windows := $6, \
|
||||
LDFLAGS_SUFFIX_solaris := $7 -lc, \
|
||||
LDFLAGS_SUFFIX_linux := $8, \
|
||||
VERSIONINFO_RESOURCE := $(VERSION_INFO_RESOURCE), \
|
||||
VERSIONINFO_RESOURCE := $(GLOBAL_VERSION_INFO_RESOURCE), \
|
||||
RC_FLAGS := $$(RC_FLAGS) \
|
||||
-D "JDK_FNAME=$1.dll" \
|
||||
-D "JDK_INTERNAL_NAME=$1" \
|
||||
@ -398,7 +395,6 @@ ifeq ($(OPENJDK_TARGET_OS), solaris)
|
||||
|
||||
$(eval $(call SetupNativeCompilation,BUILD_LIBPOLLER, \
|
||||
SRC := $(DEMO_SOLARIS_SRC)/jni/Poller, \
|
||||
LANG := C, \
|
||||
OPTIMIZATION := LOW, \
|
||||
CFLAGS := $(CFLAGS_JDKLIB) $(SHARED_LIBRARY_FLAGS) \
|
||||
-I$(SUPPORT_OUTPUTDIR)/demo/classes/jni/Poller, \
|
||||
|
@ -163,9 +163,7 @@ $(eval $(call SetupCopyFiles,COPY_JIMAGE_SERVICE_PROVIDER, \
|
||||
ifeq ($(OPENJDK_TARGET_OS), solaris)
|
||||
$(eval $(call SetupNativeCompilation,ADD_GNU_DEBUGLINK, \
|
||||
SRC := $(JDK_TOPDIR)/make/src/native/add_gnu_debuglink, \
|
||||
LANG := C, \
|
||||
CC := $(BUILD_CC), \
|
||||
LDEXE := $(BUILD_LD), \
|
||||
TOOLCHAIN := TOOLCHAIN_BUILD, \
|
||||
LDFLAGS := -lelf, \
|
||||
OBJECT_DIR := $(BUILDTOOLS_OUTPUTDIR)/objs/add_gnu_debuglink, \
|
||||
OUTPUT_DIR := $(BUILDTOOLS_OUTPUTDIR)/bin, \
|
||||
@ -173,9 +171,7 @@ ifeq ($(OPENJDK_TARGET_OS), solaris)
|
||||
|
||||
$(eval $(call SetupNativeCompilation,FIX_EMPTY_SEC_HDR_FLAGS, \
|
||||
SRC := $(JDK_TOPDIR)/make/src/native/fix_empty_sec_hdr_flags, \
|
||||
LANG := C, \
|
||||
CC := $(BUILD_CC), \
|
||||
LDEXE := $(BUILD_LD), \
|
||||
TOOLCHAIN := TOOLCHAIN_BUILD, \
|
||||
LDFLAGS := -lelf, \
|
||||
OBJECT_DIR := $(BUILDTOOLS_OUTPUTDIR)/objs/fix_empty_sec_hdr_flags, \
|
||||
OUTPUT_DIR := $(BUILDTOOLS_OUTPUTDIR)/bin, \
|
||||
|
@ -170,9 +170,6 @@ POLICY_SRC_LIST :=
|
||||
|
||||
ifeq ($(OPENJDK_TARGET_OS), windows)
|
||||
POLICY_SRC_LIST += $(JDK_TOPDIR)/src/java.base/$(OPENJDK_TARGET_OS)/conf/security/java.policy
|
||||
ifndef OPENJDK
|
||||
POLICY_SRC_LIST += $(JDK_TOPDIR)/src/closed/java.base/$(OPENJDK_TARGET_OS)/conf/security/java.policy
|
||||
endif
|
||||
endif
|
||||
|
||||
POLICY_SRC_LIST += $(POLICY_SRC)
|
||||
|
47
jdk/make/copy/Copy-jdk.accessibility.gmk
Normal file
47
jdk/make/copy/Copy-jdk.accessibility.gmk
Normal file
@ -0,0 +1,47 @@
|
||||
#
|
||||
# Copyright (c) 2104, 2015, Oracle and/or its affiliates. All rights reserved.
|
||||
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
#
|
||||
# This code is free software; you can redistribute it and/or modify it
|
||||
# under the terms of the GNU General Public License version 2 only, as
|
||||
# published by the Free Software Foundation. Oracle designates this
|
||||
# particular file as subject to the "Classpath" exception as provided
|
||||
# by Oracle in the LICENSE file that accompanied this code.
|
||||
#
|
||||
# This code is distributed in the hope that it will be useful, but WITHOUT
|
||||
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
# version 2 for more details (a copy is included in the LICENSE file that
|
||||
# accompanied this code).
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License version
|
||||
# 2 along with this work; if not, write to the Free Software Foundation,
|
||||
# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
#
|
||||
# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
|
||||
# or visit www.oracle.com if you need additional information or have any
|
||||
# questions.
|
||||
#
|
||||
|
||||
include CopyCommon.gmk
|
||||
|
||||
################################################################################
|
||||
|
||||
ifeq ($(OPENJDK_TARGET_OS), windows)
|
||||
TARGETS += $(INCLUDE_DST_OS_DIR)/bridge/AccessBridgeCallbacks.h \
|
||||
$(INCLUDE_DST_OS_DIR)/bridge/AccessBridgeCalls.h \
|
||||
$(INCLUDE_DST_OS_DIR)/bridge/AccessBridgePackages.h \
|
||||
$(INCLUDE_DST_OS_DIR)/bridge/AccessBridgeCalls.c \
|
||||
$(CONF_DST_DIR)/accessibility.properties
|
||||
|
||||
$(INCLUDE_DST_OS_DIR)/bridge/%: \
|
||||
$(JDK_TOPDIR)/src/jdk.accessibility/windows/native/include/bridge/%
|
||||
$(install-file)
|
||||
|
||||
$(CONF_DST_DIR)/accessibility.properties: \
|
||||
$(JDK_TOPDIR)/src/jdk.accessibility/windows/conf/accessibility.properties
|
||||
$(install-file)
|
||||
|
||||
endif
|
||||
|
||||
################################################################################
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 1998, 2014, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 1998, 2015, 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
|
||||
@ -92,25 +92,38 @@ public class @(BeanClassName)BeanInfo extends javax.swing.SwingBeanInfoBase {
|
||||
/**
|
||||
* @return an icon of the specified kind for @(BeanClassName)
|
||||
*/
|
||||
public Image getIcon(int kind) {
|
||||
public Image getIcon(final int kind) {
|
||||
Image i;
|
||||
switch (kind){
|
||||
case ICON_COLOR_32x32:
|
||||
i = loadImage("beaninfo/images/@(BeanClassName)Color32.gif");
|
||||
return ((i == null) ? loadImage("beaninfo/images/JComponentColor32.gif") : i);
|
||||
i = loadStandardImage("beaninfo/images/@(BeanClassName)Color32.gif");
|
||||
return ((i == null) ? loadStandardImage("beaninfo/images/JComponentColor32.gif") : i);
|
||||
case ICON_COLOR_16x16:
|
||||
i = loadImage("beaninfo/images/@(BeanClassName)Color16.gif");
|
||||
return ((i == null) ? loadImage("beaninfo/images/JComponentColor16.gif") : i);
|
||||
i = loadStandardImage("beaninfo/images/@(BeanClassName)Color16.gif");
|
||||
return ((i == null) ? loadStandardImage("beaninfo/images/JComponentColor16.gif") : i);
|
||||
case ICON_MONO_32x32:
|
||||
i = loadImage("beaninfo/images/@(BeanClassName)Mono32.gif");
|
||||
return ((i == null) ? loadImage("beaninfo/images/JComponentMono32.gif") : i);
|
||||
i = loadStandardImage("beaninfo/images/@(BeanClassName)Mono32.gif");
|
||||
return ((i == null) ? loadStandardImage("beaninfo/images/JComponentMono32.gif") : i);
|
||||
case ICON_MONO_16x16:
|
||||
i = loadImage("beaninfo/images/@(BeanClassName)Mono16.gif");
|
||||
return ((i == null) ? loadImage("beaninfo/images/JComponentMono16.gif") : i);
|
||||
i = loadStandardImage("beaninfo/images/@(BeanClassName)Mono16.gif");
|
||||
return ((i == null) ? loadStandardImage("beaninfo/images/JComponentMono16.gif") : i);
|
||||
default:
|
||||
return super.getIcon(kind);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* This is a utility method to help in loading standard icon images.
|
||||
*
|
||||
* @param resourceName A pathname relative to the directory holding the
|
||||
* class file of the current class
|
||||
* @return an image object. May be null if the load failed.
|
||||
* @see java.beans.SimpleBeanInfo#loadImage(String)
|
||||
*/
|
||||
private Image loadStandardImage(final String resourceName) {
|
||||
return java.security.AccessController.doPrivileged(
|
||||
(java.security.PrivilegedAction<Image>) () -> loadImage(resourceName));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
@ -63,9 +63,7 @@ SOR_COPYRIGHT_YEARS = $(shell $(CAT) $(GENSRC_SOR_SRC)/$(GENSRC_SOR_SRC_FILE) |
|
||||
$(eval $(call SetupNativeCompilation,BUILD_GENSRC_SOR_EXE, \
|
||||
SRC := $(GENSRC_SOR_SRC), \
|
||||
INCLUDE_FILES := $(GENSRC_SOR_SRC_FILE), \
|
||||
LANG := C, \
|
||||
CC := $(BUILD_CC), \
|
||||
LDEXE := $(BUILD_LD), \
|
||||
TOOLCHAIN := TOOLCHAIN_BUILD, \
|
||||
OBJECT_DIR := $(GENSRC_SOR_BIN), \
|
||||
OUTPUT_DIR := $(GENSRC_SOR_BIN), \
|
||||
PROGRAM := genSocketOptionRegistry))
|
||||
@ -101,9 +99,7 @@ ifneq ($(OPENJDK_TARGET_OS), windows)
|
||||
$(eval $(call SetupNativeCompilation,BUILD_GENSRC_UC_EXE, \
|
||||
SRC := $(GENSRC_UC_SRC), \
|
||||
INCLUDE_FILES := $(GENSRC_UC_SRC_FILE), \
|
||||
LANG := C, \
|
||||
CC := $(BUILD_CC), \
|
||||
LDEXE := $(BUILD_CC), \
|
||||
TOOLCHAIN := TOOLCHAIN_BUILD, \
|
||||
CFLAGS := $(filter -D%, $(CFLAGS_JDKEXE)), \
|
||||
OBJECT_DIR := $(GENSRC_UC_BIN), \
|
||||
OUTPUT_DIR := $(GENSRC_UC_BIN), \
|
||||
@ -142,9 +138,7 @@ ifeq ($(OPENJDK_TARGET_OS), solaris)
|
||||
$(eval $(call SetupNativeCompilation,BUILD_GENSRC_SOL_EXE, \
|
||||
SRC := $(GENSRC_SOL_SRC), \
|
||||
INCLUDE_FILES := $(GENSRC_SOL_SRC_FILE), \
|
||||
LANG := C, \
|
||||
CC := $(BUILD_CC), \
|
||||
LDEXE := $(BUILD_CC), \
|
||||
TOOLCHAIN := TOOLCHAIN_BUILD, \
|
||||
OBJECT_DIR := $(GENSRC_SOL_BIN), \
|
||||
OUTPUT_DIR := $(GENSRC_SOL_BIN), \
|
||||
PROGRAM := genSolarisConstants))
|
||||
|
@ -103,7 +103,6 @@ ifneq ($(BUILD_JEXEC_SRC), )
|
||||
$(eval $(call SetupNativeCompilation,BUILD_JEXEC, \
|
||||
SRC := $(BUILD_JEXEC_SRC), \
|
||||
INCLUDE_FILES := jexec.c, \
|
||||
LANG := C, \
|
||||
OPTIMIZATION := LOW, \
|
||||
CFLAGS := $(CFLAGS_JDKEXE) \
|
||||
$(BUILD_JEXEC_INC), \
|
||||
@ -144,7 +143,6 @@ ifeq ($(BUILD_JSPAWNHELPER), 1)
|
||||
$(eval $(call SetupNativeCompilation,BUILD_JSPAWNHELPER, \
|
||||
SRC := $(BUILD_JSPAWNHELPER_SRC), \
|
||||
INCLUDE_FILES := jspawnhelper.c, \
|
||||
LANG := C, \
|
||||
OPTIMIZATION := LOW, \
|
||||
CFLAGS := $(CFLAGS_JDKEXE) $(JSPAWNHELPER_CFLAGS), \
|
||||
LDFLAGS := $(LDFLAGS_JDKEXE) $(LINK_JSPAWNHELPER_FLAGS), \
|
||||
|
61
jdk/make/launcher/Launcher-jdk.accessibility.gmk
Normal file
61
jdk/make/launcher/Launcher-jdk.accessibility.gmk
Normal file
@ -0,0 +1,61 @@
|
||||
#
|
||||
# Copyright (c) 2014, 2015, Oracle and/or its affiliates. All rights reserved.
|
||||
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
#
|
||||
# This code is free software; you can redistribute it and/or modify it
|
||||
# under the terms of the GNU General Public License version 2 only, as
|
||||
# published by the Free Software Foundation. Oracle designates this
|
||||
# particular file as subject to the "Classpath" exception as provided
|
||||
# by Oracle in the LICENSE file that accompanied this code.
|
||||
#
|
||||
# This code is distributed in the hope that it will be useful, but WITHOUT
|
||||
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
# version 2 for more details (a copy is included in the LICENSE file that
|
||||
# accompanied this code).
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License version
|
||||
# 2 along with this work; if not, write to the Free Software Foundation,
|
||||
# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
#
|
||||
# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
|
||||
# or visit www.oracle.com if you need additional information or have any
|
||||
# questions.
|
||||
#
|
||||
|
||||
include LauncherCommon.gmk
|
||||
|
||||
################################################################################
|
||||
# jabswitch
|
||||
|
||||
ifeq ($(OPENJDK_TARGET_OS), windows)
|
||||
|
||||
JABSWITCH_SRC := $(JDK_TOPDIR)/src/jdk.accessibility/windows/native/jabswitch
|
||||
ACCESSBRIDGE_SRC := $(JDK_TOPDIR)/src/jdk.accessibility/windows/native/common
|
||||
|
||||
$(eval $(call SetupNativeCompilation,BUILD_JABSWITCH, \
|
||||
SRC := $(JABSWITCH_SRC), \
|
||||
INCLUDE_FILES := jabswitch.cpp, \
|
||||
CFLAGS := $(filter-out -Zc:wchar_t-, $(CFLAGS_JDKEXE)) -Zc:wchar_t \
|
||||
-analyze- -Od -Gd -D_WINDOWS \
|
||||
-D_UNICODE -DUNICODE -RTC1 -EHsc, \
|
||||
DISABLED_WARNINGS_microsoft := 4267, \
|
||||
LDFLAGS := $(LDFLAGS_JDKEXE) \
|
||||
Advapi32.lib Version.lib User32.lib, \
|
||||
OBJECT_DIR := $(SUPPORT_OUTPUTDIR)/native/jdk.accessibility/jabswitch, \
|
||||
OUTPUT_DIR := $(SUPPORT_OUTPUTDIR)/modules_cmds/jdk.accessibility, \
|
||||
PROGRAM := jabswitch, \
|
||||
DEBUG_SYMBOLS := true, \
|
||||
VERSIONINFO_RESOURCE := $(ACCESSBRIDGE_SRC)/AccessBridgeStatusWindow.RC, \
|
||||
RC_FLAGS := $(RC_FLAGS) \
|
||||
-D "JDK_FNAME=jabswitch.exe" \
|
||||
-D "JDK_INTERNAL_NAME=jabswitch" \
|
||||
-D "JDK_FTYPE=0x01L", \
|
||||
MANIFEST := $(JABSWITCH_SRC)/jabswitch.manifest, \
|
||||
MANIFEST_VERSION := $(JDK_VERSION_FOR_MANIFEST), \
|
||||
))
|
||||
|
||||
TARGETS += $(BUILD_JABSWITCH)
|
||||
endif
|
||||
|
||||
################################################################################
|
@ -56,23 +56,28 @@ else
|
||||
|
||||
endif
|
||||
|
||||
UNPACKEXE_LANG := C
|
||||
ifeq ($(OPENJDK_TARGET_OS), solaris)
|
||||
UNPACKEXE_LANG := C++
|
||||
UNPACKEXE_TOOLCHAIN := TOOLCHAIN_LINK_CXX
|
||||
endif
|
||||
|
||||
UNPACK_MAPFILE_DIR := $(JDK_TOPDIR)/make/mapfiles/libunpack
|
||||
UNPACK_MAPFILE_PLATFORM_FILE := \
|
||||
$(UNPACK_MAPFILE_DIR)/mapfile-vers-unpack200-$(OPENJDK_TARGET_OS)-$(OPENJDK_TARGET_CPU_ARCH)
|
||||
|
||||
# The linker on older SuSE distros (e.g. on SLES 10) complains with:
|
||||
# "Invalid version tag `SUNWprivate_1.1'. Only anonymous version tag is allowed in executable."
|
||||
# if feeded with a version script which contains named tags.
|
||||
ifeq ($(USING_BROKEN_SUSE_LD), yes)
|
||||
UNPACK_MAPFILE = $(JDK_TOPDIR)/make/mapfiles/libunpack/mapfile-vers-unpack200.anonymous
|
||||
UNPACK_MAPFILE := $(UNPACK_MAPFILE_DIR)/mapfile-vers-unpack200.anonymous
|
||||
else ifneq ($(wildcard $(UNPACK_MAPFILE_PLATFORM_FILE)), )
|
||||
UNPACK_MAPFILE := $(UNPACK_MAPFILE_PLATFORM_FILE)
|
||||
else
|
||||
UNPACK_MAPFILE = $(JDK_TOPDIR)/make/mapfiles/libunpack/mapfile-vers-unpack200
|
||||
UNPACK_MAPFILE := $(UNPACK_MAPFILE_DIR)/mapfile-vers-unpack200
|
||||
endif
|
||||
|
||||
$(eval $(call SetupNativeCompilation,BUILD_UNPACKEXE, \
|
||||
SRC := $(UNPACKEXE_SRC), \
|
||||
LANG := $(UNPACKEXE_LANG), \
|
||||
TOOLCHAIN := $(UNPACKEXE_TOOLCHAIN), \
|
||||
OPTIMIZATION := LOW, \
|
||||
CFLAGS := $(UNPACKEXE_CFLAGS) $(CXXFLAGS_JDKEXE) -DFULL, \
|
||||
CFLAGS_release := -DPRODUCT, \
|
||||
@ -96,7 +101,9 @@ $(eval $(call SetupNativeCompilation,BUILD_UNPACKEXE, \
|
||||
-D "JDK_INTERNAL_NAME=unpack200" \
|
||||
-D "JDK_FTYPE=0x1L", \
|
||||
DEBUG_SYMBOLS := true, \
|
||||
MANIFEST := $(JDK_TOPDIR)/src/jdk.pack200/windows/native/unpack200/unpack200_proto.exe.manifest))
|
||||
MANIFEST := $(JDK_TOPDIR)/src/jdk.pack200/windows/native/unpack200/unpack200_proto.exe.manifest, \
|
||||
MANIFEST_VERSION := $(JDK_VERSION_FOR_MANIFEST), \
|
||||
))
|
||||
|
||||
ifneq ($(USE_EXTERNAL_LIBZ), true)
|
||||
|
||||
|
@ -1,5 +1,5 @@
|
||||
#
|
||||
# Copyright (c) 2011, 2014, Oracle and/or its affiliates. All rights reserved.
|
||||
# Copyright (c) 2011, 2015, 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
|
||||
@ -161,7 +161,6 @@ define SetupLauncher
|
||||
$(call SetupNativeCompilation,BUILD_LAUNCHER_$1, \
|
||||
SRC := $(LAUNCHER_SRC), \
|
||||
INCLUDE_FILES := main.c, \
|
||||
LANG := C, \
|
||||
OPTIMIZATION := $$($1_OPTIMIZATION_ARG), \
|
||||
CFLAGS := $$($1_CFLAGS) \
|
||||
$(LAUNCHER_CFLAGS) \
|
||||
@ -199,7 +198,9 @@ define SetupLauncher
|
||||
-D "JDK_FTYPE=0x1L" \
|
||||
$7, \
|
||||
MANIFEST := $(JAVA_MANIFEST), \
|
||||
CODESIGN := $$($1_CODESIGN))
|
||||
MANIFEST_VERSION := $(JDK_VERSION_FOR_MANIFEST), \
|
||||
CODESIGN := $$($1_CODESIGN), \
|
||||
)
|
||||
|
||||
TARGETS += $$(BUILD_LAUNCHER_$1)
|
||||
|
||||
|
@ -51,7 +51,6 @@ $(eval $(call SetupNativeCompilation,BUILD_LIBMLIB_IMAGE, \
|
||||
OUTPUT_DIR := $(INSTALL_LIBRARIES_HERE), \
|
||||
SRC := $(BUILD_LIBMLIB_SRC), \
|
||||
EXCLUDE_FILES := mlib_c_ImageBlendTable.c, \
|
||||
LANG := C, \
|
||||
OPTIMIZATION := HIGHEST, \
|
||||
CFLAGS := $(CFLAGS_JDKLIB) \
|
||||
$(BUILD_LIBMLIB_CFLAGS), \
|
||||
@ -124,7 +123,6 @@ ifeq ($(OPENJDK_TARGET_OS)-$(OPENJDK_TARGET_CPU_ARCH), solaris-sparc)
|
||||
LIBRARY := mlib_image_v, \
|
||||
OUTPUT_DIR := $(INSTALL_LIBRARIES_HERE), \
|
||||
SRC := $(LIBMLIB_IMAGE_V_SRC), \
|
||||
LANG := C, \
|
||||
EXCLUDE_FILES := $(BUILD_LIBMLIB_IMAGE_V_EXFILES), \
|
||||
OPTIMIZATION := HIGHEST, \
|
||||
CFLAGS := -xarch=sparcvis \
|
||||
@ -204,8 +202,6 @@ ifneq ($(OPENJDK_TARGET_OS), solaris)
|
||||
LIBAWT_CFLAGS += -DMLIB_NO_LIBSUNMATH
|
||||
endif
|
||||
|
||||
LIBAWT_LANG := C
|
||||
|
||||
ifeq ($(OPENJDK_TARGET_OS), windows)
|
||||
LIBAWT_DIRS += $(JDK_TOPDIR)/src/java.desktop/share/native/common/font \
|
||||
$(JDK_TOPDIR)/src/java.desktop/share/native/common/java2d/opengl \
|
||||
@ -222,7 +218,6 @@ ifeq ($(OPENJDK_TARGET_OS), windows)
|
||||
awt/image/cvutils/img_colors.c \
|
||||
#
|
||||
|
||||
LIBAWT_LANG := C++
|
||||
LIBAWT_CFLAGS += -EHsc -DUNICODE -D_UNICODE
|
||||
ifeq ($(OPENJDK_TARGET_CPU_BITS), 64)
|
||||
LIBAWT_CFLAGS += -DMLIB_OS64BIT
|
||||
@ -247,7 +242,6 @@ $(eval $(call SetupNativeCompilation,BUILD_LIBAWT, \
|
||||
SRC := $(LIBAWT_DIRS), \
|
||||
EXCLUDES := $(LIBAWT_EXCLUDES), \
|
||||
EXCLUDE_FILES := $(LIBAWT_EXFILES), \
|
||||
LANG := $(LIBAWT_LANG), \
|
||||
OPTIMIZATION := LOW, \
|
||||
CFLAGS := $(CFLAGS_JDKLIB) $(LIBAWT_CFLAGS), \
|
||||
DISABLED_WARNINGS_gcc := sign-compare unused-result maybe-uninitialized \
|
||||
@ -355,7 +349,6 @@ ifeq ($(findstring $(OPENJDK_TARGET_OS),windows macosx),)
|
||||
OUTPUT_DIR := $(INSTALL_LIBRARIES_HERE), \
|
||||
SRC := $(LIBAWT_XAWT_DIRS), \
|
||||
EXCLUDES := $(LIBAWT_XAWT_EXCLUDES), \
|
||||
LANG := C, \
|
||||
OPTIMIZATION := LOW, \
|
||||
CFLAGS := $(CFLAGS_JDKLIB) $(LIBAWT_XAWT_CFLAGS) \
|
||||
$(X_CFLAGS), \
|
||||
@ -413,7 +406,6 @@ $(eval $(call SetupNativeCompilation,BUILD_LIBLCMS, \
|
||||
OUTPUT_DIR := $(INSTALL_LIBRARIES_HERE), \
|
||||
SRC := $(LIBLCMS_SRC), \
|
||||
INCLUDE_FILES := $(BUILD_LIBLCMS_INCLUDE_FILES), \
|
||||
LANG := C, \
|
||||
OPTIMIZATION := HIGHEST, \
|
||||
CFLAGS := $(filter-out -xc99=%none, $(CFLAGS_JDKLIB)) \
|
||||
$(SHARED_LIBRARY_FLAGS) $(LIBLCMS_CPPFLAGS) \
|
||||
@ -496,7 +488,6 @@ $(eval $(call SetupNativeCompilation,BUILD_LIBJAVAJPEG, \
|
||||
OUTPUT_DIR := $(INSTALL_LIBRARIES_HERE), \
|
||||
SRC := $(LIBJAVAJPEG_SRC), \
|
||||
INCLUDE_FILES := $(BUILD_LIBJAVAJPEG_INCLUDE_FILES), \
|
||||
LANG := C, \
|
||||
OPTIMIZATION := HIGHEST, \
|
||||
CFLAGS := $(CFLAGS_JDKLIB) $(addprefix -I, $(LIBJAVAJPEG_SRC)) \
|
||||
$(LIBJAVA_HEADER_FLAGS) \
|
||||
@ -564,7 +555,6 @@ ifeq ($(BUILD_HEADLESS), true)
|
||||
OUTPUT_DIR := $(INSTALL_LIBRARIES_HERE), \
|
||||
SRC := $(LIBAWT_HEADLESS_DIRS), \
|
||||
EXCLUDES := $(LIBAWT_HEADLESS_EXCLUDES), \
|
||||
LANG := C, \
|
||||
OPTIMIZATION := LOW, \
|
||||
CFLAGS := $(CFLAGS_JDKLIB) \
|
||||
-DHEADLESS=true \
|
||||
@ -651,7 +641,7 @@ $(eval $(call SetupNativeCompilation,BUILD_LIBFONTMANAGER, \
|
||||
SRC := $(LIBFONTMANAGER_SRC), \
|
||||
EXCLUDE_FILES := $(LIBFONTMANAGER_EXCLUDE_FILES) \
|
||||
AccelGlyphCache.c, \
|
||||
LANG := C++, \
|
||||
TOOLCHAIN := TOOLCHAIN_LINK_CXX, \
|
||||
CFLAGS := $(CFLAGS_JDKLIB) $(LIBFONTMANAGER_CFLAGS), \
|
||||
CXXFLAGS := $(CXXFLAGS_JDKLIB) $(LIBFONTMANAGER_CFLAGS), \
|
||||
OPTIMIZATION := $(LIBFONTMANAGER_OPTIMIZATION), \
|
||||
@ -712,7 +702,6 @@ ifeq ($(OPENJDK_TARGET_OS), windows)
|
||||
OUTPUT_DIR := $(INSTALL_LIBRARIES_HERE), \
|
||||
SRC := $(LIBJAWT_SRC), \
|
||||
INCLUDE_FILES := $(LIBJAWT_INCLUDE_FILES), \
|
||||
LANG := C++, \
|
||||
OPTIMIZATION := LOW, \
|
||||
CFLAGS := $(CXXFLAGS_JDKLIB) \
|
||||
-EHsc -DUNICODE -D_UNICODE \
|
||||
@ -771,7 +760,6 @@ else # OPENJDK_TARGET_OS not windows
|
||||
OUTPUT_DIR := $(INSTALL_LIBRARIES_HERE), \
|
||||
SRC := $(LIBJAWT_SRC), \
|
||||
INCLUDE_FILES := $(JAWT_FILES), \
|
||||
LANG := C, \
|
||||
OPTIMIZATION := LOW, \
|
||||
CFLAGS := $(CFLAGS_JDKLIB) \
|
||||
$(LIBJAWT_CFLAGS), \
|
||||
@ -889,7 +877,6 @@ ifndef BUILD_HEADLESS_ONLY
|
||||
SRC := $(LIBSPLASHSCREEN_DIRS), \
|
||||
EXCLUDE_FILES := imageioJPEG.c jpegdecoder.c pngtest.c, \
|
||||
EXCLUDES := $(LIBSPLASHSCREEN_EXCLUDES), \
|
||||
LANG := C, \
|
||||
OPTIMIZATION := LOW, \
|
||||
CFLAGS := $(LIBSPLASHSCREEN_CFLAGS) $(CFLAGS_JDKLIB) \
|
||||
$(GIFLIB_CFLAGS) $(LIBJPEG_CFLAGS) $(PNG_CFLAGS), \
|
||||
@ -958,7 +945,6 @@ ifeq ($(OPENJDK_TARGET_OS), macosx)
|
||||
LIBRARY := awt_lwawt, \
|
||||
OUTPUT_DIR := $(INSTALL_LIBRARIES_HERE), \
|
||||
SRC := $(LIBAWT_LWAWT_DIRS), \
|
||||
LANG := C, \
|
||||
INCLUDE_FILES := $(LIBAWT_LWAWT_FILES), \
|
||||
EXCLUDE_FILES := $(LIBAWT_LWAWT_EXFILES), \
|
||||
EXCLUDES := $(LIBAWT_LWAWT_EXCLUDES), \
|
||||
@ -1008,7 +994,6 @@ ifeq ($(OPENJDK_TARGET_OS), macosx)
|
||||
LIBRARY := osxui, \
|
||||
OUTPUT_DIR := $(INSTALL_LIBRARIES_HERE), \
|
||||
SRC := $(JDK_TOPDIR)/src/java.desktop/macosx/native/libosxui, \
|
||||
LANG := C, \
|
||||
OPTIMIZATION := LOW, \
|
||||
CFLAGS := $(CFLAGS_JDKLIB) \
|
||||
-I$(JDK_TOPDIR)/src/java.desktop/macosx/native/libosxui \
|
||||
|
@ -43,7 +43,6 @@ ifneq ($(OPENJDK_TARGET_OS), macosx)
|
||||
STATIC_LIBRARY := fdlibm, \
|
||||
OUTPUT_DIR := $(SUPPORT_OUTPUTDIR)/native/$(MODULE), \
|
||||
SRC := $(LIBFDLIBM_SRC), \
|
||||
LANG := C, \
|
||||
OPTIMIZATION := $(BUILD_LIBFDLIBM_OPTIMIZATION), \
|
||||
CFLAGS := $(CFLAGS_JDKLIB) $(LIBFDLIBM_CFLAGS), \
|
||||
CFLAGS_windows_debug := -DLOGGING, \
|
||||
@ -62,7 +61,6 @@ else
|
||||
LIBRARY := fdlibm, \
|
||||
OUTPUT_DIR := $(SUPPORT_OUTPUTDIR)/native/$(MODULE)/libfdlibm, \
|
||||
SRC := $(LIBFDLIBM_SRC), \
|
||||
LANG := C, \
|
||||
CFLAGS := $(CFLAGS_JDKLIB) $(LIBFDLIBM_CFLAGS), \
|
||||
LDFLAGS := -nostdlib -r -arch x86_64, \
|
||||
OBJECT_DIR := $(SUPPORT_OUTPUTDIR)/native/$(MODULE)/libfdlibm, \
|
||||
@ -93,7 +91,6 @@ $(eval $(call SetupNativeCompilation,BUILD_LIBVERIFY, \
|
||||
LIBRARY := verify, \
|
||||
OUTPUT_DIR := $(INSTALL_LIBRARIES_HERE), \
|
||||
SRC := $(JDK_TOPDIR)/src/java.base/share/native/libverify, \
|
||||
LANG := C, \
|
||||
OPTIMIZATION := $(LIBVERIFY_OPTIMIZATION), \
|
||||
CFLAGS := $(CFLAGS_JDKLIB), \
|
||||
DISABLED_WARNINGS_microsoft := 4244 4267, \
|
||||
@ -146,7 +143,6 @@ $(eval $(call SetupNativeCompilation,BUILD_LIBJAVA, \
|
||||
LIBRARY := java, \
|
||||
OUTPUT_DIR := $(INSTALL_LIBRARIES_HERE), \
|
||||
SRC := $(LIBJAVA_SRC_DIRS), \
|
||||
LANG := C, \
|
||||
OPTIMIZATION := HIGH, \
|
||||
CFLAGS := $(CFLAGS_JDKLIB) \
|
||||
$(LIBJAVA_CFLAGS), \
|
||||
@ -206,7 +202,6 @@ endif
|
||||
$(eval $(call SetupNativeCompilation,BUILD_LIBZIP, \
|
||||
LIBRARY := zip, \
|
||||
OUTPUT_DIR := $(INSTALL_LIBRARIES_HERE), \
|
||||
LANG := C, \
|
||||
OPTIMIZATION := LOW, \
|
||||
SRC := $(JDK_TOPDIR)/src/java.base/share/native/libzip, \
|
||||
EXCLUDES := $(LIBZIP_EXCLUDES), \
|
||||
@ -314,7 +309,6 @@ $(eval $(call SetupNativeCompilation,BUILD_LIBJLI, \
|
||||
SRC := $(LIBJLI_SRC_DIRS), \
|
||||
EXCLUDE_FILES := $(LIBJLI_EXCLUDE_FILES), \
|
||||
EXTRA_FILES := $(LIBJLI_EXTRA_FILES), \
|
||||
LANG := C, \
|
||||
OPTIMIZATION := HIGH, \
|
||||
CFLAGS := $(LIBJLI_CFLAGS), \
|
||||
DISABLED_WARNINGS_solstudio := E_ASM_DISABLES_OPTIMIZATION, \
|
||||
@ -363,7 +357,6 @@ ifeq ($(OPENJDK_TARGET_OS), windows)
|
||||
SRC := $(LIBJLI_SRC_DIRS), \
|
||||
EXCLUDE_FILES := $(LIBJLI_EXCLUDE_FILES), \
|
||||
EXTRA_FILES := $(LIBJLI_EXTRA_FILES), \
|
||||
LANG := C, \
|
||||
OPTIMIZATION := HIGH, \
|
||||
CFLAGS := $(STATIC_LIBRARY_FLAGS) $(LIBJLI_CFLAGS), \
|
||||
ARFLAGS := $(ARFLAGS), \
|
||||
@ -383,7 +376,6 @@ else ifeq ($(OPENJDK_TARGET_OS), macosx)
|
||||
SRC := $(LIBJLI_SRC_DIRS), \
|
||||
EXCLUDE_FILES := $(LIBJLI_EXCLUDE_FILES), \
|
||||
EXTRA_FILES := $(LIBJLI_EXTRA_FILES), \
|
||||
LANG := C, \
|
||||
OPTIMIZATION := HIGH, \
|
||||
CFLAGS := $(CFLAGS_JDKLIB) $(LIBJLI_CFLAGS), \
|
||||
LDFLAGS := -nostdlib -r, \
|
||||
@ -403,7 +395,6 @@ else ifeq ($(OPENJDK_TARGET_OS), aix)
|
||||
SRC := $(LIBJLI_SRC_DIRS), \
|
||||
EXCLUDE_FILES := $(LIBJLI_EXCLUDE_FILES), \
|
||||
EXTRA_FILES := $(LIBJLI_EXTRA_FILES), \
|
||||
LANG := C, \
|
||||
OPTIMIZATION := HIGH, \
|
||||
CFLAGS := $(STATIC_LIBRARY_FLAGS) $(LIBJLI_CFLAGS), \
|
||||
ARFLAGS := $(ARFLAGS), \
|
||||
|
@ -57,7 +57,6 @@ $(eval $(call SetupNativeCompilation,BUILD_LIBINSTRUMENT, \
|
||||
LIBRARY := instrument, \
|
||||
OUTPUT_DIR := $(INSTALL_LIBRARIES_HERE), \
|
||||
SRC := $(LIBINSTRUMENT_SRC), \
|
||||
LANG := C, \
|
||||
OPTIMIZATION := LOW, \
|
||||
CFLAGS := $(LIBINSTRUMENT_CFLAGS) $(CFLAGS_WARNINGS_ARE_ERRORS), \
|
||||
CFLAGS_debug := -DJPLIS_LOGGING, \
|
||||
|
@ -72,7 +72,6 @@ $(eval $(call SetupNativeCompilation,BUILD_LIBMANAGEMENT, \
|
||||
OUTPUT_DIR := $(INSTALL_LIBRARIES_HERE), \
|
||||
SRC := $(BUILD_LIBMANAGEMENT_SRC), \
|
||||
EXCLUDE_FILES := $(BUILD_LIBMANAGEMENT_EXCLUDES), \
|
||||
LANG := C, \
|
||||
OPTIMIZATION := $(LIBMANAGEMENT_OPTIMIZATION), \
|
||||
CFLAGS := $(CFLAGS_JDKLIB) $(CFLAGS_WARNINGS_ARE_ERRORS) $(BUILD_LIBMANAGEMENT_CFLAGS), \
|
||||
MAPFILE := $(LIBMANAGEMENT_MAPFILE), \
|
||||
|
@ -37,7 +37,6 @@ $(eval $(call SetupNativeCompilation,BUILD_LIBPREFS, \
|
||||
LIBRARY := prefs, \
|
||||
OUTPUT_DIR := $(INSTALL_LIBRARIES_HERE), \
|
||||
SRC := $(LIBPREF_SRC_DIRS), \
|
||||
LANG := C, \
|
||||
OPTIMIZATION := HIGH, \
|
||||
CFLAGS := $(CFLAGS_JDKLIB) $(addprefix -I, $(LIBPREF_SRC_DIRS)) \
|
||||
$(LIBJAVA_HEADER_FLAGS), \
|
||||
|
@ -36,7 +36,6 @@ ifneq ($(OPENJDK_TARGET_OS), windows)
|
||||
LIBRARY := j2gss, \
|
||||
OUTPUT_DIR := $(INSTALL_LIBRARIES_HERE), \
|
||||
SRC := $(LIBJ2GSS_SRC), \
|
||||
LANG := C, \
|
||||
OPTIMIZATION := LOW, \
|
||||
CFLAGS := $(CFLAGS_JDKLIB) $(addprefix -I, $(LIBJ2GSS_SRC)) \
|
||||
$(LIBJAVA_HEADER_FLAGS) \
|
||||
@ -79,7 +78,6 @@ ifneq ($(BUILD_CRYPTO), no)
|
||||
LIBRARY := $(BUILD_LIBKRB5_NAME), \
|
||||
OUTPUT_DIR := $(INSTALL_LIBRARIES_HERE), \
|
||||
SRC := $(BUILD_LIBKRB5_SRC), \
|
||||
LANG := C, \
|
||||
OPTIMIZATION := LOW, \
|
||||
CFLAGS := $(CFLAGS_JDKLIB) \
|
||||
$(addprefix -I, $(BUILD_LIBKRB5_SRC)) \
|
||||
|
@ -37,7 +37,6 @@ $(eval $(call SetupNativeCompilation,BUILD_LIBJ2PCSC, \
|
||||
LIBRARY := j2pcsc, \
|
||||
OUTPUT_DIR := $(INSTALL_LIBRARIES_HERE), \
|
||||
SRC := $(LIBJ2PCSC_SRC), \
|
||||
LANG := C, \
|
||||
CFLAGS_unix := -D__sun_jdk, \
|
||||
OPTIMIZATION := LOW, \
|
||||
CFLAGS := $(CFLAGS_JDKLIB) $(LIBJ2PCSC_CPPFLAGS), \
|
||||
|
135
jdk/make/lib/Lib-jdk.accessibility.gmk
Normal file
135
jdk/make/lib/Lib-jdk.accessibility.gmk
Normal file
@ -0,0 +1,135 @@
|
||||
#
|
||||
# Copyright (c) 2014, 2015, Oracle and/or its affiliates. All rights reserved.
|
||||
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
#
|
||||
# This code is free software; you can redistribute it and/or modify it
|
||||
# under the terms of the GNU General Public License version 2 only, as
|
||||
# published by the Free Software Foundation. Oracle designates this
|
||||
# particular file as subject to the "Classpath" exception as provided
|
||||
# by Oracle in the LICENSE file that accompanied this code.
|
||||
#
|
||||
# This code is distributed in the hope that it will be useful, but WITHOUT
|
||||
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
# version 2 for more details (a copy is included in the LICENSE file that
|
||||
# accompanied this code).
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License version
|
||||
# 2 along with this work; if not, write to the Free Software Foundation,
|
||||
# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
#
|
||||
# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
|
||||
# or visit www.oracle.com if you need additional information or have any
|
||||
# questions.
|
||||
#
|
||||
|
||||
include LibCommon.gmk
|
||||
|
||||
################################################################################
|
||||
|
||||
ifeq ($(OPENJDK_TARGET_OS), windows)
|
||||
|
||||
ROOT_SRCDIR := $(JDK_TOPDIR)/src/jdk.accessibility/windows/native
|
||||
JAVA_AB_SRCDIR := $(ROOT_SRCDIR)/libjavaaccessbridge $(ROOT_SRCDIR)/common
|
||||
WIN_AB_SRCDIR := $(ROOT_SRCDIR)/libwindowsaccessbridge $(ROOT_SRCDIR)/common
|
||||
SYSINFO_SRCDIR := $(ROOT_SRCDIR)/libjabsysinfo
|
||||
ACCESSBRIDGE_CFLAGS := -I$(SUPPORT_OUTPUTDIR)/headers/jdk.accessibility \
|
||||
-I$(JDK_TOPDIR)/src/java.desktop/windows/native/include \
|
||||
-I$(JDK_TOPDIR)/src/java.desktop/share/native/include
|
||||
|
||||
define SetupJavaDLL
|
||||
# Parameter 1 Suffix
|
||||
# Parameter 2 ACCESSBRIDGE_ARCH_ suffix
|
||||
|
||||
$(call SetupNativeCompilation,BUILD_JAVAACCESSBRIDGE$1, \
|
||||
LIBRARY = javaaccessbridge$1, \
|
||||
OUTPUT_DIR := $(INSTALL_LIBRARIES_HERE), \
|
||||
SRC := $(JAVA_AB_SRCDIR), \
|
||||
OPTIMIZATION := LOW, \
|
||||
CFLAGS := $(CFLAGS_JDKLIB) $(ACCESSBRIDGE_CFLAGS) \
|
||||
$(addprefix -I,$(JAVA_AB_SRCDIR)) \
|
||||
-I$(JDK_TOPDIR)/src/jdk.accessibility/windows/native/include/bridge \
|
||||
-DACCESSBRIDGE_ARCH_$2, \
|
||||
LDFLAGS := $(LDFLAGS_JDKLIB) kernel32.lib user32.lib gdi32.lib \
|
||||
winspool.lib comdlg32.lib advapi32.lib shell32.lib \
|
||||
$(SUPPORT_OUTPUTDIR)/native/java.desktop/libjawt/jawt.lib \
|
||||
ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib \
|
||||
-subsystem:windows, \
|
||||
VERSIONINFO_RESOURCE := $(ROOT_SRCDIR)/common/AccessBridgeStatusWindow.rc, \
|
||||
RC_FLAGS := $(RC_FLAGS) \
|
||||
-D "JDK_FNAME=javaaccessbridge$1.dll" \
|
||||
-D "JDK_INTERNAL_NAME=javaaccessbridge$1" \
|
||||
-D "JDK_FTYPE=0x02L", \
|
||||
OBJECT_DIR := $(SUPPORT_OUTPUTDIR)/native/$(MODULE)/libjavaaccessbridge$1, \
|
||||
DEBUG_SYMBOLS := true)
|
||||
|
||||
$$(BUILD_JAVAACCESSBRIDGE$1): $(SUPPORT_OUTPUTDIR)/native/java.desktop/libjawt/jawt.lib
|
||||
|
||||
TARGETS += $$(BUILD_JAVAACCESSBRIDGE$1)
|
||||
endef
|
||||
|
||||
define SetupWinDLL
|
||||
# Parameter 1 Suffix
|
||||
# Parameter 2 ACCESSBRIDGE_ARCH_ suffix
|
||||
$(call SetupNativeCompilation,BUILD_WINDOWSACCESSBRIDGE$1, \
|
||||
LIBRARY = windowsaccessbridge$1, \
|
||||
OUTPUT_DIR := $(INSTALL_LIBRARIES_HERE), \
|
||||
SRC := $(WIN_AB_SRCDIR), \
|
||||
OPTIMIZATION := LOW, \
|
||||
CFLAGS := $(filter-out -MD, $(CFLAGS_JDKLIB)) -MT $(ACCESSBRIDGE_CFLAGS) \
|
||||
$(addprefix -I,$(WIN_AB_SRCDIR)) \
|
||||
-I$(JDK_TOPDIR)/src/jdk.accessibility/windows/native/include/bridge \
|
||||
-DACCESSBRIDGE_ARCH_$2, \
|
||||
LDFLAGS := $(LDFLAGS_JDKLIB) kernel32.lib user32.lib gdi32.lib \
|
||||
winspool.lib comdlg32.lib advapi32.lib shell32.lib \
|
||||
ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib \
|
||||
-subsystem:windows \
|
||||
-def:$(ROOT_SRCDIR)/libwindowsaccessbridge/WinAccessBridge.DEF, \
|
||||
VERSIONINFO_RESOURCE := $(ROOT_SRCDIR)/common/AccessBridgeStatusWindow.rc, \
|
||||
RC_FLAGS := $(RC_FLAGS) \
|
||||
-D "JDK_FNAME=windowsaccessbridge$1.dll" \
|
||||
-D "JDK_INTERNAL_NAME=windowsaccessbridge$1" \
|
||||
-D "JDK_FTYPE=0x02L", \
|
||||
OBJECT_DIR := $(SUPPORT_OUTPUTDIR)/native/$(MODULE)/libwindowsaccessbridge$1, \
|
||||
DEBUG_SYMBOLS := true)
|
||||
|
||||
TARGETS += $$(BUILD_WINDOWSACCESSBRIDGE$1)
|
||||
|
||||
endef
|
||||
|
||||
define SetupAccessBridgeSysInfo
|
||||
|
||||
$(call SetupNativeCompilation,BUILD_ACCESSBRIDGESYSINFO, \
|
||||
LIBRARY = jabsysinfo, \
|
||||
OUTPUT_DIR := $(INSTALL_LIBRARIES_HERE), \
|
||||
SRC := $(SYSINFO_SRCDIR), \
|
||||
OPTIMIZATION := LOW, \
|
||||
CFLAGS := $(CFLAGS_JDKLIB) $(ACCESSBRIDGE_CFLAGS), \
|
||||
LDFLAGS := $(LDFLAGS_JDKLIB) \
|
||||
-subsystem:windows -machine:I386, \
|
||||
VERSIONINFO_RESOURCE := $(ROOT_SRCDIR)/common/AccessBridgeStatusWindow.rc, \
|
||||
RC_FLAGS := $(RC_FLAGS) \
|
||||
-D "JDK_FNAME=jabsysinfo.dll" \
|
||||
-D "JDK_INTERNAL_NAME=jabsysinfo" \
|
||||
-D "JDK_FTYPE=0x02L", \
|
||||
OBJECT_DIR := $(SUPPORT_OUTPUTDIR)/native/$(MODULE)/lib/libjabsysinfo, \
|
||||
DEBUG_SYMBOLS := true)
|
||||
|
||||
TARGETS += $$(BUILD_ACCESSBRIDGESYSINFO)
|
||||
|
||||
endef
|
||||
|
||||
ifeq ($(OPENJDK_TARGET_CPU_BITS), 32)
|
||||
$(eval $(call SetupAccessBridgeSysInfo))
|
||||
$(eval $(call SetupJavaDLL,-32,32))
|
||||
$(eval $(call SetupJavaDLL,,LEGACY))
|
||||
$(eval $(call SetupWinDLL,-32,32))
|
||||
$(eval $(call SetupWinDLL,,LEGACY))
|
||||
else
|
||||
$(eval $(call SetupJavaDLL,,64))
|
||||
$(eval $(call SetupWinDLL,-64,64))
|
||||
endif
|
||||
|
||||
endif
|
||||
|
||||
################################################################################
|
@ -32,7 +32,6 @@ $(eval $(call SetupNativeCompilation,BUILD_LIBATTACH, \
|
||||
LIBRARY := attach, \
|
||||
OUTPUT_DIR := $(INSTALL_LIBRARIES_HERE), \
|
||||
SRC := $(call FindSrcDirsForLib, jdk.attach, attach), \
|
||||
LANG := C, \
|
||||
OPTIMIZATION := LOW, \
|
||||
CFLAGS := $(CFLAGS_JDKLIB) $(CFLAGS_WARNINGS_ARE_ERRORS) \
|
||||
-I$(SUPPORT_OUTPUTDIR)/headers/jdk.attach \
|
||||
|
@ -47,7 +47,7 @@ ifeq ($(ENABLE_INTREE_EC), yes)
|
||||
LIBRARY := sunec, \
|
||||
OUTPUT_DIR := $(INSTALL_LIBRARIES_HERE), \
|
||||
SRC := $(LIBSUNEC_SRC), \
|
||||
LANG := C++, \
|
||||
TOOLCHAIN := TOOLCHAIN_LINK_CXX, \
|
||||
OPTIMIZATION := LOW, \
|
||||
CFLAGS := $(filter-out $(ECC_JNI_SOLSPARC_FILTER), $(CFLAGS_JDKLIB)) \
|
||||
$(BUILD_LIBSUNEC_FLAGS) \
|
||||
|
@ -35,7 +35,6 @@ ifeq ($(OPENJDK_TARGET_OS), windows)
|
||||
LIBRARY := sunmscapi, \
|
||||
OUTPUT_DIR := $(INSTALL_LIBRARIES_HERE), \
|
||||
SRC := $(LIBSUNMSCAPI_SRC), \
|
||||
LANG := C++, \
|
||||
OPTIMIZATION := LOW, \
|
||||
CFLAGS := $(CFLAGS_JDKLIB) \
|
||||
-I$(LIBSUNMSCAPI_SRC), \
|
||||
|
@ -34,7 +34,6 @@ $(eval $(call SetupNativeCompilation,BUILD_LIBJ2PKCS11, \
|
||||
LIBRARY := j2pkcs11, \
|
||||
OUTPUT_DIR := $(INSTALL_LIBRARIES_HERE), \
|
||||
SRC := $(LIBJ2PKCS11_SRC), \
|
||||
LANG := C, \
|
||||
OPTIMIZATION := LOW, \
|
||||
CFLAGS := $(CFLAGS_JDKLIB) $(addprefix -I, $(LIBJ2PKCS11_SRC)) \
|
||||
$(LIBJAVA_HEADER_FLAGS) \
|
||||
|
@ -35,7 +35,6 @@ ifeq ($(OPENJDK_TARGET_OS), solaris)
|
||||
LIBRARY := j2ucrypto, \
|
||||
OUTPUT_DIR := $(INSTALL_LIBRARIES_HERE), \
|
||||
SRC := $(LIBJ2UCRYPTO_SRC), \
|
||||
LANG := C, \
|
||||
OPTIMIZATION := LOW, \
|
||||
CFLAGS := $(CFLAGS_JDKLIB) \
|
||||
$(addprefix -I, $(LIBJ2UCRYPTO_SRC)), \
|
||||
|
@ -35,7 +35,6 @@ ifeq ($(OPENJDK_TARGET_OS), macosx)
|
||||
LIBRARY := AppleScriptEngine, \
|
||||
OUTPUT_DIR := $(INSTALL_LIBRARIES_HERE), \
|
||||
SRC := $(LIBAPPLESCRIPTENGINE_SRC), \
|
||||
LANG := C, \
|
||||
OPTIMIZATION := LOW, \
|
||||
CFLAGS := $(CFLAGS_JDKLIB) \
|
||||
-I$(LIBAPPLESCRIPTENGINE_SRC) \
|
||||
@ -68,7 +67,6 @@ ifeq ($(OPENJDK_TARGET_OS), macosx)
|
||||
LIBRARY := osx, \
|
||||
OUTPUT_DIR := $(INSTALL_LIBRARIES_HERE), \
|
||||
SRC := $(LIBOSX_DIRS), \
|
||||
LANG := C, \
|
||||
OPTIMIZATION := LOW, \
|
||||
CFLAGS := $(CFLAGS_JDKLIB) \
|
||||
$(LIBOSX_CFLAGS), \
|
||||
|
@ -45,7 +45,6 @@ $(eval $(call SetupNativeCompilation,BUILD_LIBHPROF, \
|
||||
LIBRARY := hprof, \
|
||||
OUTPUT_DIR := $(INSTALL_LIBRARIES_HERE), \
|
||||
SRC := $(BUILD_LIBHPROF_SRC), \
|
||||
LANG := C, \
|
||||
OPTIMIZATION := $(LIBHPROF_OPTIMIZATION), \
|
||||
CFLAGS := $(CFLAGS_JDKLIB) $(CFLAGS_WARNINGS_ARE_ERRORS) \
|
||||
$(BUILD_LIBHPROF_CFLAGS), \
|
||||
@ -75,7 +74,6 @@ $(eval $(call SetupNativeCompilation,BUILD_LIBJAVA_CRW_DEMO, \
|
||||
LIBRARY := java_crw_demo, \
|
||||
OUTPUT_DIR := $(INSTALL_LIBRARIES_HERE), \
|
||||
SRC := $(LIBJAVA_CRW_DEMO_SRC), \
|
||||
LANG := C, \
|
||||
OPTIMIZATION := LOW, \
|
||||
CFLAGS := $(CFLAGS_JDKLIB) $(CFLAGS_WARNINGS_ARE_ERRORS) \
|
||||
$(addprefix -I, $(LIBJAVA_CRW_DEMO_SRC)), \
|
||||
|
@ -43,7 +43,6 @@ ifeq ($(OPENJDK_TARGET_OS), windows)
|
||||
LIBRARY := dt_shmem, \
|
||||
OUTPUT_DIR := $(INSTALL_LIBRARIES_HERE), \
|
||||
SRC := $(LIBDT_SHMEM_SRC), \
|
||||
LANG := C, \
|
||||
OPTIMIZATION := LOW, \
|
||||
CFLAGS := $(CFLAGS_JDKLIB) $(CFLAGS_WARNINGS_ARE_ERRORS) -DUSE_MMAP \
|
||||
$(LIBDT_SHMEM_CPPFLAGS), \
|
||||
|
@ -40,7 +40,6 @@ $(eval $(call SetupNativeCompilation,BUILD_LIBDT_SOCKET, \
|
||||
LIBRARY := dt_socket, \
|
||||
OUTPUT_DIR := $(INSTALL_LIBRARIES_HERE), \
|
||||
SRC := $(LIBDT_SOCKET_SRC), \
|
||||
LANG := C, \
|
||||
OPTIMIZATION := LOW, \
|
||||
CFLAGS := $(CFLAGS_JDKLIB) $(CFLAGS_CFLAGS_WARNINGS_ARE_ERRORS) -DUSE_MMAP \
|
||||
$(LIBDT_SOCKET_CPPFLAGS), \
|
||||
@ -77,7 +76,6 @@ $(eval $(call SetupNativeCompilation,BUILD_LIBJDWP, \
|
||||
LIBRARY := jdwp, \
|
||||
OUTPUT_DIR := $(INSTALL_LIBRARIES_HERE), \
|
||||
SRC := $(LIBJDWP_SRC), \
|
||||
LANG := C, \
|
||||
OPTIMIZATION := LOW, \
|
||||
CFLAGS := $(CFLAGS_JDKLIB) $(CFLAGS_WARNINGS_ARE_ERRORS) -DJDWP_LOGGING \
|
||||
$(LIBJDWP_CPPFLAGS) \
|
||||
|
@ -32,7 +32,7 @@ $(eval $(call SetupNativeCompilation,BUILD_LIBUNPACK, \
|
||||
OUTPUT_DIR := $(INSTALL_LIBRARIES_HERE), \
|
||||
SRC := $(JDK_TOPDIR)/src/jdk.pack200/share/native/libunpack \
|
||||
$(JDK_TOPDIR)/src/jdk.pack200/share/native/common-unpack, \
|
||||
LANG := C++, \
|
||||
TOOLCHAIN := TOOLCHAIN_LINK_CXX, \
|
||||
OPTIMIZATION := LOW, \
|
||||
CFLAGS := $(CXXFLAGS_JDKLIB) \
|
||||
-DNO_ZLIB -DUNPACK_JNI -DFULL \
|
||||
|
@ -41,7 +41,6 @@ ifeq ($(OPENJDK_TARGET_OS_TYPE), unix)
|
||||
LIBRARY := sctp, \
|
||||
OUTPUT_DIR := $(INSTALL_LIBRARIES_HERE), \
|
||||
SRC := $(JDK_TOPDIR)/src/jdk.sctp/$(OPENJDK_TARGET_OS_TYPE)/native/libsctp, \
|
||||
LANG := C, \
|
||||
OPTIMIZATION := LOW, \
|
||||
CFLAGS := $(CFLAGS_JDKLIB) \
|
||||
-I $(JDK_TOPDIR)/src/java.base/$(OPENJDK_TARGET_OS_TYPE)/native/libnio/ch \
|
||||
|
@ -42,7 +42,6 @@ $(eval $(call SetupNativeCompilation,BUILD_LIBJAAS, \
|
||||
LIBRARY := $(LIBJAAS_NAME), \
|
||||
OUTPUT_DIR := $(INSTALL_LIBRARIES_HERE), \
|
||||
SRC := $(call FindSrcDirsForLib, jdk.security.auth, jaas), \
|
||||
LANG := C, \
|
||||
OPTIMIZATION := LOW, \
|
||||
CFLAGS := $(CFLAGS_JDKLIB) -I$(SUPPORT_OUTPUTDIR)/headers/jdk.security.auth, \
|
||||
MAPFILE := $(LIBJAAS_MAPFILE), \
|
||||
|
@ -29,7 +29,6 @@ $(eval $(call SetupNativeCompilation,BUILD_LIBNET, \
|
||||
LIBRARY := net, \
|
||||
OUTPUT_DIR := $(INSTALL_LIBRARIES_HERE), \
|
||||
SRC := $(LIBNET_SRC_DIRS), \
|
||||
LANG := C, \
|
||||
OPTIMIZATION := LOW, \
|
||||
CFLAGS := $(CFLAGS_JDKLIB) -I$(SUPPORT_OUTPUTDIR)/headers/java.base \
|
||||
$(LIBJAVA_HEADER_FLAGS) $(addprefix -I, $(LIBNET_SRC_DIRS)), \
|
||||
|
@ -65,7 +65,6 @@ $(eval $(call SetupNativeCompilation,BUILD_LIBNIO, \
|
||||
OUTPUT_DIR := $(INSTALL_LIBRARIES_HERE), \
|
||||
SRC := $(BUILD_LIBNIO_SRC), \
|
||||
EXCLUDE_FILES := $(BUILD_LIBNIO_EXFILES), \
|
||||
LANG := C, \
|
||||
OPTIMIZATION := HIGH, \
|
||||
CFLAGS := $(CFLAGS_JDKLIB) \
|
||||
$(BUILD_LIBNIO_CFLAGS), \
|
||||
|
@ -33,7 +33,6 @@ ifeq ($(OPENJDK_TARGET_OS), macosx)
|
||||
LIBRARY := osxapp, \
|
||||
OUTPUT_DIR := $(INSTALL_LIBRARIES_HERE), \
|
||||
SRC := $(LIBOSXAPP_SRC), \
|
||||
LANG := C, \
|
||||
OPTIMIZATION := LOW, \
|
||||
CFLAGS := $(CFLAGS_JDKLIB) \
|
||||
$(addprefix -I, $(LIBOSXAPP_SRC)) \
|
||||
|
@ -35,8 +35,6 @@ LIBJSOUND_CFLAGS := \
|
||||
|
||||
LIBJSOUND_SRC_FILES := Utilities.c Platform.c
|
||||
|
||||
LIBJSOUND_LANG := C
|
||||
|
||||
EXTRA_SOUND_JNI_LIBS :=
|
||||
|
||||
LIBJSOUND_MIDIFILES := \
|
||||
@ -81,7 +79,7 @@ ifeq ($(OPENJDK_TARGET_OS), aix)
|
||||
endif # OPENJDK_TARGET_OS aix
|
||||
|
||||
ifeq ($(OPENJDK_TARGET_OS), macosx)
|
||||
LIBJSOUND_LANG := C++
|
||||
LIBJSOUND_TOOLCHAIN := TOOLCHAIN_LINK_CXX
|
||||
LIBJSOUND_CFLAGS += -DX_PLATFORM=X_MACOSX \
|
||||
-DUSE_PORTS=TRUE \
|
||||
-DUSE_DAUDIO=TRUE \
|
||||
@ -124,7 +122,7 @@ $(eval $(call SetupNativeCompilation,BUILD_LIBJSOUND, \
|
||||
OUTPUT_DIR := $(INSTALL_LIBRARIES_HERE), \
|
||||
SRC := $(LIBJSOUND_SRC_DIRS), \
|
||||
INCLUDE_FILES := $(LIBJSOUND_SRC_FILES), \
|
||||
LANG := $(LIBJSOUND_LANG), \
|
||||
TOOLCHAIN := $(LIBJSOUND_TOOLCHAIN), \
|
||||
OPTIMIZATION := LOW, \
|
||||
CFLAGS := $(CFLAGS_JDKLIB) \
|
||||
$(LIBJSOUND_CFLAGS), \
|
||||
@ -169,7 +167,6 @@ ifneq ($(filter jsoundalsa, $(EXTRA_SOUND_JNI_LIBS)), )
|
||||
PLATFORM_API_LinuxOS_ALSA_MidiOut.c \
|
||||
PLATFORM_API_LinuxOS_ALSA_MidiUtils.c \
|
||||
PLATFORM_API_LinuxOS_ALSA_Ports.c, \
|
||||
LANG := C, \
|
||||
OPTIMIZATION := LOW, \
|
||||
CFLAGS := $(CFLAGS_JDKLIB) $(ALSA_CFLAGS) \
|
||||
$(LIBJSOUND_CFLAGS) \
|
||||
@ -201,7 +198,6 @@ ifneq ($(filter jsoundds, $(EXTRA_SOUND_JNI_LIBS)), )
|
||||
SRC := $(LIBJSOUND_SRC_DIRS), \
|
||||
INCLUDE_FILES := Utilities.c $(LIBJSOUND_DAUDIOFILES) \
|
||||
PLATFORM_API_WinOS_DirectSound.cpp, \
|
||||
LANG := C++, \
|
||||
OPTIMIZATION := LOW, \
|
||||
CFLAGS := $(CFLAGS_JDKLIB) \
|
||||
$(LIBJSOUND_CFLAGS) \
|
||||
|
@ -34,6 +34,14 @@ SUNWprivate_1.1 {
|
||||
_environ;
|
||||
__environ_lock;
|
||||
|
||||
# These are needed by the c runtime in SS12u4
|
||||
___Argv;
|
||||
__xargv;
|
||||
__xargc;
|
||||
_start;
|
||||
__longdouble_used;
|
||||
_lib_version;
|
||||
|
||||
local:
|
||||
*;
|
||||
};
|
||||
|
@ -0,0 +1,41 @@
|
||||
#
|
||||
# Copyright (c) 2011, 2013, Oracle and/or its affiliates. All rights reserved.
|
||||
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
#
|
||||
# This code is free software; you can redistribute it and/or modify it
|
||||
# under the terms of the GNU General Public License version 2 only, as
|
||||
# published by the Free Software Foundation. Oracle designates this
|
||||
# particular file as subject to the "Classpath" exception as provided
|
||||
# by Oracle in the LICENSE file that accompanied this code.
|
||||
#
|
||||
# This code is distributed in the hope that it will be useful, but WITHOUT
|
||||
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
# version 2 for more details (a copy is included in the LICENSE file that
|
||||
# accompanied this code).
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License version
|
||||
# 2 along with this work; if not, write to the Free Software Foundation,
|
||||
# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
#
|
||||
# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
|
||||
# or visit www.oracle.com if you need additional information or have any
|
||||
# questions.
|
||||
#
|
||||
|
||||
# Define library interface.
|
||||
|
||||
SUNWprivate_1.1 {
|
||||
global:
|
||||
# These are needed by the c runtime in SS12u4
|
||||
_environ;
|
||||
__environ_lock;
|
||||
___Argv;
|
||||
__xargv;
|
||||
__xargc;
|
||||
_start;
|
||||
_lib_version;
|
||||
|
||||
local:
|
||||
*;
|
||||
};
|
@ -0,0 +1,42 @@
|
||||
#
|
||||
# Copyright (c) 2011, 2013, Oracle and/or its affiliates. All rights reserved.
|
||||
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
#
|
||||
# This code is free software; you can redistribute it and/or modify it
|
||||
# under the terms of the GNU General Public License version 2 only, as
|
||||
# published by the Free Software Foundation. Oracle designates this
|
||||
# particular file as subject to the "Classpath" exception as provided
|
||||
# by Oracle in the LICENSE file that accompanied this code.
|
||||
#
|
||||
# This code is distributed in the hope that it will be useful, but WITHOUT
|
||||
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
# version 2 for more details (a copy is included in the LICENSE file that
|
||||
# accompanied this code).
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License version
|
||||
# 2 along with this work; if not, write to the Free Software Foundation,
|
||||
# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
#
|
||||
# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
|
||||
# or visit www.oracle.com if you need additional information or have any
|
||||
# questions.
|
||||
#
|
||||
|
||||
# Define library interface.
|
||||
|
||||
SUNWprivate_1.1 {
|
||||
global:
|
||||
# These are needed by the c runtime in SS12u4
|
||||
_environ;
|
||||
__environ_lock;
|
||||
___Argv;
|
||||
__xargv;
|
||||
__xargc;
|
||||
_start;
|
||||
__longdouble_used;
|
||||
_lib_version;
|
||||
|
||||
local:
|
||||
*;
|
||||
};
|
@ -4,7 +4,7 @@ java.corba
|
||||
java.transaction
|
||||
java.xml.bind
|
||||
java.xml.ws
|
||||
jdk.accessbridge
|
||||
jdk.accessibility
|
||||
jdk.crypto.ec
|
||||
jdk.crypto.mscapi
|
||||
jdk.crypto.pkcs11
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2003, 2014, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2003, 2015, 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
|
||||
@ -350,7 +350,7 @@ public final class RSACipher extends CipherSpi {
|
||||
switch (mode) {
|
||||
case MODE_SIGN:
|
||||
data = padding.pad(buffer, 0, bufOfs);
|
||||
return RSACore.rsa(data, privateKey);
|
||||
return RSACore.rsa(data, privateKey, true);
|
||||
case MODE_VERIFY:
|
||||
byte[] verifyBuffer = RSACore.convert(buffer, 0, bufOfs);
|
||||
data = RSACore.rsa(verifyBuffer, publicKey);
|
||||
@ -360,7 +360,7 @@ public final class RSACipher extends CipherSpi {
|
||||
return RSACore.rsa(data, publicKey);
|
||||
case MODE_DECRYPT:
|
||||
byte[] decryptBuffer = RSACore.convert(buffer, 0, bufOfs);
|
||||
data = RSACore.rsa(decryptBuffer, privateKey);
|
||||
data = RSACore.rsa(decryptBuffer, privateKey, false);
|
||||
return padding.unpad(data);
|
||||
default:
|
||||
throw new AssertionError("Internal error");
|
||||
|
@ -28,6 +28,7 @@ package java.lang.ref;
|
||||
import java.security.PrivilegedAction;
|
||||
import java.security.AccessController;
|
||||
import sun.misc.JavaLangAccess;
|
||||
import sun.misc.ManagedLocalsThread;
|
||||
import sun.misc.SharedSecrets;
|
||||
import sun.misc.VM;
|
||||
|
||||
@ -126,7 +127,7 @@ final class Finalizer extends FinalReference<Object> { /* Package-private; must
|
||||
for (ThreadGroup tgn = tg;
|
||||
tgn != null;
|
||||
tg = tgn, tgn = tg.getParent());
|
||||
Thread sft = new Thread(tg, proc, "Secondary finalizer");
|
||||
Thread sft = new ManagedLocalsThread(tg, proc, "Secondary finalizer");
|
||||
sft.start();
|
||||
try {
|
||||
sft.join();
|
||||
@ -185,7 +186,7 @@ final class Finalizer extends FinalReference<Object> { /* Package-private; must
|
||||
}}});
|
||||
}
|
||||
|
||||
private static class FinalizerThread extends Thread {
|
||||
private static class FinalizerThread extends ManagedLocalsThread {
|
||||
private volatile boolean running;
|
||||
FinalizerThread(ThreadGroup g) {
|
||||
super(g, "Finalizer");
|
||||
|
@ -27,6 +27,7 @@ package java.lang.ref;
|
||||
|
||||
import sun.misc.Cleaner;
|
||||
import sun.misc.JavaLangRefAccess;
|
||||
import sun.misc.ManagedLocalsThread;
|
||||
import sun.misc.SharedSecrets;
|
||||
|
||||
/**
|
||||
@ -126,7 +127,7 @@ public abstract class Reference<T> {
|
||||
|
||||
/* High-priority thread to enqueue pending References
|
||||
*/
|
||||
private static class ReferenceHandler extends Thread {
|
||||
private static class ReferenceHandler extends ManagedLocalsThread {
|
||||
|
||||
private static void ensureClassInitialized(Class<?> clazz) {
|
||||
try {
|
||||
|
@ -70,6 +70,7 @@ import static java.time.temporal.ChronoField.NANO_OF_SECOND;
|
||||
import static java.time.temporal.ChronoField.OFFSET_SECONDS;
|
||||
import static java.time.temporal.ChronoField.SECOND_OF_MINUTE;
|
||||
import static java.time.temporal.ChronoField.YEAR;
|
||||
import static java.time.temporal.ChronoField.ERA;
|
||||
|
||||
import java.lang.ref.SoftReference;
|
||||
import java.math.BigDecimal;
|
||||
@ -84,6 +85,7 @@ import java.time.ZoneId;
|
||||
import java.time.ZoneOffset;
|
||||
import java.time.chrono.ChronoLocalDate;
|
||||
import java.time.chrono.Chronology;
|
||||
import java.time.chrono.Era;
|
||||
import java.time.chrono.IsoChronology;
|
||||
import java.time.format.DateTimeTextProvider.LocaleStore;
|
||||
import java.time.temporal.ChronoField;
|
||||
@ -3131,6 +3133,16 @@ public final class DateTimeFormatterBuilder {
|
||||
return context.setParsedField(field, entry.getValue(), position, position + itText.length());
|
||||
}
|
||||
}
|
||||
if (field == ERA && !context.isStrict()) {
|
||||
// parse the possible era name from era.toString()
|
||||
List<Era> eras = chrono.eras();
|
||||
for (Era era : eras) {
|
||||
String name = era.toString();
|
||||
if (context.subSequenceEquals(name, 0, parseText, position, name.length())) {
|
||||
return context.setParsedField(field, era.getValue(), position, position + name.length());
|
||||
}
|
||||
}
|
||||
}
|
||||
if (context.isStrict()) {
|
||||
return ~position;
|
||||
}
|
||||
|
@ -82,8 +82,7 @@ public class GC {
|
||||
*/
|
||||
public static native long maxObjectInspectionAge();
|
||||
|
||||
|
||||
private static class Daemon extends Thread {
|
||||
private static class Daemon extends ManagedLocalsThread {
|
||||
|
||||
public void run() {
|
||||
for (;;) {
|
||||
|
@ -26,32 +26,37 @@
|
||||
package sun.misc;
|
||||
|
||||
import java.security.AccessControlContext;
|
||||
import java.security.AccessController;
|
||||
import java.security.ProtectionDomain;
|
||||
import java.security.PrivilegedAction;
|
||||
import java.util.concurrent.atomic.AtomicInteger;
|
||||
|
||||
/**
|
||||
* A thread that has no permissions, is not a member of any user-defined
|
||||
* ThreadGroup and supports the ability to erase ThreadLocals.
|
||||
*
|
||||
* @implNote Based on the implementation of InnocuousForkJoinWorkerThread.
|
||||
*/
|
||||
public final class InnocuousThread extends Thread {
|
||||
public final class InnocuousThread extends ManagedLocalsThread {
|
||||
private static final Unsafe UNSAFE;
|
||||
private static final ThreadGroup THREADGROUP;
|
||||
private static final ThreadGroup INNOCUOUSTHREADGROUP;
|
||||
private static final AccessControlContext ACC;
|
||||
private static final long THREADLOCALS;
|
||||
private static final long INHERITABLETHREADLOCALS;
|
||||
private static final long INHERITEDACCESSCONTROLCONTEXT;
|
||||
private static final long CONTEXTCLASSLOADER;
|
||||
|
||||
private static final AtomicInteger threadNumber = new AtomicInteger(1);
|
||||
|
||||
public InnocuousThread(Runnable target) {
|
||||
super(THREADGROUP, target, "anInnocuousThread");
|
||||
UNSAFE.putOrderedObject(this, INHERITEDACCESSCONTROLCONTEXT, ACC);
|
||||
eraseThreadLocals();
|
||||
this(INNOCUOUSTHREADGROUP, target,
|
||||
"InnocuousThread-" + threadNumber.getAndIncrement());
|
||||
}
|
||||
|
||||
@Override
|
||||
public ClassLoader getContextClassLoader() {
|
||||
// always report system class loader
|
||||
return ClassLoader.getSystemClassLoader();
|
||||
public InnocuousThread(Runnable target, String name) {
|
||||
this(INNOCUOUSTHREADGROUP, target, name);
|
||||
}
|
||||
|
||||
public InnocuousThread(ThreadGroup group, Runnable target, String name) {
|
||||
super(group, target, name);
|
||||
UNSAFE.putOrderedObject(this, INHERITEDACCESSCONTROLCONTEXT, ACC);
|
||||
UNSAFE.putOrderedObject(this, CONTEXTCLASSLOADER, ClassLoader.getSystemClassLoader());
|
||||
}
|
||||
|
||||
@Override
|
||||
@ -61,7 +66,11 @@ public final class InnocuousThread extends Thread {
|
||||
|
||||
@Override
|
||||
public void setContextClassLoader(ClassLoader cl) {
|
||||
throw new SecurityException("setContextClassLoader");
|
||||
// Allow clearing of the TCCL to remove the reference to the system classloader.
|
||||
if (cl == null)
|
||||
super.setContextClassLoader(null);
|
||||
else
|
||||
throw new SecurityException("setContextClassLoader");
|
||||
}
|
||||
|
||||
// ensure run method is run only once
|
||||
@ -75,14 +84,6 @@ public final class InnocuousThread extends Thread {
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Drops all thread locals (and inherited thread locals).
|
||||
*/
|
||||
public void eraseThreadLocals() {
|
||||
UNSAFE.putObject(this, THREADLOCALS, null);
|
||||
UNSAFE.putObject(this, INHERITABLETHREADLOCALS, null);
|
||||
}
|
||||
|
||||
// Use Unsafe to access Thread group and ThreadGroup parent fields
|
||||
static {
|
||||
try {
|
||||
@ -95,12 +96,10 @@ public final class InnocuousThread extends Thread {
|
||||
Class<?> tk = Thread.class;
|
||||
Class<?> gk = ThreadGroup.class;
|
||||
|
||||
THREADLOCALS = UNSAFE.objectFieldOffset
|
||||
(tk.getDeclaredField("threadLocals"));
|
||||
INHERITABLETHREADLOCALS = UNSAFE.objectFieldOffset
|
||||
(tk.getDeclaredField("inheritableThreadLocals"));
|
||||
INHERITEDACCESSCONTROLCONTEXT = UNSAFE.objectFieldOffset
|
||||
(tk.getDeclaredField("inheritedAccessControlContext"));
|
||||
CONTEXTCLASSLOADER = UNSAFE.objectFieldOffset
|
||||
(tk.getDeclaredField("contextClassLoader"));
|
||||
|
||||
long tg = UNSAFE.objectFieldOffset(tk.getDeclaredField("group"));
|
||||
long gp = UNSAFE.objectFieldOffset(gk.getDeclaredField("parent"));
|
||||
@ -113,7 +112,10 @@ public final class InnocuousThread extends Thread {
|
||||
break;
|
||||
group = parent;
|
||||
}
|
||||
THREADGROUP = new ThreadGroup(group, "InnocuousThreadGroup");
|
||||
final ThreadGroup root = group;
|
||||
INNOCUOUSTHREADGROUP = AccessController.doPrivileged(
|
||||
(PrivilegedAction<ThreadGroup>) () ->
|
||||
{ return new ThreadGroup(root, "InnocuousThreadGroup"); });
|
||||
} catch (Exception e) {
|
||||
throw new Error(e);
|
||||
}
|
||||
|
@ -0,0 +1,87 @@
|
||||
/*
|
||||
* Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
* under the terms of the GNU General Public License version 2 only, as
|
||||
* published by the Free Software Foundation. Oracle designates this
|
||||
* particular file as subject to the "Classpath" exception as provided
|
||||
* by Oracle in the LICENSE file that accompanied this code.
|
||||
*
|
||||
* This code is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
* version 2 for more details (a copy is included in the LICENSE file that
|
||||
* accompanied this code).
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License version
|
||||
* 2 along with this work; if not, write to the Free Software Foundation,
|
||||
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
*
|
||||
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
|
||||
* or visit www.oracle.com if you need additional information or have any
|
||||
* questions.
|
||||
*/
|
||||
|
||||
package sun.misc;
|
||||
|
||||
/**
|
||||
* A thread that has it's thread locals, and inheritable thread
|
||||
* locals erased on construction.
|
||||
*/
|
||||
public class ManagedLocalsThread extends Thread {
|
||||
private static final Unsafe UNSAFE;
|
||||
private static final long THREAD_LOCALS;
|
||||
private static final long INHERITABLE_THREAD_LOCALS;
|
||||
|
||||
public ManagedLocalsThread() {
|
||||
eraseThreadLocals();
|
||||
}
|
||||
|
||||
public ManagedLocalsThread(Runnable target) {
|
||||
super(target);
|
||||
eraseThreadLocals();
|
||||
}
|
||||
|
||||
public ManagedLocalsThread(String name) {
|
||||
super(name);
|
||||
eraseThreadLocals();
|
||||
}
|
||||
|
||||
public ManagedLocalsThread(Runnable target, String name) {
|
||||
super(target, name);
|
||||
eraseThreadLocals();
|
||||
}
|
||||
|
||||
public ManagedLocalsThread(ThreadGroup group, String name) {
|
||||
super(group, name);
|
||||
eraseThreadLocals();
|
||||
}
|
||||
|
||||
public ManagedLocalsThread(ThreadGroup group, Runnable target, String name) {
|
||||
super(group, target, name);
|
||||
eraseThreadLocals();
|
||||
}
|
||||
|
||||
/**
|
||||
* Drops all thread locals (and inherited thread locals).
|
||||
*/
|
||||
public final void eraseThreadLocals() {
|
||||
UNSAFE.putObject(this, THREAD_LOCALS, null);
|
||||
UNSAFE.putObject(this, INHERITABLE_THREAD_LOCALS, null);
|
||||
}
|
||||
|
||||
static {
|
||||
UNSAFE = Unsafe.getUnsafe();
|
||||
Class<?> t = Thread.class;
|
||||
try {
|
||||
THREAD_LOCALS = UNSAFE.objectFieldOffset
|
||||
(t.getDeclaredField("threadLocals"));
|
||||
INHERITABLE_THREAD_LOCALS = UNSAFE.objectFieldOffset
|
||||
(t.getDeclaredField("inheritableThreadLocals"));
|
||||
} catch (Exception e) {
|
||||
throw new Error(e);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -77,7 +77,7 @@ public class RequestProcessor implements Runnable {
|
||||
*/
|
||||
public static synchronized void startProcessing() {
|
||||
if (dispatcher == null) {
|
||||
dispatcher = new Thread(new RequestProcessor(), "Request Processor");
|
||||
dispatcher = new ManagedLocalsThread(new RequestProcessor(), "Request Processor");
|
||||
dispatcher.setPriority(Thread.NORM_PRIORITY + 2);
|
||||
dispatcher.start();
|
||||
}
|
||||
|
@ -213,7 +213,7 @@ public final class Signal {
|
||||
}
|
||||
};
|
||||
if (handler != null) {
|
||||
new Thread(runnable, sig + " handler").start();
|
||||
new ManagedLocalsThread(runnable, sig + " handler").start();
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -27,6 +27,7 @@ package sun.net;
|
||||
import java.io.*;
|
||||
import java.net.Socket;
|
||||
import java.net.ServerSocket;
|
||||
import sun.misc.ManagedLocalsThread;
|
||||
|
||||
/**
|
||||
* This is the base class for network servers. To define a new type
|
||||
@ -72,7 +73,7 @@ public class NetworkServer implements Runnable, Cloneable {
|
||||
NetworkServer n = (NetworkServer)clone();
|
||||
n.serverSocket = null;
|
||||
n.clientSocket = ns;
|
||||
new Thread(n).start();
|
||||
new ManagedLocalsThread(n).start();
|
||||
} catch(Exception e) {
|
||||
System.out.print("Server failure\n");
|
||||
e.printStackTrace();
|
||||
@ -107,7 +108,7 @@ public class NetworkServer implements Runnable, Cloneable {
|
||||
for each new connection. */
|
||||
final public void startServer(int port) throws IOException {
|
||||
serverSocket = new ServerSocket(port, 50);
|
||||
serverInstance = new Thread(this);
|
||||
serverInstance = new ManagedLocalsThread(this);
|
||||
serverInstance.start();
|
||||
}
|
||||
|
||||
|
@ -27,8 +27,9 @@ package sun.net.www;
|
||||
import java.net.URL;
|
||||
import java.io.*;
|
||||
import java.util.StringTokenizer;
|
||||
import sun.misc.ManagedLocalsThread;
|
||||
|
||||
class MimeLauncher extends Thread {
|
||||
class MimeLauncher extends ManagedLocalsThread {
|
||||
java.net.URLConnection uc;
|
||||
MimeEntry m;
|
||||
String genericTempFileTemplate;
|
||||
|
@ -30,6 +30,7 @@ import java.io.NotSerializableException;
|
||||
import java.util.ArrayList;
|
||||
import java.util.HashMap;
|
||||
import java.net.URL;
|
||||
import sun.misc.InnocuousThread;
|
||||
|
||||
/**
|
||||
* A class that implements a cache of idle Http connections for keep-alive
|
||||
@ -95,15 +96,7 @@ public class KeepAliveCache
|
||||
java.security.AccessController.doPrivileged(
|
||||
new java.security.PrivilegedAction<Void>() {
|
||||
public Void run() {
|
||||
// We want to create the Keep-Alive-Timer in the
|
||||
// system threadgroup
|
||||
ThreadGroup grp = Thread.currentThread().getThreadGroup();
|
||||
ThreadGroup parent = null;
|
||||
while ((parent = grp.getParent()) != null) {
|
||||
grp = parent;
|
||||
}
|
||||
|
||||
keepAliveTimer = new Thread(grp, cache, "Keep-Alive-Timer");
|
||||
keepAliveTimer = new InnocuousThread(cache, "Keep-Alive-Timer");
|
||||
keepAliveTimer.setDaemon(true);
|
||||
keepAliveTimer.setPriority(Thread.MAX_PRIORITY - 2);
|
||||
// Set the context class loader to null in order to avoid
|
||||
|
@ -26,6 +26,8 @@
|
||||
package sun.net.www.http;
|
||||
|
||||
import java.io.*;
|
||||
|
||||
import sun.misc.InnocuousThread;
|
||||
import sun.net.ProgressSource;
|
||||
import sun.net.www.MeteredStream;
|
||||
|
||||
@ -171,15 +173,7 @@ class KeepAliveStream extends MeteredStream implements Hurryable {
|
||||
java.security.AccessController.doPrivileged(
|
||||
new java.security.PrivilegedAction<Void>() {
|
||||
public Void run() {
|
||||
// We want to create the Keep-Alive-SocketCleaner in the
|
||||
// system threadgroup
|
||||
ThreadGroup grp = Thread.currentThread().getThreadGroup();
|
||||
ThreadGroup parent = null;
|
||||
while ((parent = grp.getParent()) != null) {
|
||||
grp = parent;
|
||||
}
|
||||
|
||||
cleanerThread = new Thread(grp, queue, "Keep-Alive-SocketCleaner");
|
||||
cleanerThread = new InnocuousThread(queue, "Keep-Alive-SocketCleaner");
|
||||
cleanerThread.setDaemon(true);
|
||||
cleanerThread.setPriority(Thread.MAX_PRIORITY - 2);
|
||||
// Set the context class loader to null in order to avoid
|
||||
|
@ -30,6 +30,7 @@ import java.security.AccessController;
|
||||
import java.security.PrivilegedAction;
|
||||
import java.io.IOException;
|
||||
import java.util.*;
|
||||
import sun.misc.ManagedLocalsThread;
|
||||
|
||||
/**
|
||||
* Base implementation of background poller thread used in watch service
|
||||
@ -59,7 +60,7 @@ abstract class AbstractPoller implements Runnable {
|
||||
AccessController.doPrivileged(new PrivilegedAction<Object>() {
|
||||
@Override
|
||||
public Object run() {
|
||||
Thread thr = new Thread(thisRunnable);
|
||||
Thread thr = new ManagedLocalsThread(thisRunnable);
|
||||
thr.setDaemon(true);
|
||||
thr.start();
|
||||
return null;
|
||||
|
@ -25,6 +25,7 @@
|
||||
|
||||
package sun.nio.fs;
|
||||
|
||||
import sun.misc.ManagedLocalsThread;
|
||||
import sun.misc.Unsafe;
|
||||
import java.util.concurrent.ExecutionException;
|
||||
|
||||
@ -117,7 +118,7 @@ abstract class Cancellable implements Runnable {
|
||||
* thread by writing into the memory location that it polls cooperatively.
|
||||
*/
|
||||
static void runInterruptibly(Cancellable task) throws ExecutionException {
|
||||
Thread t = new Thread(task);
|
||||
Thread t = new ManagedLocalsThread(task);
|
||||
t.start();
|
||||
boolean cancelledByInterrupt = false;
|
||||
while (t.isAlive()) {
|
||||
|
@ -35,6 +35,7 @@ import java.io.IOException;
|
||||
import java.util.*;
|
||||
import java.util.concurrent.*;
|
||||
import com.sun.nio.file.SensitivityWatchEventModifier;
|
||||
import sun.misc.ManagedLocalsThread;
|
||||
|
||||
/**
|
||||
* Simple WatchService implementation that uses periodic tasks to poll
|
||||
@ -58,7 +59,7 @@ class PollingWatchService
|
||||
.newSingleThreadScheduledExecutor(new ThreadFactory() {
|
||||
@Override
|
||||
public Thread newThread(Runnable r) {
|
||||
Thread t = new Thread(r);
|
||||
Thread t = new ManagedLocalsThread(r);
|
||||
t.setDaemon(true);
|
||||
return t;
|
||||
}});
|
||||
|
@ -716,6 +716,11 @@ public final class PKCS12KeyStore extends KeyStoreSpi {
|
||||
|
||||
entry.protectedPrivKey = key.clone();
|
||||
if (chain != null) {
|
||||
// validate cert-chain
|
||||
if ((chain.length > 1) && (!validateChain(chain))) {
|
||||
throw new KeyStoreException("Certificate chain is "
|
||||
+ "not valid");
|
||||
}
|
||||
entry.chain = chain.clone();
|
||||
certificateCount += chain.length;
|
||||
|
||||
@ -1490,7 +1495,12 @@ public final class PKCS12KeyStore extends KeyStoreSpi {
|
||||
if (!(issuerDN.equals(subjectDN)))
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
|
||||
// Check for loops in the chain. If there are repeated certs,
|
||||
// the Set of certs in the chain will contain fewer certs than
|
||||
// the chain
|
||||
Set<Certificate> set = new HashSet<>(Arrays.asList(certChain));
|
||||
return set.size() == certChain.length;
|
||||
}
|
||||
|
||||
|
||||
@ -2070,7 +2080,24 @@ public final class PKCS12KeyStore extends KeyStoreSpi {
|
||||
ArrayList<X509Certificate> chain =
|
||||
new ArrayList<X509Certificate>();
|
||||
X509Certificate cert = findMatchedCertificate(entry);
|
||||
|
||||
mainloop:
|
||||
while (cert != null) {
|
||||
// Check for loops in the certificate chain
|
||||
if (!chain.isEmpty()) {
|
||||
for (X509Certificate chainCert : chain) {
|
||||
if (cert.equals(chainCert)) {
|
||||
if (debug != null) {
|
||||
debug.println("Loop detected in " +
|
||||
"certificate chain. Skip adding " +
|
||||
"repeated cert to chain. Subject: " +
|
||||
cert.getSubjectX500Principal()
|
||||
.toString());
|
||||
}
|
||||
break mainloop;
|
||||
}
|
||||
}
|
||||
}
|
||||
chain.add(cert);
|
||||
X500Principal issuerDN = cert.getIssuerX500Principal();
|
||||
if (issuerDN.equals(cert.getSubjectX500Principal())) {
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 1996, 2014, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 1996, 2015, 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
|
||||
@ -75,6 +75,7 @@ import java.nio.file.DirectoryStream;
|
||||
import java.nio.file.Files;
|
||||
import java.nio.file.Path;
|
||||
import java.util.Random;
|
||||
import sun.misc.ManagedLocalsThread;
|
||||
import sun.security.util.Debug;
|
||||
|
||||
abstract class SeedGenerator {
|
||||
@ -304,7 +305,7 @@ abstract class SeedGenerator {
|
||||
}
|
||||
finalsg[0] = new ThreadGroup
|
||||
(group, "SeedGenerator ThreadGroup");
|
||||
Thread newT = new Thread(finalsg[0],
|
||||
Thread newT = new ManagedLocalsThread(finalsg[0],
|
||||
ThreadedSeedGenerator.this,
|
||||
"SeedGenerator Thread");
|
||||
newT.setPriority(Thread.MIN_PRIORITY);
|
||||
@ -341,7 +342,7 @@ abstract class SeedGenerator {
|
||||
// Start some noisy threads
|
||||
try {
|
||||
BogusThread bt = new BogusThread();
|
||||
Thread t = new Thread
|
||||
Thread t = new ManagedLocalsThread
|
||||
(seedGroup, bt, "SeedGenerator Thread");
|
||||
t.start();
|
||||
} catch (Exception e) {
|
||||
|
@ -551,10 +551,10 @@ public class DistributionPointFetcher {
|
||||
// set interim reasons mask to the intersection of
|
||||
// reasons in the DP and onlySomeReasons in the IDP
|
||||
boolean[] idpReasonFlags = reasons.getFlags();
|
||||
for (int i = 0; i < idpReasonFlags.length; i++) {
|
||||
if (idpReasonFlags[i] && pointReasonFlags[i]) {
|
||||
interimReasonsMask[i] = true;
|
||||
}
|
||||
for (int i = 0; i < interimReasonsMask.length; i++) {
|
||||
interimReasonsMask[i] =
|
||||
(i < idpReasonFlags.length && idpReasonFlags[i]) &&
|
||||
(i < pointReasonFlags.length && pointReasonFlags[i]);
|
||||
}
|
||||
} else {
|
||||
// set interim reasons mask to the value of
|
||||
@ -568,7 +568,6 @@ public class DistributionPointFetcher {
|
||||
interimReasonsMask = pointReasonFlags.clone();
|
||||
} else {
|
||||
// set interim reasons mask to the special value all-reasons
|
||||
interimReasonsMask = new boolean[9];
|
||||
Arrays.fill(interimReasonsMask, true);
|
||||
}
|
||||
}
|
||||
@ -577,7 +576,9 @@ public class DistributionPointFetcher {
|
||||
// not included in the reasons mask
|
||||
boolean oneOrMore = false;
|
||||
for (int i = 0; i < interimReasonsMask.length && !oneOrMore; i++) {
|
||||
if (!reasonsMask[i] && interimReasonsMask[i]) {
|
||||
if (interimReasonsMask[i] &&
|
||||
!(i < reasonsMask.length && reasonsMask[i]))
|
||||
{
|
||||
oneOrMore = true;
|
||||
}
|
||||
}
|
||||
@ -703,11 +704,11 @@ public class DistributionPointFetcher {
|
||||
}
|
||||
|
||||
// update reasonsMask
|
||||
for (int i = 0; i < interimReasonsMask.length; i++) {
|
||||
if (!reasonsMask[i] && interimReasonsMask[i]) {
|
||||
reasonsMask[i] = true;
|
||||
}
|
||||
for (int i = 0; i < reasonsMask.length; i++) {
|
||||
reasonsMask[i] = reasonsMask[i] ||
|
||||
(i < interimReasonsMask.length && interimReasonsMask[i]);
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2003, 2014, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2003, 2015, 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
|
||||
@ -102,12 +102,24 @@ public final class RSACore {
|
||||
|
||||
/**
|
||||
* Perform an RSA private key operation. Uses CRT if the key is a
|
||||
* CRT key.
|
||||
* CRT key with additional verification check after the signature
|
||||
* is computed.
|
||||
*/
|
||||
@Deprecated
|
||||
public static byte[] rsa(byte[] msg, RSAPrivateKey key)
|
||||
throws BadPaddingException {
|
||||
return rsa(msg, key, true);
|
||||
}
|
||||
|
||||
/**
|
||||
* Perform an RSA private key operation. Uses CRT if the key is a
|
||||
* CRT key. Set 'verify' to true if this function is used for
|
||||
* generating a signature.
|
||||
*/
|
||||
public static byte[] rsa(byte[] msg, RSAPrivateKey key, boolean verify)
|
||||
throws BadPaddingException {
|
||||
if (key instanceof RSAPrivateCrtKey) {
|
||||
return crtCrypt(msg, (RSAPrivateCrtKey)key);
|
||||
return crtCrypt(msg, (RSAPrivateCrtKey)key, verify);
|
||||
} else {
|
||||
return priCrypt(msg, key.getModulus(), key.getPrivateExponent());
|
||||
}
|
||||
@ -148,10 +160,11 @@ public final class RSACore {
|
||||
* RSA private key operations with CRT. Algorithm and variable naming
|
||||
* are taken from PKCS#1 v2.1, section 5.1.2.
|
||||
*/
|
||||
private static byte[] crtCrypt(byte[] msg, RSAPrivateCrtKey key)
|
||||
throws BadPaddingException {
|
||||
private static byte[] crtCrypt(byte[] msg, RSAPrivateCrtKey key,
|
||||
boolean verify) throws BadPaddingException {
|
||||
BigInteger n = key.getModulus();
|
||||
BigInteger c = parseMsg(msg, n);
|
||||
BigInteger c0 = parseMsg(msg, n);
|
||||
BigInteger c = c0;
|
||||
BigInteger p = key.getPrimeP();
|
||||
BigInteger q = key.getPrimeQ();
|
||||
BigInteger dP = key.getPrimeExponentP();
|
||||
@ -184,6 +197,9 @@ public final class RSACore {
|
||||
if (ENABLE_BLINDING) {
|
||||
m = m.multiply(brp.v).mod(n);
|
||||
}
|
||||
if (verify && !c0.equals(m.modPow(e, n))) {
|
||||
throw new BadPaddingException("RSA private key operation failed");
|
||||
}
|
||||
|
||||
return toByteArray(m, getByteLength(n));
|
||||
}
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2003, 2013, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2003, 2015, 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
|
||||
@ -173,7 +173,7 @@ public abstract class RSASignature extends SignatureSpi {
|
||||
try {
|
||||
byte[] encoded = encodeSignature(digestOID, digest);
|
||||
byte[] padded = padding.pad(encoded);
|
||||
byte[] encrypted = RSACore.rsa(padded, privateKey);
|
||||
byte[] encrypted = RSACore.rsa(padded, privateKey, true);
|
||||
return encrypted;
|
||||
} catch (GeneralSecurityException e) {
|
||||
throw new SignatureException("Could not sign data", e);
|
||||
|
@ -293,7 +293,7 @@ final class ClientHandshaker extends Handshaker {
|
||||
case K_ECDH_RSA:
|
||||
throw new SSLProtocolException(
|
||||
"Protocol violation: server sent a server key exchange"
|
||||
+ "message for key exchange " + keyExchange);
|
||||
+ " message for key exchange " + keyExchange);
|
||||
case K_KRB5:
|
||||
case K_KRB5_EXPORT:
|
||||
throw new SSLProtocolException(
|
||||
|
@ -39,6 +39,7 @@ import java.util.concurrent.locks.ReentrantLock;
|
||||
|
||||
import javax.crypto.BadPaddingException;
|
||||
import javax.net.ssl.*;
|
||||
import sun.misc.ManagedLocalsThread;
|
||||
|
||||
/**
|
||||
* Implementation of an SSL socket. This is a normal connection type
|
||||
@ -1078,8 +1079,10 @@ final public class SSLSocketImpl extends BaseSSLSocketImpl {
|
||||
HandshakeCompletedEvent event =
|
||||
new HandshakeCompletedEvent(this, sess);
|
||||
|
||||
Thread t = new NotifyHandshakeThread(
|
||||
handshakeListeners.entrySet(), event);
|
||||
Thread t = new ManagedLocalsThread(
|
||||
new NotifyHandshake(
|
||||
handshakeListeners.entrySet(), event),
|
||||
"HandshakeCompletedNotify-Thread");
|
||||
t.start();
|
||||
}
|
||||
}
|
||||
@ -2575,17 +2578,16 @@ final public class SSLSocketImpl extends BaseSSLSocketImpl {
|
||||
// events. This ensures that the notifications don't block the
|
||||
// protocol state machine.
|
||||
//
|
||||
private static class NotifyHandshakeThread extends Thread {
|
||||
private static class NotifyHandshake implements Runnable {
|
||||
|
||||
private Set<Map.Entry<HandshakeCompletedListener,AccessControlContext>>
|
||||
targets; // who gets notified
|
||||
private HandshakeCompletedEvent event; // the notification
|
||||
|
||||
NotifyHandshakeThread(
|
||||
NotifyHandshake(
|
||||
Set<Map.Entry<HandshakeCompletedListener,AccessControlContext>>
|
||||
entrySet, HandshakeCompletedEvent e) {
|
||||
|
||||
super("HandshakeCompletedNotify-Thread");
|
||||
targets = new HashSet<>(entrySet); // clone the entry set
|
||||
event = e;
|
||||
}
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2002, 2008, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2002, 2015, 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
|
||||
@ -132,26 +132,33 @@ class EndEntityChecker {
|
||||
return new EndEntityChecker(type, variant);
|
||||
}
|
||||
|
||||
void check(X509Certificate cert, Object parameter)
|
||||
throws CertificateException {
|
||||
void check(X509Certificate cert, Object parameter,
|
||||
boolean checkUnresolvedCritExts) throws CertificateException {
|
||||
if (variant.equals(Validator.VAR_GENERIC)) {
|
||||
// no checks
|
||||
return;
|
||||
} else if (variant.equals(Validator.VAR_TLS_SERVER)) {
|
||||
checkTLSServer(cert, (String)parameter);
|
||||
return; // no checks
|
||||
}
|
||||
|
||||
Set<String> exts = getCriticalExtensions(cert);
|
||||
if (variant.equals(Validator.VAR_TLS_SERVER)) {
|
||||
checkTLSServer(cert, (String)parameter, exts);
|
||||
} else if (variant.equals(Validator.VAR_TLS_CLIENT)) {
|
||||
checkTLSClient(cert);
|
||||
checkTLSClient(cert, exts);
|
||||
} else if (variant.equals(Validator.VAR_CODE_SIGNING)) {
|
||||
checkCodeSigning(cert);
|
||||
checkCodeSigning(cert, exts);
|
||||
} else if (variant.equals(Validator.VAR_JCE_SIGNING)) {
|
||||
checkCodeSigning(cert);
|
||||
checkCodeSigning(cert, exts);
|
||||
} else if (variant.equals(Validator.VAR_PLUGIN_CODE_SIGNING)) {
|
||||
checkCodeSigning(cert);
|
||||
checkCodeSigning(cert, exts);
|
||||
} else if (variant.equals(Validator.VAR_TSA_SERVER)) {
|
||||
checkTSAServer(cert);
|
||||
checkTSAServer(cert, exts);
|
||||
} else {
|
||||
throw new CertificateException("Unknown variant: " + variant);
|
||||
}
|
||||
|
||||
// if neither VAR_GENERIC variant nor unknown variant
|
||||
if (checkUnresolvedCritExts) {
|
||||
checkRemainingExtensions(exts);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
@ -219,10 +226,8 @@ class EndEntityChecker {
|
||||
* authentication.
|
||||
* @throws CertificateException if not.
|
||||
*/
|
||||
private void checkTLSClient(X509Certificate cert)
|
||||
private void checkTLSClient(X509Certificate cert, Set<String> exts)
|
||||
throws CertificateException {
|
||||
Set<String> exts = getCriticalExtensions(cert);
|
||||
|
||||
if (checkKeyUsage(cert, KU_SIGNATURE) == false) {
|
||||
throw new ValidatorException
|
||||
("KeyUsage does not allow digital signatures",
|
||||
@ -245,8 +250,6 @@ class EndEntityChecker {
|
||||
exts.remove(SimpleValidator.OID_KEY_USAGE);
|
||||
exts.remove(SimpleValidator.OID_EXTENDED_KEY_USAGE);
|
||||
exts.remove(SimpleValidator.OID_NETSCAPE_CERT_TYPE);
|
||||
|
||||
checkRemainingExtensions(exts);
|
||||
}
|
||||
|
||||
/**
|
||||
@ -255,10 +258,8 @@ class EndEntityChecker {
|
||||
* specification for details.
|
||||
* @throws CertificateException if not.
|
||||
*/
|
||||
private void checkTLSServer(X509Certificate cert, String parameter)
|
||||
throws CertificateException {
|
||||
Set<String> exts = getCriticalExtensions(cert);
|
||||
|
||||
private void checkTLSServer(X509Certificate cert, String parameter,
|
||||
Set<String> exts) throws CertificateException {
|
||||
if (KU_SERVER_ENCRYPTION.contains(parameter)) {
|
||||
if (checkKeyUsage(cert, KU_KEY_ENCIPHERMENT) == false) {
|
||||
throw new ValidatorException
|
||||
@ -303,18 +304,14 @@ class EndEntityChecker {
|
||||
exts.remove(SimpleValidator.OID_KEY_USAGE);
|
||||
exts.remove(SimpleValidator.OID_EXTENDED_KEY_USAGE);
|
||||
exts.remove(SimpleValidator.OID_NETSCAPE_CERT_TYPE);
|
||||
|
||||
checkRemainingExtensions(exts);
|
||||
}
|
||||
|
||||
/**
|
||||
* Check whether this certificate can be used for code signing.
|
||||
* @throws CertificateException if not.
|
||||
*/
|
||||
private void checkCodeSigning(X509Certificate cert)
|
||||
private void checkCodeSigning(X509Certificate cert, Set<String> exts)
|
||||
throws CertificateException {
|
||||
Set<String> exts = getCriticalExtensions(cert);
|
||||
|
||||
if (checkKeyUsage(cert, KU_SIGNATURE) == false) {
|
||||
throw new ValidatorException
|
||||
("KeyUsage does not allow digital signatures",
|
||||
@ -341,8 +338,6 @@ class EndEntityChecker {
|
||||
// remove extensions we checked
|
||||
exts.remove(SimpleValidator.OID_KEY_USAGE);
|
||||
exts.remove(SimpleValidator.OID_EXTENDED_KEY_USAGE);
|
||||
|
||||
checkRemainingExtensions(exts);
|
||||
}
|
||||
|
||||
/**
|
||||
@ -350,10 +345,8 @@ class EndEntityChecker {
|
||||
* server (see RFC 3161, section 2.3).
|
||||
* @throws CertificateException if not.
|
||||
*/
|
||||
private void checkTSAServer(X509Certificate cert)
|
||||
private void checkTSAServer(X509Certificate cert, Set<String> exts)
|
||||
throws CertificateException {
|
||||
Set<String> exts = getCriticalExtensions(cert);
|
||||
|
||||
if (checkKeyUsage(cert, KU_SIGNATURE) == false) {
|
||||
throw new ValidatorException
|
||||
("KeyUsage does not allow digital signatures",
|
||||
@ -376,7 +369,5 @@ class EndEntityChecker {
|
||||
// remove extensions we checked
|
||||
exts.remove(SimpleValidator.OID_KEY_USAGE);
|
||||
exts.remove(SimpleValidator.OID_EXTENDED_KEY_USAGE);
|
||||
|
||||
checkRemainingExtensions(exts);
|
||||
}
|
||||
}
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2002, 2010, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2002, 2015, 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
|
||||
@ -143,6 +143,7 @@ public abstract class Validator {
|
||||
*/
|
||||
public final static String VAR_PLUGIN_CODE_SIGNING = "plugin code signing";
|
||||
|
||||
private final String type;
|
||||
final EndEntityChecker endEntityChecker;
|
||||
final String variant;
|
||||
|
||||
@ -154,6 +155,7 @@ public abstract class Validator {
|
||||
volatile Date validationDate;
|
||||
|
||||
Validator(String type, String variant) {
|
||||
this.type = type;
|
||||
this.variant = variant;
|
||||
endEntityChecker = EndEntityChecker.getInstance(type, variant);
|
||||
}
|
||||
@ -261,7 +263,16 @@ public abstract class Validator {
|
||||
|
||||
// omit EE extension check if EE cert is also trust anchor
|
||||
if (chain.length > 1) {
|
||||
endEntityChecker.check(chain[0], parameter);
|
||||
// EndEntityChecker does not need to check unresolved critical
|
||||
// extensions when validating with a TYPE_PKIX Validator.
|
||||
// A TYPE_PKIX Validator will already have run checks on all
|
||||
// certs' extensions, including checks by any PKIXCertPathCheckers
|
||||
// included in the PKIXParameters, so the extra checks would be
|
||||
// redundant.
|
||||
boolean checkUnresolvedCritExts =
|
||||
(type == TYPE_PKIX) ? false : true;
|
||||
endEntityChecker.check(chain[0], parameter,
|
||||
checkUnresolvedCritExts);
|
||||
}
|
||||
|
||||
return chain;
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 1997, 2015, 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
|
||||
@ -83,7 +83,8 @@ implements CertAttrSet<String> {
|
||||
* @param position the position in the bit string to check.
|
||||
*/
|
||||
private boolean isSet(int position) {
|
||||
return bitString[position];
|
||||
return (position < bitString.length) &&
|
||||
bitString[position];
|
||||
}
|
||||
|
||||
/**
|
||||
@ -275,41 +276,40 @@ implements CertAttrSet<String> {
|
||||
* Returns a printable representation of the KeyUsage.
|
||||
*/
|
||||
public String toString() {
|
||||
String s = super.toString() + "KeyUsage [\n";
|
||||
StringBuilder sb = new StringBuilder();
|
||||
sb.append(super.toString());
|
||||
sb.append("KeyUsage [\n");
|
||||
|
||||
try {
|
||||
if (isSet(0)) {
|
||||
s += " DigitalSignature\n";
|
||||
}
|
||||
if (isSet(1)) {
|
||||
s += " Non_repudiation\n";
|
||||
}
|
||||
if (isSet(2)) {
|
||||
s += " Key_Encipherment\n";
|
||||
}
|
||||
if (isSet(3)) {
|
||||
s += " Data_Encipherment\n";
|
||||
}
|
||||
if (isSet(4)) {
|
||||
s += " Key_Agreement\n";
|
||||
}
|
||||
if (isSet(5)) {
|
||||
s += " Key_CertSign\n";
|
||||
}
|
||||
if (isSet(6)) {
|
||||
s += " Crl_Sign\n";
|
||||
}
|
||||
if (isSet(7)) {
|
||||
s += " Encipher_Only\n";
|
||||
}
|
||||
if (isSet(8)) {
|
||||
s += " Decipher_Only\n";
|
||||
}
|
||||
} catch (ArrayIndexOutOfBoundsException ex) {}
|
||||
if (isSet(0)) {
|
||||
sb.append(" DigitalSignature\n");
|
||||
}
|
||||
if (isSet(1)) {
|
||||
sb.append(" Non_repudiation\n");
|
||||
}
|
||||
if (isSet(2)) {
|
||||
sb.append(" Key_Encipherment\n");
|
||||
}
|
||||
if (isSet(3)) {
|
||||
sb.append(" Data_Encipherment\n");
|
||||
}
|
||||
if (isSet(4)) {
|
||||
sb.append(" Key_Agreement\n");
|
||||
}
|
||||
if (isSet(5)) {
|
||||
sb.append(" Key_CertSign\n");
|
||||
}
|
||||
if (isSet(6)) {
|
||||
sb.append(" Crl_Sign\n");
|
||||
}
|
||||
if (isSet(7)) {
|
||||
sb.append(" Encipher_Only\n");
|
||||
}
|
||||
if (isSet(8)) {
|
||||
sb.append(" Decipher_Only\n");
|
||||
}
|
||||
sb.append("]\n");
|
||||
|
||||
s += "]\n";
|
||||
|
||||
return (s);
|
||||
return sb.toString();
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 1998, 2011, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 1998, 2015, 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
|
||||
@ -136,7 +136,8 @@ implements CertAttrSet<String> {
|
||||
* @param position the position in the bit string to check.
|
||||
*/
|
||||
private boolean isSet(int position) {
|
||||
return bitString[position];
|
||||
return (position < bitString.length) &&
|
||||
bitString[position];
|
||||
}
|
||||
|
||||
/**
|
||||
@ -236,27 +237,34 @@ implements CertAttrSet<String> {
|
||||
* Returns a printable representation of the NetscapeCertType.
|
||||
*/
|
||||
public String toString() {
|
||||
String s = super.toString() + "NetscapeCertType [\n";
|
||||
StringBuilder sb = new StringBuilder();
|
||||
sb.append(super.toString());
|
||||
sb.append("NetscapeCertType [\n");
|
||||
|
||||
try {
|
||||
if (isSet(getPosition(SSL_CLIENT)))
|
||||
s += " SSL client\n";
|
||||
if (isSet(getPosition(SSL_SERVER)))
|
||||
s += " SSL server\n";
|
||||
if (isSet(getPosition(S_MIME)))
|
||||
s += " S/MIME\n";
|
||||
if (isSet(getPosition(OBJECT_SIGNING)))
|
||||
s += " Object Signing\n";
|
||||
if (isSet(getPosition(SSL_CA)))
|
||||
s += " SSL CA\n";
|
||||
if (isSet(getPosition(S_MIME_CA)))
|
||||
s += " S/MIME CA\n";
|
||||
if (isSet(getPosition(OBJECT_SIGNING_CA)))
|
||||
s += " Object Signing CA" ;
|
||||
} catch (Exception e) { }
|
||||
if (isSet(0)) {
|
||||
sb.append(" SSL client\n");
|
||||
}
|
||||
if (isSet(1)) {
|
||||
sb.append(" SSL server\n");
|
||||
}
|
||||
if (isSet(2)) {
|
||||
sb.append(" S/MIME\n");
|
||||
}
|
||||
if (isSet(3)) {
|
||||
sb.append(" Object Signing\n");
|
||||
}
|
||||
if (isSet(5)) {
|
||||
sb.append(" SSL CA\n");
|
||||
}
|
||||
if (isSet(6)) {
|
||||
sb.append(" S/MIME CA\n");
|
||||
}
|
||||
if (isSet(7)) {
|
||||
sb.append(" Object Signing CA");
|
||||
}
|
||||
|
||||
s += "]\n";
|
||||
return (s);
|
||||
sb.append("]\n");
|
||||
return sb.toString();
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 1997, 2006, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 1997, 2015, 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
|
||||
@ -99,7 +99,8 @@ public class ReasonFlags {
|
||||
* @param position the position in the bit string to check.
|
||||
*/
|
||||
private boolean isSet(int position) {
|
||||
return bitString[position];
|
||||
return (position < bitString.length) &&
|
||||
bitString[position];
|
||||
}
|
||||
|
||||
/**
|
||||
@ -199,23 +200,38 @@ public class ReasonFlags {
|
||||
* Returns a printable representation of the ReasonFlags.
|
||||
*/
|
||||
public String toString() {
|
||||
String s = "Reason Flags [\n";
|
||||
StringBuilder sb = new StringBuilder("Reason Flags [\n");
|
||||
|
||||
try {
|
||||
if (isSet(0)) s += " Unused\n";
|
||||
if (isSet(1)) s += " Key Compromise\n";
|
||||
if (isSet(2)) s += " CA Compromise\n";
|
||||
if (isSet(3)) s += " Affiliation_Changed\n";
|
||||
if (isSet(4)) s += " Superseded\n";
|
||||
if (isSet(5)) s += " Cessation Of Operation\n";
|
||||
if (isSet(6)) s += " Certificate Hold\n";
|
||||
if (isSet(7)) s += " Privilege Withdrawn\n";
|
||||
if (isSet(8)) s += " AA Compromise\n";
|
||||
} catch (ArrayIndexOutOfBoundsException ex) {}
|
||||
if (isSet(0)) {
|
||||
sb.append(" Unused\n");
|
||||
}
|
||||
if (isSet(1)) {
|
||||
sb.append(" Key Compromise\n");
|
||||
}
|
||||
if (isSet(2)) {
|
||||
sb.append(" CA Compromise\n");
|
||||
}
|
||||
if (isSet(3)) {
|
||||
sb.append(" Affiliation_Changed\n");
|
||||
}
|
||||
if (isSet(4)) {
|
||||
sb.append(" Superseded\n");
|
||||
}
|
||||
if (isSet(5)) {
|
||||
sb.append(" Cessation Of Operation\n");
|
||||
}
|
||||
if (isSet(6)) {
|
||||
sb.append(" Certificate Hold\n");
|
||||
}
|
||||
if (isSet(7)) {
|
||||
sb.append(" Privilege Withdrawn\n");
|
||||
}
|
||||
if (isSet(8)) {
|
||||
sb.append(" AA Compromise\n");
|
||||
}
|
||||
sb.append("]\n");
|
||||
|
||||
s += "]\n";
|
||||
|
||||
return (s);
|
||||
return sb.toString();
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -47,6 +47,7 @@ import java.util.Calendar;
|
||||
import java.util.LinkedHashSet;
|
||||
import java.util.Locale;
|
||||
import java.util.Map;
|
||||
import java.util.Objects;
|
||||
import java.util.ResourceBundle;
|
||||
import java.util.Set;
|
||||
import java.util.concurrent.ConcurrentHashMap;
|
||||
@ -250,17 +251,17 @@ public class LocaleResources {
|
||||
return (String) localeName;
|
||||
}
|
||||
|
||||
String[] getTimeZoneNames(String key, int size) {
|
||||
String[] getTimeZoneNames(String key) {
|
||||
String[] names = null;
|
||||
String cacheKey = TIME_ZONE_NAMES + size + '.' + key;
|
||||
String cacheKey = TIME_ZONE_NAMES + '.' + key;
|
||||
|
||||
removeEmptyReferences();
|
||||
ResourceReference data = cache.get(cacheKey);
|
||||
|
||||
if (data == null || ((names = (String[]) data.get()) == null)) {
|
||||
if (Objects.isNull(data) || Objects.isNull((names = (String[]) data.get()))) {
|
||||
TimeZoneNamesBundle tznb = localeData.getTimeZoneNames(locale);
|
||||
if (tznb.containsKey(key)) {
|
||||
names = tznb.getStringArray(key, size);
|
||||
names = tznb.getStringArray(key);
|
||||
cache.put(cacheKey,
|
||||
new ResourceReference(cacheKey, (Object) names, referenceQueue));
|
||||
}
|
||||
|
@ -26,6 +26,7 @@
|
||||
package sun.util.locale.provider;
|
||||
|
||||
import java.util.Locale;
|
||||
import java.util.Objects;
|
||||
import java.util.Set;
|
||||
import java.util.TimeZone;
|
||||
import java.util.spi.TimeZoneNameProvider;
|
||||
@ -95,8 +96,9 @@ public class TimeZoneNameProviderImpl extends TimeZoneNameProvider {
|
||||
*/
|
||||
@Override
|
||||
public String getDisplayName(String id, boolean daylight, int style, Locale locale) {
|
||||
String[] names = getDisplayNameArray(id, 5, locale);
|
||||
if (names != null) {
|
||||
String[] names = getDisplayNameArray(id, locale);
|
||||
if (Objects.nonNull(names)) {
|
||||
assert names.length >= 7;
|
||||
int index = daylight ? 3 : 1;
|
||||
if (style == TimeZone.SHORT) {
|
||||
index++;
|
||||
@ -108,18 +110,18 @@ public class TimeZoneNameProviderImpl extends TimeZoneNameProvider {
|
||||
|
||||
@Override
|
||||
public String getGenericDisplayName(String id, int style, Locale locale) {
|
||||
String[] names = getDisplayNameArray(id, 7, locale);
|
||||
if (names != null && names.length >= 7) {
|
||||
String[] names = getDisplayNameArray(id, locale);
|
||||
if (Objects.nonNull(names)) {
|
||||
assert names.length >= 7;
|
||||
return names[(style == TimeZone.LONG) ? 5 : 6];
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
private String[] getDisplayNameArray(String id, int n, Locale locale) {
|
||||
if (id == null || locale == null) {
|
||||
throw new NullPointerException();
|
||||
}
|
||||
return LocaleProviderAdapter.forType(type).getLocaleResources(locale).getTimeZoneNames(id, n);
|
||||
private String[] getDisplayNameArray(String id, Locale locale) {
|
||||
Objects.requireNonNull(id);
|
||||
Objects.requireNonNull(locale);
|
||||
return LocaleProviderAdapter.forType(type).getLocaleResources(locale).getTimeZoneNames(id);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -30,6 +30,7 @@ import java.util.LinkedList;
|
||||
import java.util.List;
|
||||
import java.util.Locale;
|
||||
import java.util.Map;
|
||||
import java.util.Objects;
|
||||
import java.util.Set;
|
||||
import java.util.concurrent.ConcurrentHashMap;
|
||||
import java.util.spi.TimeZoneNameProvider;
|
||||
@ -100,9 +101,9 @@ public final class TimeZoneNameUtility {
|
||||
* Retrieve display names for a time zone ID.
|
||||
*/
|
||||
public static String[] retrieveDisplayNames(String id, Locale locale) {
|
||||
if (id == null || locale == null) {
|
||||
throw new NullPointerException();
|
||||
}
|
||||
Objects.requireNonNull(id);
|
||||
Objects.requireNonNull(locale);
|
||||
|
||||
return retrieveDisplayNamesImpl(id, locale);
|
||||
}
|
||||
|
||||
@ -115,9 +116,12 @@ public final class TimeZoneNameUtility {
|
||||
* @return the requested generic time zone display name, or null if not found.
|
||||
*/
|
||||
public static String retrieveGenericDisplayName(String id, int style, Locale locale) {
|
||||
LocaleServiceProviderPool pool =
|
||||
LocaleServiceProviderPool.getPool(TimeZoneNameProvider.class);
|
||||
return pool.getLocalizedObject(TimeZoneNameGetter.INSTANCE, locale, "generic", style, id);
|
||||
String[] names = retrieveDisplayNamesImpl(id, locale);
|
||||
if (Objects.nonNull(names)) {
|
||||
return names[6 - style];
|
||||
} else {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
@ -130,140 +134,53 @@ public final class TimeZoneNameUtility {
|
||||
* @return the requested time zone name, or null if not found.
|
||||
*/
|
||||
public static String retrieveDisplayName(String id, boolean daylight, int style, Locale locale) {
|
||||
LocaleServiceProviderPool pool =
|
||||
LocaleServiceProviderPool.getPool(TimeZoneNameProvider.class);
|
||||
return pool.getLocalizedObject(TimeZoneNameGetter.INSTANCE, locale, daylight ? "dst" : "std", style, id);
|
||||
String[] names = retrieveDisplayNamesImpl(id, locale);
|
||||
if (Objects.nonNull(names)) {
|
||||
return names[(daylight ? 4 : 2) - style];
|
||||
} else {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
private static String[] retrieveDisplayNamesImpl(String id, Locale locale) {
|
||||
LocaleServiceProviderPool pool =
|
||||
LocaleServiceProviderPool.getPool(TimeZoneNameProvider.class);
|
||||
String[] names;
|
||||
Map<Locale, String[]> perLocale = null;
|
||||
|
||||
SoftReference<Map<Locale, String[]>> ref = cachedDisplayNames.get(id);
|
||||
if (ref != null) {
|
||||
Map<Locale, String[]> perLocale = ref.get();
|
||||
if (perLocale != null) {
|
||||
String[] names = perLocale.get(locale);
|
||||
if (names != null) {
|
||||
if (Objects.nonNull(ref)) {
|
||||
perLocale = ref.get();
|
||||
if (Objects.nonNull(perLocale)) {
|
||||
names = perLocale.get(locale);
|
||||
if (Objects.nonNull(names)) {
|
||||
return names;
|
||||
}
|
||||
names = pool.getLocalizedObject(TimeZoneNameArrayGetter.INSTANCE, locale, id);
|
||||
if (names != null) {
|
||||
perLocale.put(locale, names);
|
||||
}
|
||||
return names;
|
||||
}
|
||||
}
|
||||
|
||||
String[] names = pool.getLocalizedObject(TimeZoneNameArrayGetter.INSTANCE, locale, id);
|
||||
if (names != null) {
|
||||
Map<Locale, String[]> perLocale = new ConcurrentHashMap<>();
|
||||
perLocale.put(locale, names);
|
||||
ref = new SoftReference<>(perLocale);
|
||||
cachedDisplayNames.put(id, ref);
|
||||
// build names array
|
||||
names = new String[7];
|
||||
names[0] = id;
|
||||
for (int i = 1; i <= 6; i ++) {
|
||||
names[i] = pool.getLocalizedObject(TimeZoneNameGetter.INSTANCE, locale,
|
||||
i<5 ? (i<3 ? "std" : "dst") : "generic", i%2, id);
|
||||
}
|
||||
|
||||
if (Objects.isNull(perLocale)) {
|
||||
perLocale = new ConcurrentHashMap<>();
|
||||
}
|
||||
perLocale.put(locale, names);
|
||||
ref = new SoftReference<>(perLocale);
|
||||
cachedDisplayNames.put(id, ref);
|
||||
return names;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Obtains a localized time zone strings from a TimeZoneNameProvider
|
||||
* implementation.
|
||||
*/
|
||||
private static class TimeZoneNameArrayGetter
|
||||
implements LocaleServiceProviderPool.LocalizedObjectGetter<TimeZoneNameProvider,
|
||||
String[]>{
|
||||
private static final TimeZoneNameArrayGetter INSTANCE =
|
||||
new TimeZoneNameArrayGetter();
|
||||
|
||||
@Override
|
||||
public String[] getObject(TimeZoneNameProvider timeZoneNameProvider,
|
||||
Locale locale,
|
||||
String requestID,
|
||||
Object... params) {
|
||||
assert params.length == 0;
|
||||
|
||||
// First, try to get names with the request ID
|
||||
String[] names = buildZoneStrings(timeZoneNameProvider, locale, requestID);
|
||||
|
||||
if (names == null) {
|
||||
Map<String, String> aliases = ZoneInfo.getAliasTable();
|
||||
|
||||
if (aliases != null) {
|
||||
// Check whether this id is an alias, if so,
|
||||
// look for the standard id.
|
||||
String canonicalID = aliases.get(requestID);
|
||||
if (canonicalID != null) {
|
||||
names = buildZoneStrings(timeZoneNameProvider, locale, canonicalID);
|
||||
}
|
||||
if (names == null) {
|
||||
// There may be a case that a standard id has become an
|
||||
// alias. so, check the aliases backward.
|
||||
names = examineAliases(timeZoneNameProvider, locale,
|
||||
canonicalID == null ? requestID : canonicalID, aliases);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (names != null) {
|
||||
names[0] = requestID;
|
||||
}
|
||||
|
||||
return names;
|
||||
}
|
||||
|
||||
private static String[] examineAliases(TimeZoneNameProvider tznp, Locale locale,
|
||||
String id,
|
||||
Map<String, String> aliases) {
|
||||
if (aliases.containsValue(id)) {
|
||||
for (Map.Entry<String, String> entry : aliases.entrySet()) {
|
||||
if (entry.getValue().equals(id)) {
|
||||
String alias = entry.getKey();
|
||||
String[] names = buildZoneStrings(tznp, locale, alias);
|
||||
if (names != null) {
|
||||
return names;
|
||||
}
|
||||
names = examineAliases(tznp, locale, alias, aliases);
|
||||
if (names != null) {
|
||||
return names;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
private static String[] buildZoneStrings(TimeZoneNameProvider tznp,
|
||||
Locale locale, String id) {
|
||||
String[] names = new String[5];
|
||||
|
||||
for (int i = 1; i <= 4; i ++) {
|
||||
names[i] = tznp.getDisplayName(id, i>=3, i%2, locale);
|
||||
|
||||
if (names[i] == null) {
|
||||
switch (i) {
|
||||
case 1:
|
||||
// this id seems not localized by this provider
|
||||
return null;
|
||||
case 2:
|
||||
case 4:
|
||||
// If the display name for SHORT is not supplied,
|
||||
// copy the LONG name.
|
||||
names[i] = names[i-1];
|
||||
break;
|
||||
case 3:
|
||||
// If the display name for DST is not supplied,
|
||||
// copy the "standard" name.
|
||||
names[3] = names[1];
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return names;
|
||||
}
|
||||
}
|
||||
|
||||
private static class TimeZoneNameGetter
|
||||
implements LocaleServiceProviderPool.LocalizedObjectGetter<TimeZoneNameProvider,
|
||||
String> {
|
||||
@ -299,18 +216,16 @@ public final class TimeZoneNameUtility {
|
||||
private static String examineAliases(TimeZoneNameProvider tznp, Locale locale,
|
||||
String requestID, String tzid, int style,
|
||||
Map<String, String> aliases) {
|
||||
if (aliases.containsValue(tzid)) {
|
||||
for (Map.Entry<String, String> entry : aliases.entrySet()) {
|
||||
if (entry.getValue().equals(tzid)) {
|
||||
String alias = entry.getKey();
|
||||
String name = getName(tznp, locale, requestID, style, alias);
|
||||
if (name != null) {
|
||||
return name;
|
||||
}
|
||||
name = examineAliases(tznp, locale, requestID, alias, style, aliases);
|
||||
if (name != null) {
|
||||
return name;
|
||||
}
|
||||
for (Map.Entry<String, String> entry : aliases.entrySet()) {
|
||||
if (entry.getValue().equals(tzid)) {
|
||||
String alias = entry.getKey();
|
||||
String name = getName(tznp, locale, requestID, style, alias);
|
||||
if (name != null) {
|
||||
return name;
|
||||
}
|
||||
name = examineAliases(tznp, locale, requestID, alias, style, aliases);
|
||||
if (name != null) {
|
||||
return name;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -44,6 +44,7 @@ import java.util.Map;
|
||||
import java.util.LinkedHashMap;
|
||||
import java.util.LinkedHashSet;
|
||||
import java.util.MissingResourceException;
|
||||
import java.util.Objects;
|
||||
import java.util.Set;
|
||||
|
||||
/**
|
||||
@ -60,26 +61,6 @@ import java.util.Set;
|
||||
*/
|
||||
public abstract class TimeZoneNamesBundle extends OpenListResourceBundle {
|
||||
|
||||
/**
|
||||
* Returns a String array containing time zone names. The String array has
|
||||
* at most size elements.
|
||||
*
|
||||
* @param key the time zone ID for which names are obtained
|
||||
* @param size the requested size of array for names
|
||||
* @return a String array containing names
|
||||
*/
|
||||
public String[] getStringArray(String key, int size) {
|
||||
String[] names = handleGetObject(key, size);
|
||||
if ((names == null || names.length != size) && parent != null) {
|
||||
names = ((TimeZoneNamesBundle)parent).getStringArray(key, size);
|
||||
}
|
||||
if (names == null) {
|
||||
throw new MissingResourceException("no time zone names", getClass().getName(), key);
|
||||
}
|
||||
return names;
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* Maps time zone IDs to locale-specific names.
|
||||
* The value returned is an array of five strings:
|
||||
@ -89,6 +70,8 @@ public abstract class TimeZoneNamesBundle extends OpenListResourceBundle {
|
||||
* <li>The short name of the time zone in standard time (localized).
|
||||
* <li>The long name of the time zone in daylight savings time (localized).
|
||||
* <li>The short name of the time zone in daylight savings time (localized).
|
||||
* <li>The long name of the time zone in generic form (localized).
|
||||
* <li>The short name of the time zone in generic form (localized).
|
||||
* </ul>
|
||||
* The localized names come from the subclasses's
|
||||
* <code>getContents</code> implementations, while the time zone
|
||||
@ -96,16 +79,12 @@ public abstract class TimeZoneNamesBundle extends OpenListResourceBundle {
|
||||
*/
|
||||
@Override
|
||||
public Object handleGetObject(String key) {
|
||||
return handleGetObject(key, 5);
|
||||
}
|
||||
|
||||
private String[] handleGetObject(String key, int n) {
|
||||
String[] contents = (String[]) super.handleGetObject(key);
|
||||
if (contents == null) {
|
||||
if (Objects.isNull(contents)) {
|
||||
return null;
|
||||
}
|
||||
int clen = Math.min(n - 1, contents.length);
|
||||
String[] tmpobj = new String[clen+1];
|
||||
int clen = contents.length;
|
||||
String[] tmpobj = new String[7];
|
||||
tmpobj[0] = key;
|
||||
System.arraycopy(contents, 0, tmpobj, 1, clen);
|
||||
return tmpobj;
|
||||
|
@ -47,7 +47,8 @@ public final class TimeZoneNames_en_IE extends TimeZoneNamesBundle {
|
||||
protected final Object[][] getContents() {
|
||||
return new Object[][] {
|
||||
{"Europe/London", new String[] {"Greenwich Mean Time", "GMT",
|
||||
"Irish Summer Time", "IST" /*Dublin*/}},
|
||||
"Irish Summer Time", "IST", /*Dublin*/
|
||||
"Irish Time", "IT" /*Dublin*/}},
|
||||
};
|
||||
}
|
||||
}
|
||||
|
@ -533,4 +533,4 @@ jdk.certpath.disabledAlgorithms=MD2, MD5, RSA keySize < 1024
|
||||
#
|
||||
# Example:
|
||||
# jdk.tls.disabledAlgorithms=MD5, SSLv3, DSA, RSA keySize < 2048
|
||||
jdk.tls.disabledAlgorithms=SSLv3
|
||||
jdk.tls.disabledAlgorithms=SSLv3, RC4
|
||||
|
@ -40,6 +40,7 @@ import java.util.List;
|
||||
import java.util.ArrayList;
|
||||
import java.util.HashMap;
|
||||
import java.util.Iterator;
|
||||
import sun.misc.ManagedLocalsThread;
|
||||
|
||||
/**
|
||||
* A multi-threaded implementation of Selector for Windows.
|
||||
@ -403,7 +404,7 @@ final class WindowsSelectorImpl extends SelectorImpl {
|
||||
}
|
||||
|
||||
// Represents a helper thread used for select.
|
||||
private final class SelectThread extends Thread {
|
||||
private final class SelectThread extends ManagedLocalsThread {
|
||||
private final int index; // index of this thread
|
||||
final SubSelector subSelector;
|
||||
private long lastRun = 0; // last run number
|
||||
|
@ -6,3 +6,7 @@ grant codeBase "jrt:/jdk.crypto.mscapi" {
|
||||
permission java.security.SecurityPermission "clearProviderProperties.SunMSCAPI";
|
||||
permission java.security.SecurityPermission "removeProviderProperty.SunMSCAPI";
|
||||
};
|
||||
|
||||
grant codeBase "jrt:/jdk.accessibility" {
|
||||
permission java.security.AllPermission;
|
||||
};
|
||||
|
@ -4,12 +4,12 @@
|
||||
xmlns:asmv3="urn:schemas-microsoft-com:asm.v3"
|
||||
>
|
||||
<assemblyIdentity
|
||||
version="IMVERSION"
|
||||
name=""
|
||||
version=""
|
||||
processorArchitecture="X86"
|
||||
name="Oracle Corporation, Java(tm) 2 Standard Edition"
|
||||
type="win32"
|
||||
/>
|
||||
<description>Java(TM) SE PROGRAM process</description>
|
||||
<description>Java(TM) SE process</description>
|
||||
<dependency>
|
||||
<dependentAssembly>
|
||||
<assemblyIdentity
|
||||
|
@ -7,9 +7,3 @@
|
||||
// Icon
|
||||
//
|
||||
IDI_ICON ICON DISCARDABLE "awt.ico"
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// RT_MANIFEST
|
||||
//
|
||||
1 RT_MANIFEST "java.manifest"
|
||||
|
@ -147,219 +147,248 @@ static void customZoneName(LONG bias, char *buffer) {
|
||||
*/
|
||||
static int getWinTimeZone(char *winZoneName, char *winMapID)
|
||||
{
|
||||
TIME_ZONE_INFORMATION tzi;
|
||||
OSVERSIONINFO ver;
|
||||
int onlyMapID;
|
||||
HANDLE hKey = NULL, hSubKey = NULL;
|
||||
LONG ret;
|
||||
DWORD nSubKeys, i;
|
||||
ULONG valueType;
|
||||
TCHAR subKeyName[MAX_ZONE_CHAR];
|
||||
TCHAR szValue[MAX_ZONE_CHAR];
|
||||
WCHAR stdNameInReg[MAX_ZONE_CHAR];
|
||||
TziValue tempTzi;
|
||||
WCHAR *stdNamePtr = tzi.StandardName;
|
||||
DWORD valueSize;
|
||||
DYNAMIC_TIME_ZONE_INFORMATION dtzi;
|
||||
DWORD timeType;
|
||||
int isVista;
|
||||
DWORD bufSize;
|
||||
DWORD val;
|
||||
HANDLE hKey = NULL;
|
||||
LONG ret;
|
||||
ULONG valueType;
|
||||
|
||||
/*
|
||||
* Get the current time zone setting of the platform.
|
||||
* Get the dynamic time zone information so that time zone redirection
|
||||
* can be supported. (see JDK-7044727)
|
||||
*/
|
||||
timeType = GetTimeZoneInformation(&tzi);
|
||||
timeType = GetDynamicTimeZoneInformation(&dtzi);
|
||||
if (timeType == TIME_ZONE_ID_INVALID) {
|
||||
goto err;
|
||||
}
|
||||
|
||||
/*
|
||||
* Determine if this is an NT system.
|
||||
* Make sure TimeZoneKeyName is available from the API call. If
|
||||
* DynamicDaylightTime is disabled, return a custom time zone name
|
||||
* based on the GMT offset. Otherwise, return the TimeZoneKeyName
|
||||
* value.
|
||||
*/
|
||||
ver.dwOSVersionInfoSize = sizeof(ver);
|
||||
GetVersionEx(&ver);
|
||||
isVista = ver.dwMajorVersion >= 6;
|
||||
if (dtzi.TimeZoneKeyName[0] != 0) {
|
||||
if (dtzi.DynamicDaylightTimeDisabled) {
|
||||
customZoneName(dtzi.Bias, winZoneName);
|
||||
return VALUE_GMTOFFSET;
|
||||
}
|
||||
wcstombs(winZoneName, dtzi.TimeZoneKeyName, MAX_ZONE_CHAR);
|
||||
return VALUE_KEY;
|
||||
}
|
||||
|
||||
ret = RegOpenKeyEx(HKEY_LOCAL_MACHINE, WIN_CURRENT_TZ_KEY, 0,
|
||||
KEY_READ, (PHKEY)&hKey);
|
||||
if (ret == ERROR_SUCCESS) {
|
||||
DWORD val;
|
||||
DWORD bufSize;
|
||||
/*
|
||||
* If TimeZoneKeyName is not available, check whether StandardName
|
||||
* is available to fall back to the older API GetTimeZoneInformation.
|
||||
* If not, directly read the value from registry keys.
|
||||
*/
|
||||
if (dtzi.StandardName[0] == 0) {
|
||||
ret = RegOpenKeyEx(HKEY_LOCAL_MACHINE, WIN_CURRENT_TZ_KEY, 0,
|
||||
KEY_READ, (PHKEY)&hKey);
|
||||
if (ret != ERROR_SUCCESS) {
|
||||
goto err;
|
||||
}
|
||||
|
||||
/*
|
||||
* Determine if auto-daylight time adjustment is turned off.
|
||||
*/
|
||||
valueType = 0;
|
||||
bufSize = sizeof(val);
|
||||
ret = RegQueryValueExA(hKey, "DisableAutoDaylightTimeSet",
|
||||
NULL, &valueType, (LPBYTE) &val, &bufSize);
|
||||
/*
|
||||
* Vista uses the different key name.
|
||||
*/
|
||||
ret = RegQueryValueExA(hKey, "DynamicDaylightTimeDisabled", NULL,
|
||||
&valueType, (LPBYTE) &val, &bufSize);
|
||||
if (ret != ERROR_SUCCESS) {
|
||||
bufSize = sizeof(val);
|
||||
ret = RegQueryValueExA(hKey, "DynamicDaylightTimeDisabled",
|
||||
NULL, &valueType, (LPBYTE) &val, &bufSize);
|
||||
goto err;
|
||||
}
|
||||
|
||||
if (ret == ERROR_SUCCESS) {
|
||||
int daylightSavingsUpdateDisabledOther = val == 1 && tzi.DaylightDate.wMonth != 0;
|
||||
int daylightSavingsUpdateDisabledVista = val == 1;
|
||||
int daylightSavingsUpdateDisabled = isVista ? daylightSavingsUpdateDisabledVista : daylightSavingsUpdateDisabledOther;
|
||||
|
||||
if (daylightSavingsUpdateDisabled) {
|
||||
(void) RegCloseKey(hKey);
|
||||
customZoneName(tzi.Bias, winZoneName);
|
||||
return VALUE_GMTOFFSET;
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* Vista has the key for the current "Time Zones" entry.
|
||||
* Return a custom time zone name if auto-daylight time adjustment
|
||||
* is disabled.
|
||||
*/
|
||||
if (isVista) {
|
||||
valueType = 0;
|
||||
bufSize = MAX_ZONE_CHAR;
|
||||
ret = RegQueryValueExA(hKey, "TimeZoneKeyName", NULL,
|
||||
&valueType, (LPBYTE) winZoneName, &bufSize);
|
||||
if (ret != ERROR_SUCCESS) {
|
||||
goto err;
|
||||
}
|
||||
if (val == 1) {
|
||||
customZoneName(dtzi.Bias, winZoneName);
|
||||
(void) RegCloseKey(hKey);
|
||||
return VALUE_KEY;
|
||||
return VALUE_GMTOFFSET;
|
||||
}
|
||||
|
||||
/*
|
||||
* Win32 problem: If the length of the standard time name is equal
|
||||
* to (or probably longer than) 32 in the registry,
|
||||
* GetTimeZoneInformation() on NT returns a null string as its
|
||||
* standard time name. We need to work around this problem by
|
||||
* getting the same information from the TimeZoneInformation
|
||||
* registry. The function on Win98 seems to return its key name.
|
||||
* We can't do anything in that case.
|
||||
*/
|
||||
if (tzi.StandardName[0] == 0) {
|
||||
bufSize = sizeof(stdNameInReg);
|
||||
ret = getValueInRegistry(hKey, STANDARD_NAME, &valueType,
|
||||
(LPBYTE) stdNameInReg, &bufSize);
|
||||
if (ret != ERROR_SUCCESS) {
|
||||
goto err;
|
||||
}
|
||||
stdNamePtr = stdNameInReg;
|
||||
bufSize = MAX_ZONE_CHAR;
|
||||
ret = RegQueryValueExA(hKey, "TimeZoneKeyName", NULL,
|
||||
&valueType, (LPBYTE) winZoneName, &bufSize);
|
||||
if (ret != ERROR_SUCCESS) {
|
||||
goto err;
|
||||
}
|
||||
(void) RegCloseKey(hKey);
|
||||
}
|
||||
|
||||
/*
|
||||
* Open the "Time Zones" registry.
|
||||
*/
|
||||
ret = RegOpenKeyEx(HKEY_LOCAL_MACHINE, NT_TZ_KEY, 0, KEY_READ, (PHKEY)&hKey);
|
||||
if (ret != ERROR_SUCCESS) {
|
||||
ret = RegOpenKeyEx(HKEY_LOCAL_MACHINE, WIN_TZ_KEY, 0, KEY_READ, (PHKEY)&hKey);
|
||||
return VALUE_KEY;
|
||||
} else {
|
||||
/*
|
||||
* If both failed, then give up.
|
||||
* Fall back to GetTimeZoneInformation
|
||||
*/
|
||||
if (ret != ERROR_SUCCESS) {
|
||||
return VALUE_UNKNOWN;
|
||||
}
|
||||
}
|
||||
TIME_ZONE_INFORMATION tzi;
|
||||
HANDLE hSubKey = NULL;
|
||||
DWORD nSubKeys, i;
|
||||
ULONG valueType;
|
||||
TCHAR subKeyName[MAX_ZONE_CHAR];
|
||||
TCHAR szValue[MAX_ZONE_CHAR];
|
||||
WCHAR stdNameInReg[MAX_ZONE_CHAR];
|
||||
TziValue tempTzi;
|
||||
WCHAR *stdNamePtr = tzi.StandardName;
|
||||
DWORD valueSize;
|
||||
int onlyMapID;
|
||||
|
||||
/*
|
||||
* Get the number of subkeys of the "Time Zones" registry for
|
||||
* enumeration.
|
||||
*/
|
||||
ret = RegQueryInfoKey(hKey, NULL, NULL, NULL, &nSubKeys,
|
||||
NULL, NULL, NULL, NULL, NULL, NULL, NULL);
|
||||
if (ret != ERROR_SUCCESS) {
|
||||
goto err;
|
||||
}
|
||||
|
||||
/*
|
||||
* Compare to the "Std" value of each subkey and find the entry that
|
||||
* matches the current control panel setting.
|
||||
*/
|
||||
onlyMapID = 0;
|
||||
for (i = 0; i < nSubKeys; ++i) {
|
||||
DWORD size = sizeof(subKeyName);
|
||||
ret = RegEnumKeyEx(hKey, i, subKeyName, &size, NULL, NULL, NULL, NULL);
|
||||
if (ret != ERROR_SUCCESS) {
|
||||
goto err;
|
||||
}
|
||||
ret = RegOpenKeyEx(hKey, subKeyName, 0, KEY_READ, (PHKEY)&hSubKey);
|
||||
if (ret != ERROR_SUCCESS) {
|
||||
timeType = GetTimeZoneInformation(&tzi);
|
||||
if (timeType == TIME_ZONE_ID_INVALID) {
|
||||
goto err;
|
||||
}
|
||||
|
||||
size = sizeof(szValue);
|
||||
ret = getValueInRegistry(hSubKey, STD_NAME, &valueType,
|
||||
szValue, &size);
|
||||
if (ret != ERROR_SUCCESS) {
|
||||
ret = RegOpenKeyEx(HKEY_LOCAL_MACHINE, WIN_CURRENT_TZ_KEY, 0,
|
||||
KEY_READ, (PHKEY)&hKey);
|
||||
if (ret == ERROR_SUCCESS) {
|
||||
/*
|
||||
* NT 4.0 SP3 fails here since it doesn't have the "Std"
|
||||
* entry in the Time Zones registry.
|
||||
* Determine if auto-daylight time adjustment is turned off.
|
||||
*/
|
||||
RegCloseKey(hSubKey);
|
||||
onlyMapID = 1;
|
||||
ret = RegOpenKeyExW(hKey, stdNamePtr, 0, KEY_READ, (PHKEY)&hSubKey);
|
||||
bufSize = sizeof(val);
|
||||
ret = RegQueryValueExA(hKey, "DynamicDaylightTimeDisabled", NULL,
|
||||
&valueType, (LPBYTE) &val, &bufSize);
|
||||
if (ret == ERROR_SUCCESS) {
|
||||
if (val == 1 && tzi.DaylightDate.wMonth != 0) {
|
||||
(void) RegCloseKey(hKey);
|
||||
customZoneName(tzi.Bias, winZoneName);
|
||||
return VALUE_GMTOFFSET;
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* Win32 problem: If the length of the standard time name is equal
|
||||
* to (or probably longer than) 32 in the registry,
|
||||
* GetTimeZoneInformation() on NT returns a null string as its
|
||||
* standard time name. We need to work around this problem by
|
||||
* getting the same information from the TimeZoneInformation
|
||||
* registry.
|
||||
*/
|
||||
if (tzi.StandardName[0] == 0) {
|
||||
bufSize = sizeof(stdNameInReg);
|
||||
ret = getValueInRegistry(hKey, STANDARD_NAME, &valueType,
|
||||
(LPBYTE) stdNameInReg, &bufSize);
|
||||
if (ret != ERROR_SUCCESS) {
|
||||
goto err;
|
||||
}
|
||||
stdNamePtr = stdNameInReg;
|
||||
}
|
||||
(void) RegCloseKey(hKey);
|
||||
}
|
||||
|
||||
/*
|
||||
* Open the "Time Zones" registry.
|
||||
*/
|
||||
ret = RegOpenKeyEx(HKEY_LOCAL_MACHINE, NT_TZ_KEY, 0, KEY_READ, (PHKEY)&hKey);
|
||||
if (ret != ERROR_SUCCESS) {
|
||||
ret = RegOpenKeyEx(HKEY_LOCAL_MACHINE, WIN_TZ_KEY, 0, KEY_READ, (PHKEY)&hKey);
|
||||
/*
|
||||
* If both failed, then give up.
|
||||
*/
|
||||
if (ret != ERROR_SUCCESS) {
|
||||
return VALUE_UNKNOWN;
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* Get the number of subkeys of the "Time Zones" registry for
|
||||
* enumeration.
|
||||
*/
|
||||
ret = RegQueryInfoKey(hKey, NULL, NULL, NULL, &nSubKeys,
|
||||
NULL, NULL, NULL, NULL, NULL, NULL, NULL);
|
||||
if (ret != ERROR_SUCCESS) {
|
||||
goto err;
|
||||
}
|
||||
|
||||
/*
|
||||
* Compare to the "Std" value of each subkey and find the entry that
|
||||
* matches the current control panel setting.
|
||||
*/
|
||||
onlyMapID = 0;
|
||||
for (i = 0; i < nSubKeys; ++i) {
|
||||
DWORD size = sizeof(subKeyName);
|
||||
ret = RegEnumKeyEx(hKey, i, subKeyName, &size, NULL, NULL, NULL, NULL);
|
||||
if (ret != ERROR_SUCCESS) {
|
||||
goto err;
|
||||
}
|
||||
ret = RegOpenKeyEx(hKey, subKeyName, 0, KEY_READ, (PHKEY)&hSubKey);
|
||||
if (ret != ERROR_SUCCESS) {
|
||||
goto err;
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
if (wcscmp((WCHAR *)szValue, stdNamePtr) == 0) {
|
||||
/*
|
||||
* Some localized Win32 platforms use a same name to
|
||||
* different time zones. So, we can't rely only on the name
|
||||
* here. We need to check GMT offsets and transition dates
|
||||
* to make sure it's the registry of the current time
|
||||
* zone.
|
||||
*/
|
||||
DWORD tziValueSize = sizeof(tempTzi);
|
||||
ret = RegQueryValueEx(hSubKey, "TZI", NULL, &valueType,
|
||||
(unsigned char *) &tempTzi, &tziValueSize);
|
||||
if (ret == ERROR_SUCCESS) {
|
||||
if ((tzi.Bias != tempTzi.bias) ||
|
||||
(memcmp((const void *) &tzi.StandardDate,
|
||||
(const void *) &tempTzi.stdDate,
|
||||
sizeof(SYSTEMTIME)) != 0)) {
|
||||
goto out;
|
||||
size = sizeof(szValue);
|
||||
ret = getValueInRegistry(hSubKey, STD_NAME, &valueType,
|
||||
szValue, &size);
|
||||
if (ret != ERROR_SUCCESS) {
|
||||
/*
|
||||
* NT 4.0 SP3 fails here since it doesn't have the "Std"
|
||||
* entry in the Time Zones registry.
|
||||
*/
|
||||
RegCloseKey(hSubKey);
|
||||
onlyMapID = 1;
|
||||
ret = RegOpenKeyExW(hKey, stdNamePtr, 0, KEY_READ, (PHKEY)&hSubKey);
|
||||
if (ret != ERROR_SUCCESS) {
|
||||
goto err;
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
if (tzi.DaylightBias != 0) {
|
||||
if ((tzi.DaylightBias != tempTzi.dstBias) ||
|
||||
(memcmp((const void *) &tzi.DaylightDate,
|
||||
(const void *) &tempTzi.dstDate,
|
||||
if (wcscmp((WCHAR *)szValue, stdNamePtr) == 0) {
|
||||
/*
|
||||
* Some localized Win32 platforms use a same name to
|
||||
* different time zones. So, we can't rely only on the name
|
||||
* here. We need to check GMT offsets and transition dates
|
||||
* to make sure it's the registry of the current time
|
||||
* zone.
|
||||
*/
|
||||
DWORD tziValueSize = sizeof(tempTzi);
|
||||
ret = RegQueryValueEx(hSubKey, "TZI", NULL, &valueType,
|
||||
(unsigned char *) &tempTzi, &tziValueSize);
|
||||
if (ret == ERROR_SUCCESS) {
|
||||
if ((tzi.Bias != tempTzi.bias) ||
|
||||
(memcmp((const void *) &tzi.StandardDate,
|
||||
(const void *) &tempTzi.stdDate,
|
||||
sizeof(SYSTEMTIME)) != 0)) {
|
||||
goto out;
|
||||
}
|
||||
|
||||
if (tzi.DaylightBias != 0) {
|
||||
if ((tzi.DaylightBias != tempTzi.dstBias) ||
|
||||
(memcmp((const void *) &tzi.DaylightDate,
|
||||
(const void *) &tempTzi.dstDate,
|
||||
sizeof(SYSTEMTIME)) != 0)) {
|
||||
goto out;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* found matched record, terminate search
|
||||
*/
|
||||
strcpy(winZoneName, subKeyName);
|
||||
break;
|
||||
}
|
||||
|
||||
/*
|
||||
* found matched record, terminate search
|
||||
*/
|
||||
strcpy(winZoneName, subKeyName);
|
||||
break;
|
||||
out:
|
||||
(void) RegCloseKey(hSubKey);
|
||||
}
|
||||
out:
|
||||
(void) RegCloseKey(hSubKey);
|
||||
}
|
||||
|
||||
/*
|
||||
* Get the "MapID" value of the registry to be able to eliminate
|
||||
* duplicated key names later.
|
||||
*/
|
||||
valueSize = MAX_MAPID_LENGTH;
|
||||
ret = RegQueryValueExA(hSubKey, "MapID", NULL, &valueType, winMapID, &valueSize);
|
||||
(void) RegCloseKey(hSubKey);
|
||||
(void) RegCloseKey(hKey);
|
||||
|
||||
if (ret != ERROR_SUCCESS) {
|
||||
/*
|
||||
* Vista doesn't have mapID. VALUE_UNKNOWN should be returned
|
||||
* only for Windows NT.
|
||||
* Get the "MapID" value of the registry to be able to eliminate
|
||||
* duplicated key names later.
|
||||
*/
|
||||
if (onlyMapID == 1) {
|
||||
return VALUE_UNKNOWN;
|
||||
valueSize = MAX_MAPID_LENGTH;
|
||||
ret = RegQueryValueExA(hSubKey, "MapID", NULL, &valueType, winMapID, &valueSize);
|
||||
(void) RegCloseKey(hSubKey);
|
||||
(void) RegCloseKey(hKey);
|
||||
|
||||
if (ret != ERROR_SUCCESS) {
|
||||
/*
|
||||
* Vista doesn't have mapID. VALUE_UNKNOWN should be returned
|
||||
* only for Windows NT.
|
||||
*/
|
||||
if (onlyMapID == 1) {
|
||||
return VALUE_UNKNOWN;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -25,15 +25,16 @@
|
||||
|
||||
package com.apple.laf;
|
||||
|
||||
|
||||
import java.beans.*;
|
||||
import java.io.File;
|
||||
import java.util.*;
|
||||
|
||||
import javax.swing.*;
|
||||
import javax.swing.event.ListDataEvent;
|
||||
import javax.swing.filechooser.FileSystemView;
|
||||
import javax.swing.table.AbstractTableModel;
|
||||
|
||||
import sun.misc.ManagedLocalsThread;
|
||||
/**
|
||||
* NavServices-like implementation of a file Table
|
||||
*
|
||||
@ -42,7 +43,7 @@ import javax.swing.table.AbstractTableModel;
|
||||
@SuppressWarnings("serial") // Superclass is not serializable across versions
|
||||
class AquaFileSystemModel extends AbstractTableModel implements PropertyChangeListener {
|
||||
private final JTable fFileList;
|
||||
private LoadFilesThread loadThread = null;
|
||||
private FilesLoader filesLoader = null;
|
||||
private Vector<File> files = null;
|
||||
|
||||
JFileChooser filechooser = null;
|
||||
@ -141,9 +142,9 @@ class AquaFileSystemModel extends AbstractTableModel implements PropertyChangeLi
|
||||
|
||||
public void runWhenDone(final Runnable runnable){
|
||||
synchronized (fileCacheLock) {
|
||||
if (loadThread != null) {
|
||||
if (loadThread.isAlive()) {
|
||||
loadThread.queuedTasks.add(runnable);
|
||||
if (filesLoader != null) {
|
||||
if (filesLoader.loadThread.isAlive()) {
|
||||
filesLoader.queuedTasks.add(runnable);
|
||||
return;
|
||||
}
|
||||
}
|
||||
@ -160,9 +161,9 @@ class AquaFileSystemModel extends AbstractTableModel implements PropertyChangeLi
|
||||
return;
|
||||
}
|
||||
|
||||
if (loadThread != null) {
|
||||
if (filesLoader != null) {
|
||||
// interrupt
|
||||
loadThread.interrupt();
|
||||
filesLoader.loadThread.interrupt();
|
||||
}
|
||||
|
||||
fetchID++;
|
||||
@ -173,8 +174,7 @@ class AquaFileSystemModel extends AbstractTableModel implements PropertyChangeLi
|
||||
fileCache = new Vector<SortableFile>(50);
|
||||
}
|
||||
|
||||
loadThread = new LoadFilesThread(currentDirectory, fetchID);
|
||||
loadThread.start();
|
||||
filesLoader = new FilesLoader(currentDirectory, fetchID);
|
||||
}
|
||||
|
||||
public int getColumnCount() {
|
||||
@ -373,17 +373,25 @@ class AquaFileSystemModel extends AbstractTableModel implements PropertyChangeLi
|
||||
}
|
||||
}
|
||||
|
||||
class LoadFilesThread extends Thread {
|
||||
Vector<Runnable> queuedTasks = new Vector<Runnable>();
|
||||
class FilesLoader implements Runnable {
|
||||
Vector<Runnable> queuedTasks = new Vector<>();
|
||||
File currentDirectory = null;
|
||||
int fid;
|
||||
Thread loadThread;
|
||||
|
||||
public LoadFilesThread(final File currentDirectory, final int fid) {
|
||||
super("Aqua L&F File Loading Thread");
|
||||
public FilesLoader(final File currentDirectory, final int fid) {
|
||||
this.currentDirectory = currentDirectory;
|
||||
this.fid = fid;
|
||||
String name = "Aqua L&F File Loading Thread";
|
||||
if (System.getSecurityManager() == null) {
|
||||
this.loadThread = new Thread(FilesLoader.this, name);
|
||||
} else {
|
||||
this.loadThread = new ManagedLocalsThread(FilesLoader.this, name);
|
||||
}
|
||||
this.loadThread.start();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void run() {
|
||||
final Vector<DoChangeContents> runnables = new Vector<DoChangeContents>(10);
|
||||
final FileSystemView fileSystem = filechooser.getFileSystemView();
|
||||
@ -415,7 +423,7 @@ class AquaFileSystemModel extends AbstractTableModel implements PropertyChangeLi
|
||||
runnables.addElement(runnable);
|
||||
SwingUtilities.invokeLater(runnable);
|
||||
chunk = new Vector<SortableFile>(10);
|
||||
if (isInterrupted()) {
|
||||
if (loadThread.isInterrupted()) {
|
||||
// interrupted, cancel all runnables
|
||||
cancelRunnables(runnables);
|
||||
return;
|
||||
|
@ -29,6 +29,7 @@ import java.awt.event.*;
|
||||
|
||||
import javax.swing.*;
|
||||
import javax.swing.plaf.ComponentUI;
|
||||
import javax.swing.plaf.basic.BasicScrollPaneUI;
|
||||
|
||||
public class AquaScrollPaneUI extends javax.swing.plaf.basic.BasicScrollPaneUI {
|
||||
public static ComponentUI createUI(final JComponent x) {
|
||||
@ -39,28 +40,9 @@ public class AquaScrollPaneUI extends javax.swing.plaf.basic.BasicScrollPaneUI {
|
||||
return new XYMouseWheelHandler();
|
||||
}
|
||||
|
||||
// This is a grody hack to trick BasicScrollPaneUI into scrolling horizontally
|
||||
// when we notice that the shift key is down. This should be removed when AWT/Swing
|
||||
// becomes aware of multi-axis scroll wheels.
|
||||
protected class XYMouseWheelHandler extends javax.swing.plaf.basic.BasicScrollPaneUI.MouseWheelHandler {
|
||||
protected class XYMouseWheelHandler extends BasicScrollPaneUI.MouseWheelHandler {
|
||||
public void mouseWheelMoved(final MouseWheelEvent e) {
|
||||
JScrollBar vScrollBar = null;
|
||||
boolean wasVisible = false;
|
||||
|
||||
if (e.isShiftDown()) {
|
||||
vScrollBar = scrollpane.getVerticalScrollBar();
|
||||
if (vScrollBar != null) {
|
||||
wasVisible = vScrollBar.isVisible();
|
||||
vScrollBar.setVisible(false);
|
||||
}
|
||||
}
|
||||
|
||||
super.mouseWheelMoved(e);
|
||||
|
||||
if (wasVisible) {
|
||||
vScrollBar.setVisible(true);
|
||||
}
|
||||
|
||||
// Consume the event even when the scrollBar is invisible
|
||||
// see #7124320
|
||||
e.consume();
|
||||
|
@ -42,6 +42,7 @@ import sun.awt.FontConfiguration;
|
||||
import sun.awt.HeadlessToolkit;
|
||||
import sun.awt.util.ThreadGroupUtils;
|
||||
import sun.lwawt.macosx.*;
|
||||
import sun.misc.InnocuousThread;
|
||||
|
||||
public final class CFontManager extends SunFontManager {
|
||||
private static Hashtable<String, Font2D> genericFonts = new Hashtable<String, Font2D>();
|
||||
@ -211,14 +212,18 @@ public final class CFontManager extends SunFontManager {
|
||||
});
|
||||
}
|
||||
};
|
||||
AccessController.doPrivileged(
|
||||
(PrivilegedAction<Void>) () -> {
|
||||
/* The thread must be a member of a thread group
|
||||
* which will not get GCed before VM exit.
|
||||
* Make its parent the top-level thread group.
|
||||
*/
|
||||
ThreadGroup rootTG = ThreadGroupUtils.getRootThreadGroup();
|
||||
fileCloser = new Thread(rootTG, fileCloserRunnable);
|
||||
AccessController.doPrivileged((PrivilegedAction<Void>) () -> {
|
||||
if (System.getSecurityManager() == null) {
|
||||
/* The thread must be a member of a thread group
|
||||
* which will not get GCed before VM exit.
|
||||
* Make its parent the top-level thread group.
|
||||
*/
|
||||
ThreadGroup rootTG = ThreadGroupUtils.getRootThreadGroup();
|
||||
fileCloser = new Thread(rootTG, fileCloserRunnable);
|
||||
} else {
|
||||
/* InnocuousThread is a member of a correct TG by default */
|
||||
fileCloser = new InnocuousThread(fileCloserRunnable);
|
||||
}
|
||||
fileCloser.setContextClassLoader(null);
|
||||
Runtime.getRuntime().addShutdownHook(fileCloser);
|
||||
return null;
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2011, 2013, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2011, 2015, 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
|
||||
@ -132,7 +132,9 @@ final class LWCheckboxPeer
|
||||
@Override
|
||||
public void setState(final boolean state) {
|
||||
synchronized (getDelegateLock()) {
|
||||
getDelegate().getCurrentButton().removeItemListener(this);
|
||||
getDelegate().setSelected(state);
|
||||
getDelegate().getCurrentButton().addItemListener(this);
|
||||
}
|
||||
repaintPeer();
|
||||
}
|
||||
|
@ -35,6 +35,7 @@ import java.security.*;
|
||||
import java.util.*;
|
||||
|
||||
import sun.awt.*;
|
||||
import sun.misc.InnocuousThread;
|
||||
import sun.print.*;
|
||||
import sun.awt.util.ThreadGroupUtils;
|
||||
|
||||
@ -71,22 +72,32 @@ public abstract class LWToolkit extends SunToolkit implements Runnable {
|
||||
*/
|
||||
protected final void init() {
|
||||
AWTAutoShutdown.notifyToolkitThreadBusy();
|
||||
|
||||
ThreadGroup rootTG = AccessController.doPrivileged(
|
||||
(PrivilegedAction<ThreadGroup>) ThreadGroupUtils::getRootThreadGroup);
|
||||
|
||||
Runtime.getRuntime().addShutdownHook(
|
||||
new Thread(rootTG, () -> {
|
||||
AccessController.doPrivileged((PrivilegedAction<Void>) () -> {
|
||||
Runnable shutdownRunnable = () -> {
|
||||
shutdown();
|
||||
waitForRunState(STATE_CLEANUP);
|
||||
})
|
||||
);
|
||||
|
||||
Thread toolkitThread = new Thread(rootTG, this, "AWT-LW");
|
||||
toolkitThread.setDaemon(true);
|
||||
toolkitThread.setPriority(Thread.NORM_PRIORITY + 1);
|
||||
toolkitThread.start();
|
||||
};
|
||||
Thread shutdown;
|
||||
if (System.getSecurityManager() == null) {
|
||||
shutdown = new Thread(ThreadGroupUtils.getRootThreadGroup(), shutdownRunnable);
|
||||
} else {
|
||||
shutdown = new InnocuousThread(shutdownRunnable);
|
||||
}
|
||||
shutdown.setContextClassLoader(null);
|
||||
Runtime.getRuntime().addShutdownHook(shutdown);
|
||||
|
||||
String name = "AWT-LW";
|
||||
Thread toolkitThread;
|
||||
if (System.getSecurityManager() == null) {
|
||||
toolkitThread = new Thread(ThreadGroupUtils.getRootThreadGroup(), LWToolkit.this, name);
|
||||
} else {
|
||||
toolkitThread = new InnocuousThread(LWToolkit.this, name);
|
||||
}
|
||||
toolkitThread.setDaemon(true);
|
||||
toolkitThread.setPriority(Thread.NORM_PRIORITY + 1);
|
||||
toolkitThread.start();
|
||||
return null;
|
||||
});
|
||||
waitForRunState(STATE_MESSAGELOOP);
|
||||
}
|
||||
|
||||
|
@ -1296,6 +1296,12 @@ public class LWWindowPeer
|
||||
}
|
||||
|
||||
KeyboardFocusManagerPeer kfmPeer = LWKeyboardFocusManagerPeer.getInstance();
|
||||
|
||||
if (!becomesFocused && kfmPeer.getCurrentFocusedWindow() != getTarget()) {
|
||||
// late window focus lost event - ingoring
|
||||
return;
|
||||
}
|
||||
|
||||
kfmPeer.setCurrentFocusedWindow(becomesFocused ? getTarget() : null);
|
||||
|
||||
int eventID = becomesFocused ? WindowEvent.WINDOW_GAINED_FOCUS : WindowEvent.WINDOW_LOST_FOCUS;
|
||||
|
@ -56,6 +56,18 @@ final class CClipboard extends SunClipboard {
|
||||
// Leaving Empty, as WClipboard.clearNativeContext is empty as well.
|
||||
}
|
||||
|
||||
@Override
|
||||
public synchronized Transferable getContents(Object requestor) {
|
||||
checkPasteboardAndNotify();
|
||||
return super.getContents(requestor);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected synchronized Transferable getContextContents() {
|
||||
checkPasteboardAndNotify();
|
||||
return super.getContextContents();
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void setContentsNative(Transferable contents) {
|
||||
FlavorTable flavorMap = getDefaultFlavorTable();
|
||||
@ -116,13 +128,20 @@ final class CClipboard extends SunClipboard {
|
||||
private native void declareTypes(long[] formats, SunClipboard newOwner);
|
||||
private native void setData(byte[] data, long format);
|
||||
|
||||
void checkPasteboardAndNotify() {
|
||||
if (checkPasteboardWithoutNotification()) {
|
||||
notifyChanged();
|
||||
lostOwnershipNow(null);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Invokes native check whether a change count on the general pasteboard is different
|
||||
* than when we set it. The different count value means the current owner lost
|
||||
* pasteboard ownership and someone else put data on the clipboard.
|
||||
* @since 1.7
|
||||
*/
|
||||
native void checkPasteboard();
|
||||
native boolean checkPasteboardWithoutNotification();
|
||||
|
||||
/*** Native Callbacks ***/
|
||||
private void notifyLostOwnership() {
|
||||
|
@ -31,7 +31,6 @@ import java.awt.datatransfer.*;
|
||||
import java.awt.dnd.*;
|
||||
import java.awt.event.*;
|
||||
import java.awt.image.*;
|
||||
import java.awt.peer.*;
|
||||
|
||||
import javax.swing.*;
|
||||
import javax.swing.text.*;
|
||||
@ -44,6 +43,7 @@ import sun.awt.dnd.*;
|
||||
import sun.lwawt.LWComponentPeer;
|
||||
import sun.lwawt.LWWindowPeer;
|
||||
import sun.lwawt.PlatformWindow;
|
||||
import sun.misc.ManagedLocalsThread;
|
||||
|
||||
|
||||
public final class CDragSourceContextPeer extends SunDragSourceContextPeer {
|
||||
@ -164,28 +164,29 @@ public final class CDragSourceContextPeer extends SunDragSourceContextPeer {
|
||||
// are posted during dragging by native event handlers.
|
||||
|
||||
try {
|
||||
Thread dragThread = new Thread() {
|
||||
public void run() {
|
||||
final long nativeDragSource = getNativeContext();
|
||||
try {
|
||||
doDragging(nativeDragSource);
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
} finally {
|
||||
releaseNativeDragSource(nativeDragSource);
|
||||
fDragImage = null;
|
||||
if (fDragCImage != null) {
|
||||
fDragCImage.dispose();
|
||||
fDragCImage = null;
|
||||
}
|
||||
Runnable dragRunnable = () -> {
|
||||
final long nativeDragSource = getNativeContext();
|
||||
try {
|
||||
doDragging(nativeDragSource);
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
} finally {
|
||||
releaseNativeDragSource(nativeDragSource);
|
||||
fDragImage = null;
|
||||
if (fDragCImage != null) {
|
||||
fDragCImage.dispose();
|
||||
fDragCImage = null;
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
Thread dragThread;
|
||||
if (System.getSecurityManager() == null) {
|
||||
dragThread = new Thread(dragRunnable);
|
||||
} else {
|
||||
dragThread = new ManagedLocalsThread(dragRunnable);
|
||||
}
|
||||
dragThread.start();
|
||||
}
|
||||
|
||||
catch (Exception e) {
|
||||
} catch (Exception e) {
|
||||
final long nativeDragSource = getNativeContext();
|
||||
setNativeContext(0);
|
||||
releaseNativeDragSource(nativeDragSource);
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
x
Reference in New Issue
Block a user