Merge
This commit is contained in:
commit
82040f1fb3
2
.hgtags
2
.hgtags
@ -449,3 +449,5 @@ a85884d55ce32799f5c7382b7ea4839052b362a2 jdk-10+21
|
||||
e5357aa85dadacc6562175ff74714fecfb4470cf jdk-10+22
|
||||
22850b3a55240253841b9a425ad60a7fcdb22d47 jdk-10+23
|
||||
3b201865d5c1f244f555cad58da599c9261286d8 jdk-10+24
|
||||
8eb5e3ccee560c28ac9b1df2670adac2b3d36fad jdk-10+25
|
||||
1129253d3bc728a2963ba411ab9dd1adf358fb6b jdk-10+26
|
||||
|
@ -28,8 +28,8 @@
|
||||
mydir="$(dirname "${BASH_SOURCE[0]}")"
|
||||
myname="$(basename "${BASH_SOURCE[0]}")"
|
||||
|
||||
installed_jib_script=${mydir}/../../.jib/jib
|
||||
install_data=${mydir}/../../.jib/.data
|
||||
installed_jib_script=${mydir}/../.jib/jib
|
||||
install_data=${mydir}/../.jib/.data
|
||||
|
||||
setup_url() {
|
||||
if [ -f ~/.config/jib/jib.conf ]; then
|
||||
@ -42,7 +42,7 @@ setup_url() {
|
||||
jib_revision="2.0-SNAPSHOT"
|
||||
jib_ext="jib.sh.gz"
|
||||
|
||||
closed_script="${mydir}/../../../closed/conf/jib-install.conf"
|
||||
closed_script="${mydir}/../../closed/make/conf/jib-install.conf"
|
||||
if [ -f "${closed_script}" ]; then
|
||||
source "${closed_script}"
|
||||
fi
|
||||
|
@ -127,7 +127,7 @@ scripting language.</span></p>
|
||||
<hr>
|
||||
<span><a name="package" id="package"></a></span>
|
||||
<h2><span>Scripting Package</span></h2>
|
||||
<p><span>The Java Scripting functionality is in the <code><a href="http://docs.oracle.com/javase/6/docs/api/javax/script/package-summary.html">javax.script</a></code>
|
||||
<p><span>The Java Scripting functionality is in the <code><a href="http://docs.oracle.com/javase/9/docs/api/javax/script/package-summary.html">javax.script</a></code>
|
||||
package. This is a relatively small, simple API. The starting point
|
||||
of the scripting API is the <code>ScriptEngineManager</code> class.
|
||||
A ScriptEngineManager object can discover script engines through
|
||||
|
@ -40,7 +40,7 @@ ifeq ($(OPENJDK_BUILD_OS), windows)
|
||||
endif
|
||||
|
||||
# Hook to include the corresponding custom file, if present.
|
||||
$(eval $(call IncludeCustomExtension, , Bundles-pre.gmk))
|
||||
$(eval $(call IncludeCustomExtension, Bundles-pre.gmk))
|
||||
################################################################################
|
||||
# BUNDLE : Name of bundle to create
|
||||
# FILES : Files in BASE_DIRS to add to bundle
|
||||
@ -322,7 +322,7 @@ endif
|
||||
################################################################################
|
||||
|
||||
# Hook to include the corresponding custom file, if present.
|
||||
$(eval $(call IncludeCustomExtension, , Bundles.gmk))
|
||||
$(eval $(call IncludeCustomExtension, Bundles.gmk))
|
||||
|
||||
################################################################################
|
||||
|
||||
|
@ -303,7 +303,7 @@ endif
|
||||
|
||||
################################################################################
|
||||
# Hook to include the corresponding custom file, if present.
|
||||
$(eval $(call IncludeCustomExtension, , CompileDemos.gmk))
|
||||
$(eval $(call IncludeCustomExtension, CompileDemos.gmk))
|
||||
|
||||
all: $(TARGETS)
|
||||
images: $(IMAGES_TARGETS)
|
||||
|
@ -33,7 +33,7 @@ include JavaCompilation.gmk
|
||||
include SetupJavaCompilers.gmk
|
||||
|
||||
# Hook to include the corresponding custom file, if present.
|
||||
$(eval $(call IncludeCustomExtension, , CompileJavaModules.gmk))
|
||||
$(eval $(call IncludeCustomExtension, CompileJavaModules.gmk))
|
||||
|
||||
################################################################################
|
||||
# Module specific build settings
|
||||
@ -689,7 +689,7 @@ endif
|
||||
|
||||
################################################################################
|
||||
|
||||
$(eval $(call IncludeCustomExtension, , CompileJavaModules-post.gmk))
|
||||
$(eval $(call IncludeCustomExtension, CompileJavaModules-post.gmk))
|
||||
|
||||
################################################################################
|
||||
|
||||
|
@ -35,7 +35,7 @@ include SetupJavaCompilers.gmk
|
||||
TARGETS :=
|
||||
|
||||
# Hook to include the corresponding custom file, if present.
|
||||
$(eval $(call IncludeCustomExtension, , hotspot/CompileTools.gmk))
|
||||
$(eval $(call IncludeCustomExtension, hotspot/CompileTools.gmk))
|
||||
|
||||
ifeq ($(INCLUDE_GRAAL), true)
|
||||
VM_CI_SRC_DIR := $(TOPDIR)/src/jdk.internal.vm.ci/share/classes
|
||||
|
@ -32,7 +32,7 @@ include SetupJavaCompilers.gmk
|
||||
|
||||
################################################################################
|
||||
|
||||
$(eval $(call IncludeCustomExtension, , CompileTools.gmk))
|
||||
$(eval $(call IncludeCustomExtension, CompileTools.gmk))
|
||||
|
||||
################################################################################
|
||||
|
||||
|
@ -37,7 +37,7 @@ $(eval $(call ReadImportMetaData))
|
||||
|
||||
################################################################################
|
||||
# Hook to include the corresponding custom file, if present.
|
||||
$(eval $(call IncludeCustomExtension, , Docs.gmk))
|
||||
$(eval $(call IncludeCustomExtension, Docs.gmk))
|
||||
|
||||
################################################################################
|
||||
# This file generates all documentation for OpenJDK.
|
||||
|
@ -34,7 +34,7 @@ JDK_TARGETS :=
|
||||
JRE_TARGETS :=
|
||||
|
||||
# Hook to include the corresponding custom file, if present.
|
||||
$(eval $(call IncludeCustomExtension, , Images-pre.gmk))
|
||||
$(eval $(call IncludeCustomExtension, Images-pre.gmk))
|
||||
|
||||
############################################################################
|
||||
|
||||
@ -426,7 +426,7 @@ $(call SetupCopyDebuginfo,JRE)
|
||||
|
||||
# Include custom post hook here to make it possible to augment the target lists
|
||||
# before actual target prerequisites are declared.
|
||||
$(eval $(call IncludeCustomExtension, , Images-post.gmk))
|
||||
$(eval $(call IncludeCustomExtension, Images-post.gmk))
|
||||
|
||||
################################################################################
|
||||
|
||||
|
@ -137,15 +137,16 @@ ifeq ($(HAS_SPEC),)
|
||||
|
||||
# The spec files depend on the autoconf source code. This check makes sure
|
||||
# the configuration is up to date after changes to configure.
|
||||
CUSTOM_CONFIG_DIR ?= $(topdir)/closed/autoconf
|
||||
|
||||
$(SPECS): $(wildcard $(topdir)/common/autoconf/*) $(wildcard $(CUSTOM_CONFIG_DIR)/*)
|
||||
$(SPECS): $(wildcard $(topdir)/make/autoconf/*) \
|
||||
$(if $(CUSTOM_CONFIG_DIR), $(wildcard $(CUSTOM_CONFIG_DIR)/*))
|
||||
ifeq ($(CONF_CHECK), fail)
|
||||
@echo "Error: The configuration is not up to date for '$(lastword $(subst /, , $(dir $@)))'."
|
||||
@echo Error: The configuration is not up to date for \
|
||||
"'$(lastword $(subst /, , $(dir $@)))'."
|
||||
$(call PrintConfCheckFailed)
|
||||
@exit 2
|
||||
else ifeq ($(CONF_CHECK), auto)
|
||||
@echo "Note: The configuration is not up to date for '$(lastword $(subst /, , $(dir $@)))'."
|
||||
@echo Note: The configuration is not up to date for \
|
||||
"'$(lastword $(subst /, , $(dir $@)))'."
|
||||
@( cd $(topdir) && \
|
||||
$(MAKE) $(MFLAGS) $(MAKE_LOG_FLAGS) -r -R -f $(topdir)/make/Init.gmk \
|
||||
SPEC=$@ HAS_SPEC=true ACTUAL_TOPDIR=$(topdir) \
|
||||
@ -266,6 +267,7 @@ else # HAS_SPEC=true
|
||||
$(ECHO) "Re-running configure using default settings"
|
||||
endif
|
||||
( cd $(OUTPUTDIR) && PATH="$(ORIGINAL_PATH)" \
|
||||
CUSTOM_CONFIG_DIR="$(CUSTOM_CONFIG_DIR)" \
|
||||
$(BASH) $(CONFIGURE_CMD) $(CONFIGURE_COMMAND_LINE) )
|
||||
|
||||
##############################################################################
|
||||
|
@ -35,8 +35,9 @@ _INITSUPPORT_GMK := 1
|
||||
ifeq ($(HAS_SPEC),)
|
||||
|
||||
# Include the corresponding closed file, if present.
|
||||
# Normal hook mechanism cannot be used since we have no SPEC.
|
||||
-include $(topdir)/closed/make/InitSupport.gmk
|
||||
ifneq ($(CUSTOM_MAKE_DIR), )
|
||||
-include $(CUSTOM_MAKE_DIR)/InitSupport.gmk
|
||||
endif
|
||||
|
||||
##############################################################################
|
||||
# Helper functions for the initial part of Init.gmk, before the spec file is
|
||||
|
@ -104,4 +104,4 @@ ALL_TARGETS += jprt_bundle
|
||||
|
||||
################################################################################
|
||||
|
||||
$(eval $(call IncludeCustomExtension, , Jprt.gmk))
|
||||
$(eval $(call IncludeCustomExtension, Jprt.gmk))
|
||||
|
@ -51,7 +51,7 @@ include $(TOPDIR)/make/common/FindTests.gmk
|
||||
ALL_TARGETS :=
|
||||
|
||||
# Hook to include the corresponding custom file, if present.
|
||||
$(eval $(call IncludeCustomExtension, , Main.gmk))
|
||||
$(eval $(call IncludeCustomExtension, Main.gmk))
|
||||
|
||||
# All modules for the current target platform.
|
||||
ALL_MODULES := $(call FindAllModules)
|
||||
|
@ -80,7 +80,7 @@ TARGETS += $(BASE_RELEASE_FILE)
|
||||
|
||||
################################################################################
|
||||
|
||||
$(eval $(call IncludeCustomExtension, , ReleaseFile.gmk))
|
||||
$(eval $(call IncludeCustomExtension, ReleaseFile.gmk))
|
||||
|
||||
################################################################################
|
||||
|
||||
|
@ -36,7 +36,7 @@ include FindTests.gmk
|
||||
JTREG_TEST_TOPDIRS := $(TOPDIR) $(JTREG_TESTROOTS)
|
||||
|
||||
# Hook to include the corresponding custom file, if present.
|
||||
$(eval $(call IncludeCustomExtension, , RunTests.gmk))
|
||||
$(eval $(call IncludeCustomExtension, RunTests.gmk))
|
||||
|
||||
TEST_RESULTS_DIR := $(OUTPUTDIR)/test-results
|
||||
TEST_SUPPORT_DIR := $(OUTPUTDIR)/test-support
|
||||
|
@ -28,7 +28,7 @@ default: all
|
||||
include $(SPEC)
|
||||
include MakeBase.gmk
|
||||
|
||||
$(eval $(call IncludeCustomExtension, , SourceRevision.gmk))
|
||||
$(eval $(call IncludeCustomExtension, SourceRevision.gmk))
|
||||
|
||||
################################################################################
|
||||
# Keep track of what source revision is used to create the build, by creating
|
||||
|
@ -29,7 +29,7 @@ _TOOLS_GMK := 1
|
||||
include JavaCompilation.gmk
|
||||
|
||||
# Hook to include the corresponding custom file, if present.
|
||||
$(eval $(call IncludeCustomExtension, , Tools.gmk))
|
||||
$(eval $(call IncludeCustomExtension, Tools.gmk))
|
||||
|
||||
################################################################################
|
||||
# To avoid reevaluating the compilation setup for the tools each time this file
|
||||
|
@ -63,7 +63,7 @@ TARGETS += $(testing)
|
||||
|
||||
################################################################################
|
||||
|
||||
$(eval $(call IncludeCustomExtension, , UpdateBuildDocs.gmk))
|
||||
$(eval $(call IncludeCustomExtension, UpdateBuildDocs.gmk))
|
||||
|
||||
################################################################################
|
||||
|
||||
|
@ -33,7 +33,7 @@ include Modules.gmk
|
||||
SRC_ZIP_WORK_DIR := $(SUPPORT_OUTPUTDIR)/src
|
||||
|
||||
# Hook to include the corresponding custom file, if present.
|
||||
$(eval $(call IncludeCustomExtension, , ZipSource.gmk))
|
||||
$(eval $(call IncludeCustomExtension, ZipSource.gmk))
|
||||
|
||||
################################################################################
|
||||
# Create the directory structure for src.zip using symlinks.
|
||||
|
@ -1,6 +1,6 @@
|
||||
#!/bin/bash
|
||||
#
|
||||
# Copyright (c) 2011, 2014, Oracle and/or its affiliates. All rights reserved.
|
||||
# Copyright (c) 2011, 2017, Oracle and/or its affiliates. All rights reserved.
|
||||
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
#
|
||||
# This code is free software; you can redistribute it and/or modify it
|
||||
@ -52,15 +52,6 @@ else
|
||||
TIMESTAMP=`date +%s`
|
||||
fi
|
||||
|
||||
if test "x$CUSTOM_CONFIG_DIR" = "x"; then
|
||||
topdir=`cd $script_dir/../.. >/dev/null && pwd`
|
||||
custom_script_dir="$topdir/closed/autoconf"
|
||||
else
|
||||
custom_script_dir=$CUSTOM_CONFIG_DIR
|
||||
fi
|
||||
|
||||
custom_hook=$custom_script_dir/custom-hook.m4
|
||||
|
||||
AUTOCONF="`which autoconf 2> /dev/null | grep -v '^no autoconf in'`"
|
||||
|
||||
if test "x${AUTOCONF}" = x; then
|
||||
@ -75,11 +66,16 @@ echo "Using autoconf at ${AUTOCONF} [$autoconf_version]"
|
||||
echo "Generating generated-configure.sh"
|
||||
generate_configure_script "$script_dir/generated-configure.sh" 'cat'
|
||||
|
||||
if test -e $custom_hook; then
|
||||
if test "x$CUSTOM_CONFIG_DIR" != "x"; then
|
||||
custom_hook=$CUSTOM_CONFIG_DIR/custom-hook.m4
|
||||
if test ! -e $custom_hook; then
|
||||
echo "CUSTOM_CONFIG_DIR set but $CUSTOM_CONFIG_DIR/custom-hook.m4 not present"
|
||||
echo "Error: Cannot continue" 1>&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# We have custom sources available; also generate configure script
|
||||
# with custom hooks compiled in.
|
||||
echo "Generating custom generated-configure.sh"
|
||||
generate_configure_script "$custom_script_dir/generated-configure.sh" 'sed -e "s|#CUSTOM_AUTOCONF_INCLUDE|m4_include([$custom_hook])|"'
|
||||
else
|
||||
echo "(No custom hook found at $custom_hook)"
|
||||
generate_configure_script "$CUSTOM_CONFIG_DIR/generated-configure.sh" 'sed -e "s|#CUSTOM_AUTOCONF_INCLUDE|m4_include([$custom_hook])|"'
|
||||
fi
|
||||
|
32
make/autoconf/configure
vendored
32
make/autoconf/configure
vendored
@ -1,6 +1,6 @@
|
||||
#!/bin/bash
|
||||
#
|
||||
# Copyright (c) 2012, 2016, Oracle and/or its affiliates. All rights reserved.
|
||||
# Copyright (c) 2012, 2017, Oracle and/or its affiliates. All rights reserved.
|
||||
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
#
|
||||
# This code is free software; you can redistribute it and/or modify it
|
||||
@ -46,10 +46,12 @@ export _as_can_reexec=no
|
||||
|
||||
conf_script_dir="$TOPDIR/make/autoconf"
|
||||
|
||||
if [ "$CUSTOM_CONFIG_DIR" = "" ]; then
|
||||
conf_custom_script_dir="$TOPDIR/closed/autoconf"
|
||||
else
|
||||
conf_custom_script_dir="$CUSTOM_CONFIG_DIR"
|
||||
if test "x$CUSTOM_CONFIG_DIR" != x; then
|
||||
if test ! -e $CUSTOM_CONFIG_DIR/generated-configure.sh; then
|
||||
echo "CUSTOM_CONFIG_DIR not pointing to a proper custom config dir."
|
||||
echo "Error: Cannot continue" 1>&2
|
||||
exit 1
|
||||
fi
|
||||
fi
|
||||
|
||||
###
|
||||
@ -76,10 +78,10 @@ check_autoconf_timestamps() {
|
||||
fi
|
||||
done
|
||||
|
||||
if test -e $conf_custom_script_dir/generated-configure.sh; then
|
||||
if test "x$CUSTOM_CONFIG_DIR" != x; then
|
||||
# If custom source configure is available, make sure it is up-to-date as well.
|
||||
for file in $conf_script_dir/configure.ac $conf_script_dir/*.m4 $conf_custom_script_dir/*.m4; do
|
||||
if test $file -nt $conf_custom_script_dir/generated-configure.sh; then
|
||||
for file in $conf_script_dir/configure.ac $conf_script_dir/*.m4 $CUSTOM_CONFIG_DIR/*.m4; do
|
||||
if test $file -nt $CUSTOM_CONFIG_DIR/generated-configure.sh; then
|
||||
echo "Warning: The configure source files is newer than the custom generated files."
|
||||
run_autogen_or_fail
|
||||
fi
|
||||
@ -93,11 +95,9 @@ check_hg_updates() {
|
||||
if test "x$conf_updated_autoconf_files" != x; then
|
||||
echo "Configure source code has been updated, checking time stamps"
|
||||
check_autoconf_timestamps
|
||||
fi
|
||||
|
||||
if test -e $conf_custom_script_dir; then
|
||||
elif test "x$CUSTOM_CONFIG_DIR" != x; then
|
||||
# If custom source configure is available, make sure it is up-to-date as well.
|
||||
conf_custom_updated_autoconf_files=`cd $conf_custom_script_dir && hg status -mard 2> /dev/null | grep autoconf`
|
||||
conf_custom_updated_autoconf_files=`cd $CUSTOM_CONFIG_DIR && hg status -mard 2> /dev/null | grep autoconf`
|
||||
if test "x$conf_custom_updated_autoconf_files" != x; then
|
||||
echo "Configure custom source code has been updated, checking time stamps"
|
||||
check_autoconf_timestamps
|
||||
@ -109,11 +109,11 @@ check_hg_updates() {
|
||||
# Check for local changes
|
||||
check_hg_updates
|
||||
|
||||
if test -e $conf_custom_script_dir/generated-configure.sh; then
|
||||
if test "x$CUSTOM_CONFIG_DIR" != x; then
|
||||
# Test if open configure is newer than custom configure, if so, custom needs to
|
||||
# be regenerated. This test is required to ensure consistency with custom source.
|
||||
conf_open_configure_timestamp=`grep DATE_WHEN_GENERATED= $conf_script_dir/generated-configure.sh | cut -d"=" -f 2`
|
||||
conf_custom_configure_timestamp=`grep DATE_WHEN_GENERATED= $conf_custom_script_dir/generated-configure.sh | cut -d"=" -f 2`
|
||||
conf_custom_configure_timestamp=`grep DATE_WHEN_GENERATED= $CUSTOM_CONFIG_DIR/generated-configure.sh | cut -d"=" -f 2`
|
||||
if test $conf_open_configure_timestamp -gt $conf_custom_configure_timestamp; then
|
||||
echo "Warning: The generated configure file contains changes not present in the custom generated file."
|
||||
run_autogen_or_fail
|
||||
@ -241,10 +241,10 @@ conf_processed_arguments=("--enable-option-checking=fatal" "${conf_processed_arg
|
||||
###
|
||||
### Call the configure script
|
||||
###
|
||||
if test -e $conf_custom_script_dir/generated-configure.sh; then
|
||||
if test "x$CUSTOM_CONFIG_DIR" != x; then
|
||||
# Custom source configure available; run that instead
|
||||
echo "Running custom generated-configure.sh"
|
||||
conf_script_to_run=$conf_custom_script_dir/generated-configure.sh
|
||||
conf_script_to_run=$CUSTOM_CONFIG_DIR/generated-configure.sh
|
||||
else
|
||||
echo "Running generated-configure.sh"
|
||||
conf_script_to_run=$conf_script_dir/generated-configure.sh
|
||||
|
@ -847,9 +847,8 @@ CONFIGURE_CMD := $(TOPDIR)/configure
|
||||
# This macro is called to allow inclusion of closed source counterparts.
|
||||
# Unless overridden in closed sources, it expands to nothing.
|
||||
# Usage: This function is called in an open makefile, with the following
|
||||
# arguments:
|
||||
# $1 the name of the repo, or empty if the top-level repo.
|
||||
# $2 the name of the makefile
|
||||
# argument:
|
||||
# $1 the name of the makefile
|
||||
define IncludeCustomExtension
|
||||
endef
|
||||
|
||||
|
@ -27,7 +27,7 @@ ifndef _FIND_TESTS_GMK
|
||||
_FIND_TESTS_GMK := 1
|
||||
|
||||
# Hook to include the corresponding custom file, if present.
|
||||
$(eval $(call IncludeCustomExtension, , common/FindTests.gmk))
|
||||
$(eval $(call IncludeCustomExtension, common/FindTests.gmk))
|
||||
|
||||
# JTREG_TESTROOTS might have been set by a custom extension
|
||||
JTREG_TESTROOTS += $(addprefix $(TOPDIR)/test/, hotspot/jtreg jdk langtools nashorn jaxp)
|
||||
|
@ -991,6 +991,6 @@ ColonList = \
|
||||
################################################################################
|
||||
|
||||
# Hook to include the corresponding custom file, if present.
|
||||
$(eval $(call IncludeCustomExtension, , common/MakeBase.gmk))
|
||||
$(eval $(call IncludeCustomExtension, common/MakeBase.gmk))
|
||||
|
||||
endif # _MAKEBASE_GMK
|
||||
|
@ -43,7 +43,7 @@ AGGREGATOR_MODULES :=
|
||||
DOCS_MODULES :=
|
||||
|
||||
# Hook to include the corresponding custom file, if present.
|
||||
$(eval $(call IncludeCustomExtension, , common/Modules.gmk))
|
||||
$(eval $(call IncludeCustomExtension, common/Modules.gmk))
|
||||
|
||||
BOOT_MODULES += \
|
||||
java.base \
|
||||
|
@ -900,6 +900,45 @@ var getJibProfilesProfiles = function (input, common, data) {
|
||||
}
|
||||
},
|
||||
|
||||
"windows-x64-open": {
|
||||
artifacts: {
|
||||
jdk: {
|
||||
local: "bundles/\\(jdk.*bin.tar.gz\\)",
|
||||
remote: [
|
||||
"bundles/openjdk/GPL/windows-x64/jdk-" + data.version
|
||||
+ "_windows-x64_bin.tar.gz",
|
||||
"bundles/openjdk/GPL/windows-x64/\\1"
|
||||
],
|
||||
subdir: "jdk-" + data.version
|
||||
},
|
||||
jre: {
|
||||
local: "bundles/\\(jre.*bin.tar.gz\\)",
|
||||
remote: "bundles/openjdk/GPL/windows-x64/\\1"
|
||||
},
|
||||
test: {
|
||||
local: "bundles/\\(jdk.*bin-tests.tar.gz\\)",
|
||||
remote: [
|
||||
"bundles/openjdk/GPL/windows-x64/jdk-" + data.version
|
||||
+ "_windows-x64_bin-tests.tar.gz",
|
||||
"bundles/openjdk/GPL/windows-x64/\\1"
|
||||
]
|
||||
},
|
||||
jdk_symbols: {
|
||||
local: "bundles/\\(jdk.*bin-symbols.tar.gz\\)",
|
||||
remote: [
|
||||
"bundles/openjdk/GPL/windows-x64/jdk-" + data.version
|
||||
+ "_windows-x64_bin-symbols.tar.gz",
|
||||
"bundles/openjdk/GPL/windows-x64/\\1"
|
||||
],
|
||||
subdir: "jdk-" + data.version
|
||||
},
|
||||
jre_symbols: {
|
||||
local: "bundles/\\(jre.*bin-symbols.tar.gz\\)",
|
||||
remote: "bundles/openjdk/GPL/windows-x64/\\1",
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
"linux-x86-open-debug": {
|
||||
artifacts: {
|
||||
jdk: {
|
||||
@ -929,9 +968,10 @@ var getJibProfilesProfiles = function (input, common, data) {
|
||||
profiles["linux-x86-ri-debug"] = clone(profiles["linux-x86-open-debug"]);
|
||||
profiles["macosx-x64-ri"] = clone(profiles["macosx-x64-open"]);
|
||||
profiles["windows-x86-ri"] = clone(profiles["windows-x86-open"]);
|
||||
profiles["windows-x64-ri"] = clone(profiles["windows-x64-open"]);
|
||||
|
||||
// Generate artifacts for ri profiles
|
||||
[ "linux-x64-ri", "linux-x86-ri", "linux-x86-ri-debug", "macosx-x64-ri", "windows-x86-ri" ]
|
||||
[ "linux-x64-ri", "linux-x86-ri", "linux-x86-ri-debug", "macosx-x64-ri", "windows-x86-ri", "windows-x64-ri" ]
|
||||
.forEach(function (name) {
|
||||
// Rewrite all remote dirs to "bundles/openjdk/BCL/..."
|
||||
for (artifactName in profiles[name].artifacts) {
|
||||
@ -947,6 +987,11 @@ var getJibProfilesProfiles = function (input, common, data) {
|
||||
configure_args: "--with-freetype-license="
|
||||
+ input.get("freetype", "install_path")
|
||||
+ "/freetype-2.7.1-v120-x86/freetype.md"
|
||||
},
|
||||
"windows-x64-ri": {
|
||||
configure_args: "--with-freetype-license="
|
||||
+ input.get("freetype", "install_path")
|
||||
+ "/freetype-2.7.1-v120-x64/freetype.md"
|
||||
}
|
||||
};
|
||||
profiles = concatObjects(profiles, profilesRiFreetype);
|
||||
|
@ -25,7 +25,7 @@
|
||||
|
||||
include CopyCommon.gmk
|
||||
|
||||
$(eval $(call IncludeCustomExtension, , copy/Copy-java.base.gmk))
|
||||
$(eval $(call IncludeCustomExtension, copy/Copy-java.base.gmk))
|
||||
|
||||
################################################################################
|
||||
#
|
||||
|
@ -25,7 +25,7 @@
|
||||
|
||||
include CopyCommon.gmk
|
||||
|
||||
$(eval $(call IncludeCustomExtension, , copy/Copy-java.desktop.gmk))
|
||||
$(eval $(call IncludeCustomExtension, copy/Copy-java.desktop.gmk))
|
||||
|
||||
################################################################################
|
||||
|
||||
|
@ -26,7 +26,7 @@
|
||||
include GendataCommon.gmk
|
||||
|
||||
# Hook to include the corresponding custom file, if present.
|
||||
$(eval $(call IncludeCustomExtension, , gendata/Gendata-java.base.gmk))
|
||||
$(eval $(call IncludeCustomExtension, gendata/Gendata-java.base.gmk))
|
||||
|
||||
include GendataBreakIterator.gmk
|
||||
|
||||
|
@ -23,7 +23,7 @@
|
||||
# questions.
|
||||
#
|
||||
|
||||
$(eval $(call IncludeCustomExtension, , gendata/GendataBlacklistedCerts.gmk))
|
||||
$(eval $(call IncludeCustomExtension, gendata/GendataBlacklistedCerts.gmk))
|
||||
|
||||
GENDATA_BLACKLISTED_CERTS_SRC += $(TOPDIR)/make/data/blacklistedcertsconverter/blacklisted.certs.pem
|
||||
GENDATA_BLACKLISTED_CERTS := $(SUPPORT_OUTPUTDIR)/modules_libs/$(MODULE)/security/blacklisted.certs
|
||||
|
@ -23,7 +23,7 @@
|
||||
# questions.
|
||||
#
|
||||
|
||||
$(eval $(call IncludeCustomExtension, , gendata/GendataFontConfig.gmk))
|
||||
$(eval $(call IncludeCustomExtension, gendata/GendataFontConfig.gmk))
|
||||
|
||||
GENDATA_FONT_CONFIG_DST := $(SUPPORT_OUTPUTDIR)/modules_libs/$(MODULE)
|
||||
|
||||
|
@ -26,7 +26,7 @@
|
||||
include GensrcCommonJdk.gmk
|
||||
|
||||
# Hook to include the corresponding custom file, if present.
|
||||
$(eval $(call IncludeCustomExtension, , gensrc/Gensrc-java.desktop.gmk))
|
||||
$(eval $(call IncludeCustomExtension, gensrc/Gensrc-java.desktop.gmk))
|
||||
|
||||
ifneq ($(OPENJDK_TARGET_OS), windows)
|
||||
include GensrcIcons.gmk
|
||||
|
@ -28,7 +28,7 @@ default: all
|
||||
include $(SPEC)
|
||||
include MakeBase.gmk
|
||||
|
||||
$(eval $(call IncludeCustomExtension, , gensrc/Gensrc-jdk.internal.vm.compiler.gmk))
|
||||
$(eval $(call IncludeCustomExtension, gensrc/Gensrc-jdk.internal.vm.compiler.gmk))
|
||||
|
||||
GENSRC_DIR := $(SUPPORT_OUTPUTDIR)/gensrc/$(MODULE)
|
||||
SRC_DIR := $(TOPDIR)/src/$(MODULE)/share/classes
|
||||
|
@ -26,7 +26,7 @@
|
||||
include GensrcCommonJdk.gmk
|
||||
|
||||
# Hook to include the corresponding custom file, if present.
|
||||
$(eval $(call IncludeCustomExtension, , gensrc/Gensrc-jdk.localedata.gmk))
|
||||
$(eval $(call IncludeCustomExtension, gensrc/Gensrc-jdk.localedata.gmk))
|
||||
|
||||
include GensrcLocaleData.gmk
|
||||
include GensrcCLDR.gmk
|
||||
|
@ -23,7 +23,7 @@
|
||||
# questions.
|
||||
#
|
||||
|
||||
$(eval $(call IncludeCustomExtension, , gensrc/GensrcIcons.gmk))
|
||||
$(eval $(call IncludeCustomExtension, gensrc/GensrcIcons.gmk))
|
||||
|
||||
GENSRC_AWT_ICONS :=
|
||||
GENSRC_AWT_ICONS_SRC :=
|
||||
|
@ -39,7 +39,7 @@ include gensrc/GensrcAdlc.gmk
|
||||
include gensrc/GensrcDtrace.gmk
|
||||
include gensrc/GensrcJvmti.gmk
|
||||
|
||||
$(eval $(call IncludeCustomExtension, , hotspot/gensrc/GenerateSources.gmk))
|
||||
$(eval $(call IncludeCustomExtension, hotspot/gensrc/GenerateSources.gmk))
|
||||
|
||||
# While technically the rules below are "gendata" which can be done in parallel
|
||||
# with native compilation, let's keep it here for simplicity.
|
||||
|
@ -23,7 +23,7 @@
|
||||
# questions.
|
||||
#
|
||||
|
||||
$(eval $(call IncludeCustomExtension, , hotspot/gensrc/GensrcAdlc.gmk))
|
||||
$(eval $(call IncludeCustomExtension, hotspot/gensrc/GensrcAdlc.gmk))
|
||||
|
||||
ifeq ($(call check-jvm-feature, compiler2), true)
|
||||
|
||||
|
@ -23,7 +23,7 @@
|
||||
# questions.
|
||||
#
|
||||
|
||||
$(eval $(call IncludeCustomExtension, , hotspot/gensrc/GensrcJvmti.gmk))
|
||||
$(eval $(call IncludeCustomExtension, hotspot/gensrc/GensrcJvmti.gmk))
|
||||
|
||||
################################################################################
|
||||
# Build tools needed for the JVMTI source code generation
|
||||
|
@ -23,7 +23,7 @@
|
||||
# questions.
|
||||
#
|
||||
|
||||
$(eval $(call IncludeCustomExtension, , hotspot/lib/CompileGtest.gmk))
|
||||
$(eval $(call IncludeCustomExtension, hotspot/lib/CompileGtest.gmk))
|
||||
|
||||
GTEST_TEST_SRC += $(TOPDIR)/test/hotspot/gtest
|
||||
GTEST_LAUNCHER_SRC := $(TOPDIR)/test/hotspot/gtest/gtestLauncher.cpp
|
||||
|
@ -28,7 +28,7 @@
|
||||
include lib/JvmFeatures.gmk
|
||||
include lib/JvmOverrideFiles.gmk
|
||||
|
||||
$(eval $(call IncludeCustomExtension, , hotspot/lib/CompileJvm.gmk))
|
||||
$(eval $(call IncludeCustomExtension, hotspot/lib/CompileJvm.gmk))
|
||||
|
||||
################################################################################
|
||||
# Setup compilation of the main Hotspot native library (libjvm).
|
||||
|
@ -23,7 +23,7 @@
|
||||
# questions.
|
||||
#
|
||||
|
||||
$(eval $(call IncludeCustomExtension, , hotspot/lib/JvmFeatures.gmk))
|
||||
$(eval $(call IncludeCustomExtension, hotspot/lib/JvmFeatures.gmk))
|
||||
|
||||
################################################################################
|
||||
# Setup CFLAGS and EXCLUDES for the libjvm compilation, depending on which
|
||||
|
@ -23,7 +23,7 @@
|
||||
# questions.
|
||||
#
|
||||
|
||||
$(eval $(call IncludeCustomExtension, , hotspot/lib/JvmMapfile.gmk))
|
||||
$(eval $(call IncludeCustomExtension, hotspot/lib/JvmMapfile.gmk))
|
||||
|
||||
################################################################################
|
||||
# Combine a list of static symbols
|
||||
|
@ -23,7 +23,7 @@
|
||||
# questions.
|
||||
#
|
||||
|
||||
$(eval $(call IncludeCustomExtension, , hotspot/lib/JvmOverrideFiles.gmk))
|
||||
$(eval $(call IncludeCustomExtension, hotspot/lib/JvmOverrideFiles.gmk))
|
||||
|
||||
################################################################################
|
||||
# This file contains explicit overrides of CFLAGS and/or precompiled header
|
||||
|
@ -25,7 +25,7 @@
|
||||
|
||||
include LauncherCommon.gmk
|
||||
|
||||
$(eval $(call IncludeCustomExtension, , launcher/Launcher-java.base.gmk))
|
||||
$(eval $(call IncludeCustomExtension, launcher/Launcher-java.base.gmk))
|
||||
|
||||
JAVA_RC_FLAGS += -I $(TOPDIR)/src/java.base/windows/native/common
|
||||
JAVA_RC_FLAGS += -I $(TOPDIR)/src/java.base/windows/native/launcher/icons
|
||||
|
@ -26,7 +26,7 @@
|
||||
include LauncherCommon.gmk
|
||||
|
||||
# Hook to include the corresponding custom file, if present.
|
||||
$(eval $(call IncludeCustomExtension, , launcher/Launcher-java.desktop.gmk))
|
||||
$(eval $(call IncludeCustomExtension, launcher/Launcher-java.desktop.gmk))
|
||||
|
||||
ifeq ($(ENABLE_HEADLESS_ONLY), false)
|
||||
$(eval $(call SetupBuildLauncher, appletviewer, \
|
||||
|
@ -23,7 +23,7 @@
|
||||
# questions.
|
||||
#
|
||||
|
||||
$(eval $(call IncludeCustomExtension, , lib/Awt2dLibraries-pre.gmk))
|
||||
$(eval $(call IncludeCustomExtension, lib/Awt2dLibraries-pre.gmk))
|
||||
|
||||
WIN_AWT_LIB := $(SUPPORT_OUTPUTDIR)/native/$(MODULE)/libawt/awt.lib
|
||||
|
||||
@ -1070,4 +1070,4 @@ endif
|
||||
################################################################################
|
||||
|
||||
# Hook to include the corresponding custom file, if present.
|
||||
$(eval $(call IncludeCustomExtension, , lib/Awt2dLibraries.gmk))
|
||||
$(eval $(call IncludeCustomExtension, lib/Awt2dLibraries.gmk))
|
||||
|
@ -26,7 +26,7 @@
|
||||
WIN_VERIFY_LIB := $(SUPPORT_OUTPUTDIR)/native/$(MODULE)/libverify/verify.lib
|
||||
|
||||
# Hook to include the corresponding custom file, if present.
|
||||
$(eval $(call IncludeCustomExtension, , lib/CoreLibraries.gmk))
|
||||
$(eval $(call IncludeCustomExtension, lib/CoreLibraries.gmk))
|
||||
|
||||
|
||||
##########################################################################################
|
||||
|
@ -26,7 +26,7 @@
|
||||
include LibCommon.gmk
|
||||
|
||||
# Hook to include the corresponding custom file, if present.
|
||||
$(eval $(call IncludeCustomExtension, , lib/Lib-java.instrument.gmk))
|
||||
$(eval $(call IncludeCustomExtension, lib/Lib-java.instrument.gmk))
|
||||
|
||||
################################################################################
|
||||
|
||||
|
@ -26,7 +26,7 @@
|
||||
include LibCommon.gmk
|
||||
|
||||
# Hook to include the corresponding custom file, if present.
|
||||
$(eval $(call IncludeCustomExtension, , lib/Lib-java.management.gmk))
|
||||
$(eval $(call IncludeCustomExtension, lib/Lib-java.management.gmk))
|
||||
|
||||
################################################################################
|
||||
|
||||
|
@ -25,7 +25,7 @@
|
||||
|
||||
include NativeCompilation.gmk
|
||||
|
||||
$(eval $(call IncludeCustomExtension, , hotspot/lib/Lib-jdk.hotspot.agent.gmk))
|
||||
$(eval $(call IncludeCustomExtension, hotspot/lib/Lib-jdk.hotspot.agent.gmk))
|
||||
|
||||
################################################################################
|
||||
|
||||
|
@ -26,7 +26,7 @@
|
||||
include LibCommon.gmk
|
||||
|
||||
# Hook to include the corresponding custom file, if present.
|
||||
$(eval $(call IncludeCustomExtension, , lib/Lib-jdk.management.gmk))
|
||||
$(eval $(call IncludeCustomExtension, lib/Lib-jdk.management.gmk))
|
||||
|
||||
################################################################################
|
||||
|
||||
|
@ -26,7 +26,7 @@
|
||||
include NativeCompilation.gmk
|
||||
|
||||
# Hook to include the corresponding custom file, if present.
|
||||
$(eval $(call IncludeCustomExtension, , lib/LibCommon.gmk))
|
||||
$(eval $(call IncludeCustomExtension, lib/LibCommon.gmk))
|
||||
|
||||
################################################################################
|
||||
|
||||
|
@ -35,7 +35,7 @@ include $(SPEC)
|
||||
include MakeBase.gmk
|
||||
include TestFilesCompilation.gmk
|
||||
|
||||
$(eval $(call IncludeCustomExtension, , hotspot/test/JtregNative.gmk))
|
||||
$(eval $(call IncludeCustomExtension, hotspot/test/JtregNative.gmk))
|
||||
|
||||
################################################################################
|
||||
# Targets for building the native tests themselves.
|
||||
|
@ -35,7 +35,7 @@ include $(SPEC)
|
||||
include MakeBase.gmk
|
||||
include TestFilesCompilation.gmk
|
||||
|
||||
$(eval $(call IncludeCustomExtension, , test/JtregNative.gmk))
|
||||
$(eval $(call IncludeCustomExtension, test/JtregNative.gmk))
|
||||
|
||||
################################################################################
|
||||
# Targets for building the native tests themselves.
|
||||
|
@ -29,6 +29,7 @@ import jdk.internal.misc.SharedSecrets;
|
||||
|
||||
import static java.lang.StackWalker.Option.*;
|
||||
import java.lang.StackWalker.StackFrame;
|
||||
import java.lang.invoke.MethodType;
|
||||
|
||||
class StackFrameInfo implements StackFrame {
|
||||
private final static JavaLangInvokeAccess JLIA =
|
||||
@ -78,6 +79,17 @@ class StackFrameInfo implements StackFrame {
|
||||
return JLIA.getName(memberName);
|
||||
}
|
||||
|
||||
@Override
|
||||
public MethodType getMethodType() {
|
||||
walker.ensureAccessEnabled(RETAIN_CLASS_REFERENCE);
|
||||
return JLIA.getMethodType(memberName);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getDescriptor() {
|
||||
return JLIA.getMethodDescriptor(memberName);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getByteCodeIndex() {
|
||||
// bci not available for native methods
|
||||
|
@ -26,10 +26,12 @@ package java.lang;
|
||||
|
||||
import jdk.internal.reflect.CallerSensitive;
|
||||
|
||||
import java.util.*;
|
||||
import java.lang.invoke.MethodType;
|
||||
import java.util.EnumSet;
|
||||
import java.util.Objects;
|
||||
import java.util.Set;
|
||||
import java.util.function.Consumer;
|
||||
import java.util.function.Function;
|
||||
import java.util.function.Predicate;
|
||||
import java.util.stream.Stream;
|
||||
|
||||
/**
|
||||
@ -96,7 +98,7 @@ public final class StackWalker {
|
||||
* @since 9
|
||||
* @jvms 2.6
|
||||
*/
|
||||
public static interface StackFrame {
|
||||
public interface StackFrame {
|
||||
/**
|
||||
* Gets the <a href="ClassLoader.html#name">binary name</a>
|
||||
* of the declaring class of the method represented by this stack frame.
|
||||
@ -127,6 +129,47 @@ public final class StackWalker {
|
||||
*/
|
||||
public Class<?> getDeclaringClass();
|
||||
|
||||
/**
|
||||
* Returns the {@link MethodType} representing the parameter types and
|
||||
* the return type for the method represented by this stack frame.
|
||||
*
|
||||
* @implSpec
|
||||
* The default implementation throws {@code UnsupportedOperationException}.
|
||||
*
|
||||
* @return the {@code MethodType} for this stack frame
|
||||
*
|
||||
* @throws UnsupportedOperationException if this {@code StackWalker}
|
||||
* is not configured with {@link Option#RETAIN_CLASS_REFERENCE
|
||||
* Option.RETAIN_CLASS_REFERENCE}.
|
||||
*
|
||||
* @since 10
|
||||
*/
|
||||
public default MethodType getMethodType() {
|
||||
throw new UnsupportedOperationException();
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the <i>descriptor</i> of the method represented by
|
||||
* this stack frame as defined by
|
||||
* <cite>The Java Virtual Machine Specification</cite>.
|
||||
*
|
||||
* @implSpec
|
||||
* The default implementation throws {@code UnsupportedOperationException}.
|
||||
*
|
||||
* @return the descriptor of the method represented by
|
||||
* this stack frame
|
||||
*
|
||||
* @see MethodType#fromMethodDescriptorString(String, ClassLoader)
|
||||
* @see MethodType#toMethodDescriptorString()
|
||||
* @jvms 4.3.3 Method Descriptor
|
||||
*
|
||||
* @since 10
|
||||
*/
|
||||
public default String getDescriptor() {
|
||||
throw new UnsupportedOperationException();
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Returns the index to the code array of the {@code Code} attribute
|
||||
* containing the execution point represented by this stack frame.
|
||||
|
@ -162,6 +162,29 @@ import static java.lang.invoke.MethodHandleStatics.newInternalError;
|
||||
return (MethodType) type;
|
||||
}
|
||||
|
||||
/** Return the descriptor of this member, which
|
||||
* must be a method or constructor.
|
||||
*/
|
||||
String getMethodDescriptor() {
|
||||
if (type == null) {
|
||||
expandFromVM();
|
||||
if (type == null) {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
if (!isInvocable()) {
|
||||
throw newIllegalArgumentException("not invocable, no method type");
|
||||
}
|
||||
|
||||
// Get a snapshot of type which doesn't get changed by racing threads.
|
||||
final Object type = this.type;
|
||||
if (type instanceof String) {
|
||||
return (String) type;
|
||||
} else {
|
||||
return getMethodType().toMethodDescriptorString();
|
||||
}
|
||||
}
|
||||
|
||||
/** Return the actual type under which this method or constructor must be invoked.
|
||||
* For non-static methods or constructors, this is the type with a leading parameter,
|
||||
* a reference to declaring class. For static methods, it is the same as the declared type.
|
||||
|
@ -1785,6 +1785,18 @@ import static jdk.internal.org.objectweb.asm.Opcodes.*;
|
||||
return memberName.getName();
|
||||
}
|
||||
|
||||
@Override
|
||||
public MethodType getMethodType(Object mname) {
|
||||
MemberName memberName = (MemberName)mname;
|
||||
return memberName.getMethodType();
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getMethodDescriptor(Object mname) {
|
||||
MemberName memberName = (MemberName)mname;
|
||||
return memberName.getMethodDescriptor();
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isNative(Object mname) {
|
||||
MemberName memberName = (MemberName)mname;
|
||||
|
@ -211,7 +211,7 @@ public class ArrayDeque<E> extends AbstractCollection<E>
|
||||
}
|
||||
|
||||
/**
|
||||
* Increments i, mod modulus.
|
||||
* Circularly increments i, mod modulus.
|
||||
* Precondition and postcondition: 0 <= i < modulus.
|
||||
*/
|
||||
static final int inc(int i, int modulus) {
|
||||
@ -220,7 +220,7 @@ public class ArrayDeque<E> extends AbstractCollection<E>
|
||||
}
|
||||
|
||||
/**
|
||||
* Decrements i, mod modulus.
|
||||
* Circularly decrements i, mod modulus.
|
||||
* Precondition and postcondition: 0 <= i < modulus.
|
||||
*/
|
||||
static final int dec(int i, int modulus) {
|
||||
@ -233,7 +233,7 @@ public class ArrayDeque<E> extends AbstractCollection<E>
|
||||
* Precondition: 0 <= i < modulus, 0 <= distance <= modulus.
|
||||
* @return index 0 <= i < modulus
|
||||
*/
|
||||
static final int add(int i, int distance, int modulus) {
|
||||
static final int inc(int i, int distance, int modulus) {
|
||||
if ((i += distance) - modulus >= 0) i -= modulus;
|
||||
return i;
|
||||
}
|
||||
@ -825,7 +825,7 @@ public class ArrayDeque<E> extends AbstractCollection<E>
|
||||
final int i, n;
|
||||
return ((n = sub(getFence(), i = cursor, es.length) >> 1) <= 0)
|
||||
? null
|
||||
: new DeqSpliterator(i, cursor = add(i, n, es.length));
|
||||
: new DeqSpliterator(i, cursor = inc(i, n, es.length));
|
||||
}
|
||||
|
||||
public void forEachRemaining(Consumer<? super E> action) {
|
||||
|
@ -490,7 +490,7 @@ public class HashMap<K,V> extends AbstractMap<K,V>
|
||||
}
|
||||
|
||||
/**
|
||||
* Implements Map.putAll and Map constructor
|
||||
* Implements Map.putAll and Map constructor.
|
||||
*
|
||||
* @param m the map
|
||||
* @param evict false when initially constructing this map, else
|
||||
@ -557,7 +557,7 @@ public class HashMap<K,V> extends AbstractMap<K,V>
|
||||
}
|
||||
|
||||
/**
|
||||
* Implements Map.get and related methods
|
||||
* Implements Map.get and related methods.
|
||||
*
|
||||
* @param hash hash for key
|
||||
* @param key the key
|
||||
@ -612,7 +612,7 @@ public class HashMap<K,V> extends AbstractMap<K,V>
|
||||
}
|
||||
|
||||
/**
|
||||
* Implements Map.put and related methods
|
||||
* Implements Map.put and related methods.
|
||||
*
|
||||
* @param hash hash for key
|
||||
* @param key the key
|
||||
@ -700,7 +700,7 @@ public class HashMap<K,V> extends AbstractMap<K,V>
|
||||
}
|
||||
threshold = newThr;
|
||||
@SuppressWarnings({"rawtypes","unchecked"})
|
||||
Node<K,V>[] newTab = (Node<K,V>[])new Node[newCap];
|
||||
Node<K,V>[] newTab = (Node<K,V>[])new Node[newCap];
|
||||
table = newTab;
|
||||
if (oldTab != null) {
|
||||
for (int j = 0; j < oldCap; ++j) {
|
||||
@ -800,7 +800,7 @@ public class HashMap<K,V> extends AbstractMap<K,V>
|
||||
}
|
||||
|
||||
/**
|
||||
* Implements Map.remove and related methods
|
||||
* Implements Map.remove and related methods.
|
||||
*
|
||||
* @param hash hash for key
|
||||
* @param key the key
|
||||
@ -875,7 +875,7 @@ public class HashMap<K,V> extends AbstractMap<K,V>
|
||||
public boolean containsValue(Object value) {
|
||||
Node<K,V>[] tab; V v;
|
||||
if ((tab = table) != null && size > 0) {
|
||||
for (Node<K, V> e : tab) {
|
||||
for (Node<K,V> e : tab) {
|
||||
for (; e != null; e = e.next) {
|
||||
if ((v = e.value) == value ||
|
||||
(value != null && value.equals(v)))
|
||||
@ -927,7 +927,7 @@ public class HashMap<K,V> extends AbstractMap<K,V>
|
||||
throw new NullPointerException();
|
||||
if (size > 0 && (tab = table) != null) {
|
||||
int mc = modCount;
|
||||
for (Node<K, V> e : tab) {
|
||||
for (Node<K,V> e : tab) {
|
||||
for (; e != null; e = e.next)
|
||||
action.accept(e.key);
|
||||
}
|
||||
@ -975,7 +975,7 @@ public class HashMap<K,V> extends AbstractMap<K,V>
|
||||
throw new NullPointerException();
|
||||
if (size > 0 && (tab = table) != null) {
|
||||
int mc = modCount;
|
||||
for (Node<K, V> e : tab) {
|
||||
for (Node<K,V> e : tab) {
|
||||
for (; e != null; e = e.next)
|
||||
action.accept(e.value);
|
||||
}
|
||||
@ -1038,7 +1038,7 @@ public class HashMap<K,V> extends AbstractMap<K,V>
|
||||
throw new NullPointerException();
|
||||
if (size > 0 && (tab = table) != null) {
|
||||
int mc = modCount;
|
||||
for (Node<K, V> e : tab) {
|
||||
for (Node<K,V> e : tab) {
|
||||
for (; e != null; e = e.next)
|
||||
action.accept(e);
|
||||
}
|
||||
@ -1335,7 +1335,7 @@ public class HashMap<K,V> extends AbstractMap<K,V>
|
||||
throw new NullPointerException();
|
||||
if (size > 0 && (tab = table) != null) {
|
||||
int mc = modCount;
|
||||
for (Node<K, V> e : tab) {
|
||||
for (Node<K,V> e : tab) {
|
||||
for (; e != null; e = e.next)
|
||||
action.accept(e.key, e.value);
|
||||
}
|
||||
@ -1351,7 +1351,7 @@ public class HashMap<K,V> extends AbstractMap<K,V>
|
||||
throw new NullPointerException();
|
||||
if (size > 0 && (tab = table) != null) {
|
||||
int mc = modCount;
|
||||
for (Node<K, V> e : tab) {
|
||||
for (Node<K,V> e : tab) {
|
||||
for (; e != null; e = e.next) {
|
||||
e.value = function.apply(e.key, e.value);
|
||||
}
|
||||
@ -1394,9 +1394,10 @@ public class HashMap<K,V> extends AbstractMap<K,V>
|
||||
}
|
||||
|
||||
/**
|
||||
* Save the state of the {@code HashMap} instance to a stream (i.e.,
|
||||
* serialize it).
|
||||
* Saves this map to a stream (that is, serializes it).
|
||||
*
|
||||
* @param s the stream
|
||||
* @throws IOException if an I/O error occurs
|
||||
* @serialData The <i>capacity</i> of the HashMap (the length of the
|
||||
* bucket array) is emitted (int), followed by the
|
||||
* <i>size</i> (an int, the number of key-value
|
||||
@ -1415,8 +1416,11 @@ public class HashMap<K,V> extends AbstractMap<K,V>
|
||||
}
|
||||
|
||||
/**
|
||||
* Reconstitute the {@code HashMap} instance from a stream (i.e.,
|
||||
* deserialize it).
|
||||
* Reconstitutes this map from a stream (that is, deserializes it).
|
||||
* @param s the stream
|
||||
* @throws ClassNotFoundException if the class of a serialized object
|
||||
* could not be found
|
||||
* @throws IOException if an I/O error occurs
|
||||
*/
|
||||
private void readObject(java.io.ObjectInputStream s)
|
||||
throws IOException, ClassNotFoundException {
|
||||
@ -1445,7 +1449,7 @@ public class HashMap<K,V> extends AbstractMap<K,V>
|
||||
threshold = ((cap < MAXIMUM_CAPACITY && ft < MAXIMUM_CAPACITY) ?
|
||||
(int)ft : Integer.MAX_VALUE);
|
||||
@SuppressWarnings({"rawtypes","unchecked"})
|
||||
Node<K,V>[] tab = (Node<K,V>[])new Node[cap];
|
||||
Node<K,V>[] tab = (Node<K,V>[])new Node[cap];
|
||||
table = tab;
|
||||
|
||||
// Read the keys and values, and put the mappings in the HashMap
|
||||
@ -1830,7 +1834,7 @@ public class HashMap<K,V> extends AbstractMap<K,V>
|
||||
void internalWriteEntries(java.io.ObjectOutputStream s) throws IOException {
|
||||
Node<K,V>[] tab;
|
||||
if (size > 0 && (tab = table) != null) {
|
||||
for (Node<K, V> e : tab) {
|
||||
for (Node<K,V> e : tab) {
|
||||
for (; e != null; e = e.next) {
|
||||
s.writeObject(e.key);
|
||||
s.writeObject(e.value);
|
||||
@ -1951,7 +1955,6 @@ public class HashMap<K,V> extends AbstractMap<K,V>
|
||||
|
||||
/**
|
||||
* Forms tree of the nodes linked from this node.
|
||||
* @return root of tree
|
||||
*/
|
||||
final void treeify(Node<K,V>[] tab) {
|
||||
TreeNode<K,V> root = null;
|
||||
@ -2089,8 +2092,11 @@ public class HashMap<K,V> extends AbstractMap<K,V>
|
||||
return;
|
||||
if (root.parent != null)
|
||||
root = root.root();
|
||||
if (root == null || root.right == null ||
|
||||
(rl = root.left) == null || rl.left == null) {
|
||||
if (root == null
|
||||
|| (movable
|
||||
&& (root.right == null
|
||||
|| (rl = root.left) == null
|
||||
|| rl.left == null))) {
|
||||
tab[index] = first.untreeify(map); // too small
|
||||
return;
|
||||
}
|
||||
@ -2319,7 +2325,7 @@ public class HashMap<K,V> extends AbstractMap<K,V>
|
||||
|
||||
static <K,V> TreeNode<K,V> balanceDeletion(TreeNode<K,V> root,
|
||||
TreeNode<K,V> x) {
|
||||
for (TreeNode<K,V> xp, xpl, xpr;;) {
|
||||
for (TreeNode<K,V> xp, xpl, xpr;;) {
|
||||
if (x == null || x == root)
|
||||
return root;
|
||||
else if ((xp = x.parent) == null) {
|
||||
|
@ -2490,13 +2490,13 @@ public class CompletableFuture<T> implements Future<T>, CompletionStage<T> {
|
||||
for (Completion p = stack; p != null; p = p.next)
|
||||
++count;
|
||||
return super.toString() +
|
||||
((r == null) ?
|
||||
((count == 0) ?
|
||||
"[Not completed]" :
|
||||
"[Not completed, " + count + " dependents]") :
|
||||
(((r instanceof AltResult) && ((AltResult)r).ex != null) ?
|
||||
"[Completed exceptionally]" :
|
||||
"[Completed normally]"));
|
||||
((r == null)
|
||||
? ((count == 0)
|
||||
? "[Not completed]"
|
||||
: "[Not completed, " + count + " dependents]")
|
||||
: (((r instanceof AltResult) && ((AltResult)r).ex != null)
|
||||
? "[Completed exceptionally: " + ((AltResult)r).ex + "]"
|
||||
: "[Completed normally]"));
|
||||
}
|
||||
|
||||
// jdk9 additions
|
||||
|
@ -1394,8 +1394,8 @@ public class ConcurrentHashMap<K,V> extends AbstractMap<K,V>
|
||||
}
|
||||
|
||||
/**
|
||||
* Saves the state of the {@code ConcurrentHashMap} instance to a
|
||||
* stream (i.e., serializes it).
|
||||
* Saves this map to a stream (that is, serializes it).
|
||||
*
|
||||
* @param s the stream
|
||||
* @throws java.io.IOException if an I/O error occurs
|
||||
* @serialData
|
||||
@ -1439,7 +1439,7 @@ public class ConcurrentHashMap<K,V> extends AbstractMap<K,V>
|
||||
}
|
||||
|
||||
/**
|
||||
* Reconstitutes the instance from a stream (that is, deserializes it).
|
||||
* Reconstitutes this map from a stream (that is, deserializes it).
|
||||
* @param s the stream
|
||||
* @throws ClassNotFoundException if the class of a serialized object
|
||||
* could not be found
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -174,6 +174,10 @@ public class ExecutorCompletionService<V> implements CompletionService<V> {
|
||||
this.completionQueue = completionQueue;
|
||||
}
|
||||
|
||||
/**
|
||||
* @throws RejectedExecutionException {@inheritDoc}
|
||||
* @throws NullPointerException {@inheritDoc}
|
||||
*/
|
||||
public Future<V> submit(Callable<V> task) {
|
||||
if (task == null) throw new NullPointerException();
|
||||
RunnableFuture<V> f = newTaskFor(task);
|
||||
@ -181,6 +185,10 @@ public class ExecutorCompletionService<V> implements CompletionService<V> {
|
||||
return f;
|
||||
}
|
||||
|
||||
/**
|
||||
* @throws RejectedExecutionException {@inheritDoc}
|
||||
* @throws NullPointerException {@inheritDoc}
|
||||
*/
|
||||
public Future<V> submit(Runnable task, V result) {
|
||||
if (task == null) throw new NullPointerException();
|
||||
RunnableFuture<V> f = newTaskFor(task, result);
|
||||
|
@ -514,6 +514,9 @@ public class Executors {
|
||||
task.run();
|
||||
return result;
|
||||
}
|
||||
public String toString() {
|
||||
return super.toString() + "[Wrapped task = " + task + "]";
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
@ -540,6 +543,10 @@ public class Executors {
|
||||
throw e.getException();
|
||||
}
|
||||
}
|
||||
|
||||
public String toString() {
|
||||
return super.toString() + "[Wrapped task = " + task + "]";
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
@ -592,6 +599,10 @@ public class Executors {
|
||||
throw e.getException();
|
||||
}
|
||||
}
|
||||
|
||||
public String toString() {
|
||||
return super.toString() + "[Wrapped task = " + task + "]";
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -1375,6 +1375,9 @@ public abstract class ForkJoinTask<V> implements Future<V>, Serializable {
|
||||
public final void setRawResult(T v) { result = v; }
|
||||
public final boolean exec() { runnable.run(); return true; }
|
||||
public final void run() { invoke(); }
|
||||
public String toString() {
|
||||
return super.toString() + "[Wrapped task = " + runnable + "]";
|
||||
}
|
||||
private static final long serialVersionUID = 5232453952276885070L;
|
||||
}
|
||||
|
||||
@ -1392,6 +1395,9 @@ public abstract class ForkJoinTask<V> implements Future<V>, Serializable {
|
||||
public final void setRawResult(Void v) { }
|
||||
public final boolean exec() { runnable.run(); return true; }
|
||||
public final void run() { invoke(); }
|
||||
public String toString() {
|
||||
return super.toString() + "[Wrapped task = " + runnable + "]";
|
||||
}
|
||||
private static final long serialVersionUID = 5232453952276885070L;
|
||||
}
|
||||
|
||||
@ -1437,6 +1443,9 @@ public abstract class ForkJoinTask<V> implements Future<V>, Serializable {
|
||||
}
|
||||
}
|
||||
public final void run() { invoke(); }
|
||||
public String toString() {
|
||||
return super.toString() + "[Wrapped task = " + callable + "]";
|
||||
}
|
||||
private static final long serialVersionUID = 2838392045355241008L;
|
||||
}
|
||||
|
||||
|
@ -480,6 +480,41 @@ public class FutureTask<V> implements RunnableFuture<V> {
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns a string representation of this FutureTask.
|
||||
*
|
||||
* @implSpec
|
||||
* The default implementation returns a string identifying this
|
||||
* FutureTask, as well as its completion state. The state, in
|
||||
* brackets, contains one of the strings {@code "Completed Normally"},
|
||||
* {@code "Completed Exceptionally"}, {@code "Cancelled"}, or {@code
|
||||
* "Not completed"}.
|
||||
*
|
||||
* @return a string representation of this FutureTask
|
||||
*/
|
||||
public String toString() {
|
||||
final String status;
|
||||
switch (state) {
|
||||
case NORMAL:
|
||||
status = "[Completed normally]";
|
||||
break;
|
||||
case EXCEPTIONAL:
|
||||
status = "[Completed exceptionally: " + outcome + "]";
|
||||
break;
|
||||
case CANCELLED:
|
||||
case INTERRUPTING:
|
||||
case INTERRUPTED:
|
||||
status = "[Cancelled]";
|
||||
break;
|
||||
default:
|
||||
final Callable<?> callable = this.callable;
|
||||
status = (callable == null)
|
||||
? "[Not completed]"
|
||||
: "[Not completed, task = " + callable + "]";
|
||||
}
|
||||
return super.toString() + status;
|
||||
}
|
||||
|
||||
// VarHandle mechanics
|
||||
private static final VarHandle STATE;
|
||||
private static final VarHandle RUNNER;
|
||||
|
@ -383,7 +383,7 @@ public class ThreadPoolExecutor extends AbstractExecutorService {
|
||||
*/
|
||||
private final AtomicInteger ctl = new AtomicInteger(ctlOf(RUNNING, 0));
|
||||
private static final int COUNT_BITS = Integer.SIZE - 3;
|
||||
private static final int CAPACITY = (1 << COUNT_BITS) - 1;
|
||||
private static final int COUNT_MASK = (1 << COUNT_BITS) - 1;
|
||||
|
||||
// runState is stored in the high-order bits
|
||||
private static final int RUNNING = -1 << COUNT_BITS;
|
||||
@ -393,8 +393,8 @@ public class ThreadPoolExecutor extends AbstractExecutorService {
|
||||
private static final int TERMINATED = 3 << COUNT_BITS;
|
||||
|
||||
// Packing and unpacking ctl
|
||||
private static int runStateOf(int c) { return c & ~CAPACITY; }
|
||||
private static int workerCountOf(int c) { return c & CAPACITY; }
|
||||
private static int runStateOf(int c) { return c & ~COUNT_MASK; }
|
||||
private static int workerCountOf(int c) { return c & COUNT_MASK; }
|
||||
private static int ctlOf(int rs, int wc) { return rs | wc; }
|
||||
|
||||
/*
|
||||
@ -434,7 +434,7 @@ public class ThreadPoolExecutor extends AbstractExecutorService {
|
||||
* decrements are performed within getTask.
|
||||
*/
|
||||
private void decrementWorkerCount() {
|
||||
do {} while (! compareAndDecrementWorkerCount(ctl.get()));
|
||||
ctl.addAndGet(-1);
|
||||
}
|
||||
|
||||
/**
|
||||
@ -538,12 +538,17 @@ public class ThreadPoolExecutor extends AbstractExecutorService {
|
||||
* Core pool size is the minimum number of workers to keep alive
|
||||
* (and not allow to time out etc) unless allowCoreThreadTimeOut
|
||||
* is set, in which case the minimum is zero.
|
||||
*
|
||||
* Since the worker count is actually stored in COUNT_BITS bits,
|
||||
* the effective limit is {@code corePoolSize & COUNT_MASK}.
|
||||
*/
|
||||
private volatile int corePoolSize;
|
||||
|
||||
/**
|
||||
* Maximum pool size. Note that the actual maximum is internally
|
||||
* bounded by CAPACITY.
|
||||
* Maximum pool size.
|
||||
*
|
||||
* Since the worker count is actually stored in COUNT_BITS bits,
|
||||
* the effective limit is {@code maximumPoolSize & COUNT_MASK}.
|
||||
*/
|
||||
private volatile int maximumPoolSize;
|
||||
|
||||
@ -705,7 +710,7 @@ public class ThreadPoolExecutor extends AbstractExecutorService {
|
||||
int c = ctl.get();
|
||||
if (isRunning(c) ||
|
||||
runStateAtLeast(c, TIDYING) ||
|
||||
(runStateOf(c) == SHUTDOWN && ! workQueue.isEmpty()))
|
||||
(runStateLessThan(c, STOP) && ! workQueue.isEmpty()))
|
||||
return;
|
||||
if (workerCountOf(c) != 0) { // Eligible to terminate
|
||||
interruptIdleWorkers(ONLY_ONE);
|
||||
@ -744,17 +749,12 @@ public class ThreadPoolExecutor extends AbstractExecutorService {
|
||||
* specially.
|
||||
*/
|
||||
private void checkShutdownAccess() {
|
||||
// assert mainLock.isHeldByCurrentThread();
|
||||
SecurityManager security = System.getSecurityManager();
|
||||
if (security != null) {
|
||||
security.checkPermission(shutdownPerm);
|
||||
final ReentrantLock mainLock = this.mainLock;
|
||||
mainLock.lock();
|
||||
try {
|
||||
for (Worker w : workers)
|
||||
security.checkAccess(w.thread);
|
||||
} finally {
|
||||
mainLock.unlock();
|
||||
}
|
||||
for (Worker w : workers)
|
||||
security.checkAccess(w.thread);
|
||||
}
|
||||
}
|
||||
|
||||
@ -763,14 +763,9 @@ public class ThreadPoolExecutor extends AbstractExecutorService {
|
||||
* (in which case some threads may remain uninterrupted).
|
||||
*/
|
||||
private void interruptWorkers() {
|
||||
final ReentrantLock mainLock = this.mainLock;
|
||||
mainLock.lock();
|
||||
try {
|
||||
for (Worker w : workers)
|
||||
w.interruptIfStarted();
|
||||
} finally {
|
||||
mainLock.unlock();
|
||||
}
|
||||
// assert mainLock.isHeldByCurrentThread();
|
||||
for (Worker w : workers)
|
||||
w.interruptIfStarted();
|
||||
}
|
||||
|
||||
/**
|
||||
@ -896,26 +891,22 @@ public class ThreadPoolExecutor extends AbstractExecutorService {
|
||||
*/
|
||||
private boolean addWorker(Runnable firstTask, boolean core) {
|
||||
retry:
|
||||
for (;;) {
|
||||
int c = ctl.get();
|
||||
int rs = runStateOf(c);
|
||||
|
||||
for (int c = ctl.get();;) {
|
||||
// Check if queue empty only if necessary.
|
||||
if (rs >= SHUTDOWN &&
|
||||
! (rs == SHUTDOWN &&
|
||||
firstTask == null &&
|
||||
! workQueue.isEmpty()))
|
||||
if (runStateAtLeast(c, SHUTDOWN)
|
||||
&& (runStateAtLeast(c, STOP)
|
||||
|| firstTask != null
|
||||
|| workQueue.isEmpty()))
|
||||
return false;
|
||||
|
||||
for (;;) {
|
||||
int wc = workerCountOf(c);
|
||||
if (wc >= CAPACITY ||
|
||||
wc >= (core ? corePoolSize : maximumPoolSize))
|
||||
if (workerCountOf(c)
|
||||
>= ((core ? corePoolSize : maximumPoolSize) & COUNT_MASK))
|
||||
return false;
|
||||
if (compareAndIncrementWorkerCount(c))
|
||||
break retry;
|
||||
c = ctl.get(); // Re-read ctl
|
||||
if (runStateOf(c) != rs)
|
||||
if (runStateAtLeast(c, SHUTDOWN))
|
||||
continue retry;
|
||||
// else CAS failed due to workerCount change; retry inner loop
|
||||
}
|
||||
@ -934,10 +925,10 @@ public class ThreadPoolExecutor extends AbstractExecutorService {
|
||||
// Recheck while holding lock.
|
||||
// Back out on ThreadFactory failure or if
|
||||
// shut down before lock acquired.
|
||||
int rs = runStateOf(ctl.get());
|
||||
int c = ctl.get();
|
||||
|
||||
if (rs < SHUTDOWN ||
|
||||
(rs == SHUTDOWN && firstTask == null)) {
|
||||
if (isRunning(c) ||
|
||||
(runStateLessThan(c, STOP) && firstTask == null)) {
|
||||
if (t.isAlive()) // precheck that t is startable
|
||||
throw new IllegalThreadStateException();
|
||||
workers.add(w);
|
||||
@ -1044,10 +1035,10 @@ public class ThreadPoolExecutor extends AbstractExecutorService {
|
||||
|
||||
for (;;) {
|
||||
int c = ctl.get();
|
||||
int rs = runStateOf(c);
|
||||
|
||||
// Check if queue empty only if necessary.
|
||||
if (rs >= SHUTDOWN && (rs >= STOP || workQueue.isEmpty())) {
|
||||
if (runStateAtLeast(c, SHUTDOWN)
|
||||
&& (runStateAtLeast(c, STOP) || workQueue.isEmpty())) {
|
||||
decrementWorkerCount();
|
||||
return null;
|
||||
}
|
||||
@ -1140,17 +1131,12 @@ public class ThreadPoolExecutor extends AbstractExecutorService {
|
||||
wt.interrupt();
|
||||
try {
|
||||
beforeExecute(wt, task);
|
||||
Throwable thrown = null;
|
||||
try {
|
||||
task.run();
|
||||
} catch (RuntimeException x) {
|
||||
thrown = x; throw x;
|
||||
} catch (Error x) {
|
||||
thrown = x; throw x;
|
||||
} catch (Throwable x) {
|
||||
thrown = x; throw new Error(x);
|
||||
} finally {
|
||||
afterExecute(task, thrown);
|
||||
afterExecute(task, null);
|
||||
} catch (Throwable ex) {
|
||||
afterExecute(task, ex);
|
||||
throw ex;
|
||||
}
|
||||
} finally {
|
||||
task = null;
|
||||
@ -1331,7 +1317,7 @@ public class ThreadPoolExecutor extends AbstractExecutorService {
|
||||
*
|
||||
* If the task cannot be submitted for execution, either because this
|
||||
* executor has been shutdown or because its capacity has been reached,
|
||||
* the task is handled by the current {@code RejectedExecutionHandler}.
|
||||
* the task is handled by the current {@link RejectedExecutionHandler}.
|
||||
*
|
||||
* @param command the task to execute
|
||||
* @throws RejectedExecutionException at discretion of
|
||||
@ -1438,7 +1424,7 @@ public class ThreadPoolExecutor extends AbstractExecutorService {
|
||||
}
|
||||
|
||||
public boolean isShutdown() {
|
||||
return ! isRunning(ctl.get());
|
||||
return runStateAtLeast(ctl.get(), SHUTDOWN);
|
||||
}
|
||||
|
||||
/** Used by ScheduledThreadPoolExecutor. */
|
||||
@ -1459,7 +1445,7 @@ public class ThreadPoolExecutor extends AbstractExecutorService {
|
||||
*/
|
||||
public boolean isTerminating() {
|
||||
int c = ctl.get();
|
||||
return ! isRunning(c) && runStateLessThan(c, TERMINATED);
|
||||
return runStateAtLeast(c, SHUTDOWN) && runStateLessThan(c, TERMINATED);
|
||||
}
|
||||
|
||||
public boolean isTerminated() {
|
||||
@ -1472,7 +1458,7 @@ public class ThreadPoolExecutor extends AbstractExecutorService {
|
||||
final ReentrantLock mainLock = this.mainLock;
|
||||
mainLock.lock();
|
||||
try {
|
||||
while (!runStateAtLeast(ctl.get(), TERMINATED)) {
|
||||
while (runStateLessThan(ctl.get(), TERMINATED)) {
|
||||
if (nanos <= 0L)
|
||||
return false;
|
||||
nanos = termination.awaitNanos(nanos);
|
||||
@ -1951,7 +1937,7 @@ public class ThreadPoolExecutor extends AbstractExecutorService {
|
||||
}
|
||||
int c = ctl.get();
|
||||
String runState =
|
||||
runStateLessThan(c, SHUTDOWN) ? "Running" :
|
||||
isRunning(c) ? "Running" :
|
||||
runStateAtLeast(c, TERMINATED) ? "Terminated" :
|
||||
"Shutting down";
|
||||
return super.toString() +
|
||||
|
@ -342,11 +342,13 @@ public enum TimeUnit {
|
||||
* using:
|
||||
*
|
||||
* <pre> {@code
|
||||
* public synchronized Object poll(long timeout, TimeUnit unit)
|
||||
* public E poll(long timeout, TimeUnit unit)
|
||||
* throws InterruptedException {
|
||||
* while (empty) {
|
||||
* unit.timedWait(this, timeout);
|
||||
* ...
|
||||
* synchronized (lock) {
|
||||
* while (isEmpty()) {
|
||||
* unit.timedWait(lock, timeout);
|
||||
* ...
|
||||
* }
|
||||
* }
|
||||
* }}</pre>
|
||||
*
|
||||
|
@ -67,11 +67,11 @@ public abstract class AbstractQueuedLongSynchronizer
|
||||
private static final long serialVersionUID = 7373984972572414692L;
|
||||
|
||||
/*
|
||||
To keep sources in sync, the remainder of this source file is
|
||||
exactly cloned from AbstractQueuedSynchronizer, replacing class
|
||||
name and changing ints related with sync state to longs. Please
|
||||
keep it that way.
|
||||
*/
|
||||
* To keep sources in sync, the remainder of this source file is
|
||||
* exactly cloned from AbstractQueuedSynchronizer, replacing class
|
||||
* name and changing ints related with sync state to longs. Please
|
||||
* keep it that way.
|
||||
*/
|
||||
|
||||
/**
|
||||
* Creates a new {@code AbstractQueuedLongSynchronizer} instance
|
||||
@ -725,8 +725,7 @@ public abstract class AbstractQueuedLongSynchronizer
|
||||
/**
|
||||
* Returns {@code true} if synchronization is held exclusively with
|
||||
* respect to the current (calling) thread. This method is invoked
|
||||
* upon each call to a non-waiting {@link ConditionObject} method.
|
||||
* (Waiting methods instead invoke {@link #release}.)
|
||||
* upon each call to a {@link ConditionObject} method.
|
||||
*
|
||||
* <p>The default implementation throws {@link
|
||||
* UnsupportedOperationException}. This method is invoked
|
||||
@ -1366,9 +1365,8 @@ public abstract class AbstractQueuedLongSynchronizer
|
||||
}
|
||||
|
||||
/**
|
||||
* Condition implementation for a {@link
|
||||
* AbstractQueuedLongSynchronizer} serving as the basis of a {@link
|
||||
* Lock} implementation.
|
||||
* Condition implementation for a {@link AbstractQueuedLongSynchronizer}
|
||||
* serving as the basis of a {@link Lock} implementation.
|
||||
*
|
||||
* <p>Method documentation for this class describes mechanics,
|
||||
* not behavioral specifications from the point of view of Lock
|
||||
@ -1401,6 +1399,8 @@ public abstract class AbstractQueuedLongSynchronizer
|
||||
* @return its new wait node
|
||||
*/
|
||||
private Node addConditionWaiter() {
|
||||
if (!isHeldExclusively())
|
||||
throw new IllegalMonitorStateException();
|
||||
Node t = lastWaiter;
|
||||
// If lastWaiter is cancelled, clean out.
|
||||
if (t != null && t.waitStatus != Node.CONDITION) {
|
||||
|
@ -194,19 +194,13 @@ import java.util.concurrent.TimeUnit;
|
||||
* represent the locked state. While a non-reentrant lock
|
||||
* does not strictly require recording of the current owner
|
||||
* thread, this class does so anyway to make usage easier to monitor.
|
||||
* It also supports conditions and exposes
|
||||
* one of the instrumentation methods:
|
||||
* It also supports conditions and exposes some instrumentation methods:
|
||||
*
|
||||
* <pre> {@code
|
||||
* class Mutex implements Lock, java.io.Serializable {
|
||||
*
|
||||
* // Our internal helper class
|
||||
* private static class Sync extends AbstractQueuedSynchronizer {
|
||||
* // Reports whether in locked state
|
||||
* protected boolean isHeldExclusively() {
|
||||
* return getState() == 1;
|
||||
* }
|
||||
*
|
||||
* // Acquires the lock if state is zero
|
||||
* public boolean tryAcquire(int acquires) {
|
||||
* assert acquires == 1; // Otherwise unused
|
||||
@ -220,14 +214,27 @@ import java.util.concurrent.TimeUnit;
|
||||
* // Releases the lock by setting state to zero
|
||||
* protected boolean tryRelease(int releases) {
|
||||
* assert releases == 1; // Otherwise unused
|
||||
* if (getState() == 0) throw new IllegalMonitorStateException();
|
||||
* if (!isHeldExclusively())
|
||||
* throw new IllegalMonitorStateException();
|
||||
* setExclusiveOwnerThread(null);
|
||||
* setState(0);
|
||||
* return true;
|
||||
* }
|
||||
*
|
||||
* // Reports whether in locked state
|
||||
* public boolean isLocked() {
|
||||
* return getState() != 0;
|
||||
* }
|
||||
*
|
||||
* public boolean isHeldExclusively() {
|
||||
* // a data race, but safe due to out-of-thin-air guarantees
|
||||
* return getExclusiveOwnerThread() == Thread.currentThread();
|
||||
* }
|
||||
*
|
||||
* // Provides a Condition
|
||||
* Condition newCondition() { return new ConditionObject(); }
|
||||
* public Condition newCondition() {
|
||||
* return new ConditionObject();
|
||||
* }
|
||||
*
|
||||
* // Deserializes properly
|
||||
* private void readObject(ObjectInputStream s)
|
||||
@ -240,12 +247,17 @@ import java.util.concurrent.TimeUnit;
|
||||
* // The sync object does all the hard work. We just forward to it.
|
||||
* private final Sync sync = new Sync();
|
||||
*
|
||||
* public void lock() { sync.acquire(1); }
|
||||
* public boolean tryLock() { return sync.tryAcquire(1); }
|
||||
* public void unlock() { sync.release(1); }
|
||||
* public Condition newCondition() { return sync.newCondition(); }
|
||||
* public boolean isLocked() { return sync.isHeldExclusively(); }
|
||||
* public boolean hasQueuedThreads() { return sync.hasQueuedThreads(); }
|
||||
* public void lock() { sync.acquire(1); }
|
||||
* public boolean tryLock() { return sync.tryAcquire(1); }
|
||||
* public void unlock() { sync.release(1); }
|
||||
* public Condition newCondition() { return sync.newCondition(); }
|
||||
* public boolean isLocked() { return sync.isLocked(); }
|
||||
* public boolean isHeldByCurrentThread() {
|
||||
* return sync.isHeldExclusively();
|
||||
* }
|
||||
* public boolean hasQueuedThreads() {
|
||||
* return sync.hasQueuedThreads();
|
||||
* }
|
||||
* public void lockInterruptibly() throws InterruptedException {
|
||||
* sync.acquireInterruptibly(1);
|
||||
* }
|
||||
@ -1193,8 +1205,7 @@ public abstract class AbstractQueuedSynchronizer
|
||||
/**
|
||||
* Returns {@code true} if synchronization is held exclusively with
|
||||
* respect to the current (calling) thread. This method is invoked
|
||||
* upon each call to a non-waiting {@link ConditionObject} method.
|
||||
* (Waiting methods instead invoke {@link #release}.)
|
||||
* upon each call to a {@link ConditionObject} method.
|
||||
*
|
||||
* <p>The default implementation throws {@link
|
||||
* UnsupportedOperationException}. This method is invoked
|
||||
@ -1834,9 +1845,8 @@ public abstract class AbstractQueuedSynchronizer
|
||||
}
|
||||
|
||||
/**
|
||||
* Condition implementation for a {@link
|
||||
* AbstractQueuedSynchronizer} serving as the basis of a {@link
|
||||
* Lock} implementation.
|
||||
* Condition implementation for a {@link AbstractQueuedSynchronizer}
|
||||
* serving as the basis of a {@link Lock} implementation.
|
||||
*
|
||||
* <p>Method documentation for this class describes mechanics,
|
||||
* not behavioral specifications from the point of view of Lock
|
||||
@ -1867,6 +1877,8 @@ public abstract class AbstractQueuedSynchronizer
|
||||
* @return its new wait node
|
||||
*/
|
||||
private Node addConditionWaiter() {
|
||||
if (!isHeldExclusively())
|
||||
throw new IllegalMonitorStateException();
|
||||
Node t = lastWaiter;
|
||||
// If lastWaiter is cancelled, clean out.
|
||||
if (t != null && t.waitStatus != Node.CONDITION) {
|
||||
|
@ -73,7 +73,7 @@ import java.util.concurrent.TimeUnit;
|
||||
* available in the buffer. This can be achieved using two
|
||||
* {@link Condition} instances.
|
||||
* <pre>
|
||||
* class BoundedBuffer {
|
||||
* class BoundedBuffer<E> {
|
||||
* <b>final Lock lock = new ReentrantLock();</b>
|
||||
* final Condition notFull = <b>lock.newCondition(); </b>
|
||||
* final Condition notEmpty = <b>lock.newCondition(); </b>
|
||||
@ -81,7 +81,7 @@ import java.util.concurrent.TimeUnit;
|
||||
* final Object[] items = new Object[100];
|
||||
* int putptr, takeptr, count;
|
||||
*
|
||||
* public void put(Object x) throws InterruptedException {
|
||||
* public void put(E x) throws InterruptedException {
|
||||
* <b>lock.lock();
|
||||
* try {</b>
|
||||
* while (count == items.length)
|
||||
@ -95,12 +95,12 @@ import java.util.concurrent.TimeUnit;
|
||||
* }</b>
|
||||
* }
|
||||
*
|
||||
* public Object take() throws InterruptedException {
|
||||
* public E take() throws InterruptedException {
|
||||
* <b>lock.lock();
|
||||
* try {</b>
|
||||
* while (count == 0)
|
||||
* <b>notEmpty.await();</b>
|
||||
* Object x = items[takeptr];
|
||||
* E x = (E) items[takeptr];
|
||||
* if (++takeptr == items.length) takeptr = 0;
|
||||
* --count;
|
||||
* <b>notFull.signal();</b>
|
||||
@ -310,7 +310,8 @@ public interface Condition {
|
||||
* the following form:
|
||||
*
|
||||
* <pre> {@code
|
||||
* boolean aMethod(long timeout, TimeUnit unit) {
|
||||
* boolean aMethod(long timeout, TimeUnit unit)
|
||||
* throws InterruptedException {
|
||||
* long nanos = unit.toNanos(timeout);
|
||||
* lock.lock();
|
||||
* try {
|
||||
@ -320,6 +321,7 @@ public interface Condition {
|
||||
* nanos = theCondition.awaitNanos(nanos);
|
||||
* }
|
||||
* // ...
|
||||
* return true;
|
||||
* } finally {
|
||||
* lock.unlock();
|
||||
* }
|
||||
@ -410,7 +412,8 @@ public interface Condition {
|
||||
* <p>The return value indicates whether the deadline has elapsed,
|
||||
* which can be used as follows:
|
||||
* <pre> {@code
|
||||
* boolean aMethod(Date deadline) {
|
||||
* boolean aMethod(Date deadline)
|
||||
* throws InterruptedException {
|
||||
* boolean stillWaiting = true;
|
||||
* lock.lock();
|
||||
* try {
|
||||
@ -420,6 +423,7 @@ public interface Condition {
|
||||
* stillWaiting = theCondition.awaitUntil(deadline);
|
||||
* }
|
||||
* // ...
|
||||
* return true;
|
||||
* } finally {
|
||||
* lock.unlock();
|
||||
* }
|
||||
|
@ -151,18 +151,20 @@ import jdk.internal.vm.annotation.ReservedStackAccess;
|
||||
* }
|
||||
*
|
||||
* double distanceFromOrigin() { // A read-only method
|
||||
* double currentX, currentY;
|
||||
* long stamp = sl.tryOptimisticRead();
|
||||
* double currentX = x, currentY = y;
|
||||
* if (!sl.validate(stamp)) {
|
||||
* stamp = sl.readLock();
|
||||
* do {
|
||||
* if (stamp == 0L)
|
||||
* stamp = sl.readLock();
|
||||
* try {
|
||||
* // possibly racy reads
|
||||
* currentX = x;
|
||||
* currentY = y;
|
||||
* } finally {
|
||||
* sl.unlockRead(stamp);
|
||||
* stamp = sl.tryConvertToOptimisticRead(stamp);
|
||||
* }
|
||||
* }
|
||||
* return Math.sqrt(currentX * currentX + currentY * currentY);
|
||||
* } while (stamp == 0);
|
||||
* return Math.hypot(currentX, currentY);
|
||||
* }
|
||||
*
|
||||
* void moveIfAtOrigin(double newX, double newY) { // upgrade
|
||||
|
@ -39,6 +39,18 @@ public interface JavaLangInvokeAccess {
|
||||
*/
|
||||
String getName(Object mname);
|
||||
|
||||
/**
|
||||
* Returns the {@code MethodType} for the given MemberName.
|
||||
* Used by {@see StackFrameInfo}.
|
||||
*/
|
||||
MethodType getMethodType(Object mname);
|
||||
|
||||
/**
|
||||
* Returns the descriptor for the given MemberName.
|
||||
* Used by {@see StackFrameInfo}.
|
||||
*/
|
||||
String getMethodDescriptor(Object mname);
|
||||
|
||||
/**
|
||||
* Returns {@code true} if the given MemberName is a native method. Used by
|
||||
* {@see StackFrameInfo}.
|
||||
|
@ -164,7 +164,7 @@ public abstract class Cache<K,V> {
|
||||
public static class EqualByteArray {
|
||||
|
||||
private final byte[] b;
|
||||
private volatile int hash;
|
||||
private int hash;
|
||||
|
||||
public EqualByteArray(byte[] b) {
|
||||
this.b = b;
|
||||
@ -172,12 +172,8 @@ public abstract class Cache<K,V> {
|
||||
|
||||
public int hashCode() {
|
||||
int h = hash;
|
||||
if (h == 0) {
|
||||
h = b.length + 1;
|
||||
for (int i = 0; i < b.length; i++) {
|
||||
h += (b[i] & 0xff) * 37;
|
||||
}
|
||||
hash = h;
|
||||
if (h == 0 && b.length > 0) {
|
||||
hash = h = Arrays.hashCode(b);
|
||||
}
|
||||
return h;
|
||||
}
|
||||
|
@ -550,10 +550,10 @@ void
|
||||
fileDescriptorClose(JNIEnv *env, jobject this)
|
||||
{
|
||||
FD fd = (*env)->GetLongField(env, this, IO_handle_fdID);
|
||||
HANDLE h = (HANDLE)fd;
|
||||
if ((*env)->ExceptionOccurred(env)) {
|
||||
return;
|
||||
}
|
||||
HANDLE h = (HANDLE)fd;
|
||||
|
||||
if (h == INVALID_HANDLE_VALUE) {
|
||||
return;
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2003, 2016, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2003, 2017, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
@ -62,7 +62,8 @@ void printnifs (netif *netifPP, char *str) {
|
||||
|
||||
#endif
|
||||
|
||||
static int bufsize = 4096;
|
||||
const ULONG BUFF_SIZE = 15360;
|
||||
const int MAX_TRIES = 3;
|
||||
|
||||
/*
|
||||
* return an array of IP_ADAPTER_ADDRESSES containing one element
|
||||
@ -78,25 +79,26 @@ static int getAdapters (JNIEnv *env, IP_ADAPTER_ADDRESSES **adapters) {
|
||||
strlen("IP Helper Library GetAdaptersAddresses function failed"
|
||||
" with error == ") + 10;
|
||||
int _ret = 0;
|
||||
int try;
|
||||
|
||||
|
||||
adapterInfo = (IP_ADAPTER_ADDRESSES *)malloc (bufsize);
|
||||
adapterInfo = (IP_ADAPTER_ADDRESSES *) malloc(BUFF_SIZE);
|
||||
if (adapterInfo == NULL) {
|
||||
JNU_ThrowByName(env, "java/lang/OutOfMemoryError",
|
||||
"Native heap allocation failure");
|
||||
return -1;
|
||||
}
|
||||
|
||||
len = bufsize;
|
||||
len = BUFF_SIZE;
|
||||
flags = GAA_FLAG_SKIP_DNS_SERVER;
|
||||
flags |= GAA_FLAG_SKIP_MULTICAST;
|
||||
flags |= GAA_FLAG_INCLUDE_PREFIX;
|
||||
ret = GetAdaptersAddresses(AF_UNSPEC, flags, NULL, adapterInfo, &len);
|
||||
|
||||
if (ret == ERROR_BUFFER_OVERFLOW) {
|
||||
for (try = 0; ret == ERROR_BUFFER_OVERFLOW && try < MAX_TRIES; ++try) {
|
||||
IP_ADAPTER_ADDRESSES * newAdapterInfo = NULL;
|
||||
if (len < (ULONG_MAX - bufsize)) {
|
||||
len = len + bufsize;
|
||||
if (len < (ULONG_MAX - BUFF_SIZE)) {
|
||||
len += BUFF_SIZE;
|
||||
}
|
||||
newAdapterInfo =
|
||||
(IP_ADAPTER_ADDRESSES *) realloc (adapterInfo, len);
|
||||
@ -159,21 +161,22 @@ IP_ADAPTER_ADDRESSES *getAdapter (JNIEnv *env, jint index) {
|
||||
size_t error_msg_buf_size =
|
||||
strlen("IP Helper Library GetAdaptersAddresses function failed with error == ") + 10;
|
||||
int _ret = 0;
|
||||
adapterInfo = (IP_ADAPTER_ADDRESSES *)malloc (bufsize);
|
||||
int try;
|
||||
adapterInfo = (IP_ADAPTER_ADDRESSES *) malloc(BUFF_SIZE);
|
||||
if (adapterInfo == NULL) {
|
||||
JNU_ThrowByName(env, "java/lang/OutOfMemoryError",
|
||||
"Native heap allocation failure");
|
||||
return NULL;
|
||||
}
|
||||
len = bufsize;
|
||||
len = BUFF_SIZE;
|
||||
flags = GAA_FLAG_SKIP_DNS_SERVER;
|
||||
flags |= GAA_FLAG_SKIP_MULTICAST;
|
||||
flags |= GAA_FLAG_INCLUDE_PREFIX;
|
||||
val = GetAdaptersAddresses(AF_UNSPEC, flags, NULL, adapterInfo, &len);
|
||||
if (val == ERROR_BUFFER_OVERFLOW) {
|
||||
for (try = 0; val == ERROR_BUFFER_OVERFLOW && try < MAX_TRIES; ++try) {
|
||||
IP_ADAPTER_ADDRESSES * newAdapterInfo = NULL;
|
||||
if (len < (ULONG_MAX - bufsize)) {
|
||||
len = len + bufsize;
|
||||
if (len < (ULONG_MAX - BUFF_SIZE)) {
|
||||
len += BUFF_SIZE;
|
||||
}
|
||||
newAdapterInfo =
|
||||
(IP_ADAPTER_ADDRESSES *) realloc (adapterInfo, len);
|
||||
|
@ -1,5 +1,6 @@
|
||||
/*
|
||||
* Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2011, 2017, Oracle and/or its affiliates. All rights reserved.
|
||||
* @LastModified: Sep 2017
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
@ -25,7 +26,7 @@
|
||||
|
||||
package com.sun.org.apache.xalan.internal;
|
||||
|
||||
import com.sun.org.apache.xalan.internal.utils.SecuritySupport;
|
||||
import jdk.xml.internal.SecuritySupport;
|
||||
|
||||
/**
|
||||
* Commonly used constants.
|
||||
|
@ -1,6 +1,6 @@
|
||||
/*
|
||||
* reserved comment block
|
||||
* DO NOT REMOVE OR ALTER!
|
||||
* Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved.
|
||||
* @LastModified: Sep 2017
|
||||
*/
|
||||
/*
|
||||
* Licensed to the Apache Software Foundation (ASF) under one or more
|
||||
@ -21,10 +21,9 @@
|
||||
|
||||
package com.sun.org.apache.xalan.internal.res;
|
||||
|
||||
import com.sun.org.apache.xalan.internal.utils.SecuritySupport;
|
||||
import java.util.ListResourceBundle;
|
||||
|
||||
import com.sun.org.apache.xpath.internal.res.XPATHMessages;
|
||||
import java.util.ResourceBundle;
|
||||
import jdk.xml.internal.SecuritySupport;
|
||||
|
||||
/**
|
||||
* Sets things up for issuing error messages. This class is misnamed, and should
|
||||
@ -37,7 +36,7 @@ public class XSLMessages extends XPATHMessages {
|
||||
/**
|
||||
* The language specific resource object for Xalan messages.
|
||||
*/
|
||||
private static ListResourceBundle XSLTBundle = null;
|
||||
private static ResourceBundle XSLTBundle = null;
|
||||
/**
|
||||
* The class name of the Xalan error message string table.
|
||||
*/
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2011, 2013, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2011, 2017, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
@ -26,6 +26,7 @@
|
||||
package com.sun.org.apache.xalan.internal.utils;
|
||||
|
||||
import com.sun.org.apache.xalan.internal.XalanConstants;
|
||||
import jdk.xml.internal.SecuritySupport;
|
||||
|
||||
/**
|
||||
* This is the base class for features and properties
|
||||
|
@ -1,5 +1,6 @@
|
||||
/*
|
||||
* Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved.
|
||||
* @LastModified: Sep 2017
|
||||
*/
|
||||
/*
|
||||
* Licensed to the Apache Software Foundation (ASF) under one or more
|
||||
@ -21,6 +22,7 @@
|
||||
package com.sun.org.apache.xalan.internal.utils;
|
||||
|
||||
import java.util.function.Supplier;
|
||||
import jdk.xml.internal.SecuritySupport;
|
||||
|
||||
/**
|
||||
* This class is duplicated for each JAXP subpackage so keep it in sync.
|
||||
|
@ -1,326 +0,0 @@
|
||||
/*
|
||||
* Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved.
|
||||
*/
|
||||
/*
|
||||
* Licensed to the Apache Software Foundation (ASF) under one or more
|
||||
* contributor license agreements. See the NOTICE file distributed with
|
||||
* this work for additional information regarding copyright ownership.
|
||||
* The ASF licenses this file to You under the Apache License, Version 2.0
|
||||
* (the "License"); you may not use this file except in compliance with
|
||||
* the License. You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package com.sun.org.apache.xalan.internal.utils;
|
||||
|
||||
import java.io.File;
|
||||
import java.io.FileInputStream;
|
||||
import java.io.FileNotFoundException;
|
||||
import java.io.IOException;
|
||||
import java.io.InputStream;
|
||||
import java.net.URL;
|
||||
|
||||
import java.security.AccessController;
|
||||
import java.security.PrivilegedAction;
|
||||
import java.security.PrivilegedActionException;
|
||||
import java.security.PrivilegedExceptionAction;
|
||||
import java.util.ListResourceBundle;
|
||||
import java.util.Locale;
|
||||
import java.util.MissingResourceException;
|
||||
import java.util.ResourceBundle;
|
||||
import java.util.Properties;
|
||||
|
||||
/**
|
||||
* This class is duplicated for each subpackage so keep it in sync. It is
|
||||
* package private and therefore is not exposed as part of any API.
|
||||
*
|
||||
* @xerces.internal
|
||||
*/
|
||||
public final class SecuritySupport {
|
||||
|
||||
private static final SecuritySupport securitySupport = new SecuritySupport();
|
||||
|
||||
/**
|
||||
* Return an instance of this class.
|
||||
*/
|
||||
public static SecuritySupport getInstance() {
|
||||
return securitySupport;
|
||||
}
|
||||
|
||||
public static ClassLoader getContextClassLoader() {
|
||||
return (ClassLoader) AccessController.doPrivileged(new PrivilegedAction() {
|
||||
public Object run() {
|
||||
ClassLoader cl = null;
|
||||
try {
|
||||
cl = Thread.currentThread().getContextClassLoader();
|
||||
} catch (SecurityException ex) {
|
||||
}
|
||||
return cl;
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
static ClassLoader getSystemClassLoader() {
|
||||
return (ClassLoader) AccessController.doPrivileged(new PrivilegedAction() {
|
||||
public Object run() {
|
||||
ClassLoader cl = null;
|
||||
try {
|
||||
cl = ClassLoader.getSystemClassLoader();
|
||||
} catch (SecurityException ex) {
|
||||
}
|
||||
return cl;
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
static ClassLoader getParentClassLoader(final ClassLoader cl) {
|
||||
return (ClassLoader) AccessController.doPrivileged(new PrivilegedAction() {
|
||||
public Object run() {
|
||||
ClassLoader parent = null;
|
||||
try {
|
||||
parent = cl.getParent();
|
||||
} catch (SecurityException ex) {
|
||||
}
|
||||
|
||||
// eliminate loops in case of the boot
|
||||
// ClassLoader returning itself as a parent
|
||||
return (parent == cl) ? null : parent;
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
public static String getSystemProperty(final String propName) {
|
||||
return (String) AccessController.doPrivileged(new PrivilegedAction() {
|
||||
public Object run() {
|
||||
return System.getProperty(propName);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
public static String getSystemProperty(final String propName, final String def) {
|
||||
return (String) AccessController.doPrivileged(new PrivilegedAction() {
|
||||
public Object run() {
|
||||
return System.getProperty(propName, def);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
static FileInputStream getFileInputStream(final File file)
|
||||
throws FileNotFoundException {
|
||||
try {
|
||||
return (FileInputStream) AccessController.doPrivileged(new PrivilegedExceptionAction() {
|
||||
public Object run() throws FileNotFoundException {
|
||||
return new FileInputStream(file);
|
||||
}
|
||||
});
|
||||
} catch (PrivilegedActionException e) {
|
||||
throw (FileNotFoundException)e.getException();
|
||||
}
|
||||
}
|
||||
|
||||
public static InputStream getResourceAsStream(final String name) {
|
||||
return (InputStream) AccessController.doPrivileged(new PrivilegedAction() {
|
||||
public Object run() {
|
||||
return SecuritySupport.class.getResourceAsStream("/"+name);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets a resource bundle using the specified base name, the default locale, and the caller's class loader.
|
||||
* @param bundle the base name of the resource bundle, a fully qualified class name
|
||||
* @return a resource bundle for the given base name and the default locale
|
||||
*/
|
||||
public static ListResourceBundle getResourceBundle(String bundle) {
|
||||
return getResourceBundle(bundle, Locale.getDefault());
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets a resource bundle using the specified base name and locale, and the caller's class loader.
|
||||
* @param bundle the base name of the resource bundle, a fully qualified class name
|
||||
* @param locale the locale for which a resource bundle is desired
|
||||
* @return a resource bundle for the given base name and locale
|
||||
*/
|
||||
public static ListResourceBundle getResourceBundle(final String bundle, final Locale locale) {
|
||||
return AccessController.doPrivileged(new PrivilegedAction<ListResourceBundle>() {
|
||||
public ListResourceBundle run() {
|
||||
try {
|
||||
return (ListResourceBundle)ResourceBundle.getBundle(bundle, locale);
|
||||
} catch (MissingResourceException e) {
|
||||
try {
|
||||
return (ListResourceBundle)ResourceBundle.getBundle(bundle, new Locale("en", "US"));
|
||||
} catch (MissingResourceException e2) {
|
||||
throw new MissingResourceException(
|
||||
"Could not load any resource bundle by " + bundle, bundle, "");
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
public static boolean getFileExists(final File f) {
|
||||
return ((Boolean) AccessController.doPrivileged(new PrivilegedAction() {
|
||||
public Object run() {
|
||||
return f.exists() ? Boolean.TRUE : Boolean.FALSE;
|
||||
}
|
||||
})).booleanValue();
|
||||
}
|
||||
|
||||
static long getLastModified(final File f) {
|
||||
return ((Long) AccessController.doPrivileged(new PrivilegedAction() {
|
||||
public Object run() {
|
||||
return f.lastModified();
|
||||
}
|
||||
})).longValue();
|
||||
}
|
||||
|
||||
/**
|
||||
* Strip off path from an URI
|
||||
*
|
||||
* @param uri an URI with full path
|
||||
* @return the file name only
|
||||
*/
|
||||
public static String sanitizePath(String uri) {
|
||||
if (uri == null) {
|
||||
return "";
|
||||
}
|
||||
int i = uri.lastIndexOf("/");
|
||||
if (i > 0) {
|
||||
return uri.substring(i+1, uri.length());
|
||||
}
|
||||
return "";
|
||||
}
|
||||
|
||||
/**
|
||||
* Check the protocol used in the systemId against allowed protocols
|
||||
*
|
||||
* @param systemId the Id of the URI
|
||||
* @param allowedProtocols a list of allowed protocols separated by comma
|
||||
* @param accessAny keyword to indicate allowing any protocol
|
||||
* @return the name of the protocol if rejected, null otherwise
|
||||
*/
|
||||
public static String checkAccess(String systemId, String allowedProtocols, String accessAny) throws IOException {
|
||||
if (systemId == null || (allowedProtocols != null &&
|
||||
allowedProtocols.equalsIgnoreCase(accessAny))) {
|
||||
return null;
|
||||
}
|
||||
|
||||
String protocol;
|
||||
if (systemId.indexOf(":")==-1) {
|
||||
protocol = "file";
|
||||
} else {
|
||||
URL url = new URL(systemId);
|
||||
protocol = url.getProtocol();
|
||||
if (protocol.equalsIgnoreCase("jar")) {
|
||||
String path = url.getPath();
|
||||
protocol = path.substring(0, path.indexOf(":"));
|
||||
} else if (protocol.equalsIgnoreCase("jrt")) {
|
||||
// if the systemId is "jrt" then allow access if "file" allowed
|
||||
protocol = "file";
|
||||
}
|
||||
}
|
||||
|
||||
if (isProtocolAllowed(protocol, allowedProtocols)) {
|
||||
//access allowed
|
||||
return null;
|
||||
} else {
|
||||
return protocol;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Check if the protocol is in the allowed list of protocols. The check
|
||||
* is case-insensitive while ignoring whitespaces.
|
||||
*
|
||||
* @param protocol a protocol
|
||||
* @param allowedProtocols a list of allowed protocols
|
||||
* @return true if the protocol is in the list
|
||||
*/
|
||||
private static boolean isProtocolAllowed(String protocol, String allowedProtocols) {
|
||||
if (allowedProtocols == null) {
|
||||
return false;
|
||||
}
|
||||
String temp[] = allowedProtocols.split(",");
|
||||
for (String t : temp) {
|
||||
t = t.trim();
|
||||
if (t.equalsIgnoreCase(protocol)) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
* Read JAXP system property in this order: system property,
|
||||
* $java.home/conf/jaxp.properties if the system property is not specified
|
||||
*
|
||||
* @param propertyId the Id of the property
|
||||
* @return the value of the property
|
||||
*/
|
||||
public static String getJAXPSystemProperty(String sysPropertyId) {
|
||||
String accessExternal = getSystemProperty(sysPropertyId);
|
||||
if (accessExternal == null) {
|
||||
accessExternal = readJAXPProperty(sysPropertyId);
|
||||
}
|
||||
return accessExternal;
|
||||
}
|
||||
|
||||
/**
|
||||
* Read from $java.home/conf/jaxp.properties for the specified property
|
||||
* The program
|
||||
*
|
||||
* @param propertyId the Id of the property
|
||||
* @return the value of the property
|
||||
*/
|
||||
static String readJAXPProperty(String propertyId) {
|
||||
String value = null;
|
||||
InputStream is = null;
|
||||
try {
|
||||
if (firstTime) {
|
||||
synchronized (cacheProps) {
|
||||
if (firstTime) {
|
||||
String configFile = getSystemProperty("java.home") + File.separator +
|
||||
"conf" + File.separator + "jaxp.properties";
|
||||
File f = new File(configFile);
|
||||
if (getFileExists(f)) {
|
||||
is = getFileInputStream(f);
|
||||
cacheProps.load(is);
|
||||
}
|
||||
firstTime = false;
|
||||
}
|
||||
}
|
||||
}
|
||||
value = cacheProps.getProperty(propertyId);
|
||||
|
||||
}
|
||||
catch (Exception ex) {}
|
||||
finally {
|
||||
if (is != null) {
|
||||
try {
|
||||
is.close();
|
||||
} catch (IOException ex) {}
|
||||
}
|
||||
}
|
||||
|
||||
return value;
|
||||
}
|
||||
|
||||
/**
|
||||
* Cache for properties in java.home/conf/jaxp.properties
|
||||
*/
|
||||
static final Properties cacheProps = new Properties();
|
||||
|
||||
/**
|
||||
* Flag indicating if the program has tried reading java.home/conf/jaxp.properties
|
||||
*/
|
||||
static volatile boolean firstTime = true;
|
||||
|
||||
private SecuritySupport () {}
|
||||
}
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2013, 2016, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2013, 2017, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
@ -27,6 +27,7 @@ package com.sun.org.apache.xalan.internal.utils;
|
||||
|
||||
import com.sun.org.apache.xalan.internal.XalanConstants;
|
||||
import java.util.concurrent.CopyOnWriteArrayList;
|
||||
import jdk.xml.internal.SecuritySupport;
|
||||
import org.xml.sax.SAXException;
|
||||
|
||||
|
||||
|
@ -1,5 +1,6 @@
|
||||
/*
|
||||
* Copyright (c) 2007, 2015, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2007, 2017, Oracle and/or its affiliates. All rights reserved.
|
||||
* @LastModified: Sep 2017
|
||||
*/
|
||||
/*
|
||||
* Licensed to the Apache Software Foundation (ASF) under one or more
|
||||
@ -24,7 +25,6 @@
|
||||
package com.sun.org.apache.xalan.internal.xsltc.compiler;
|
||||
|
||||
import com.sun.org.apache.xalan.internal.XalanConstants;
|
||||
import com.sun.org.apache.xalan.internal.utils.SecuritySupport;
|
||||
import com.sun.org.apache.xalan.internal.xsltc.compiler.util.ClassGenerator;
|
||||
import com.sun.org.apache.xalan.internal.xsltc.compiler.util.ErrorMsg;
|
||||
import com.sun.org.apache.xalan.internal.xsltc.compiler.util.MethodGenerator;
|
||||
@ -33,6 +33,7 @@ import com.sun.org.apache.xalan.internal.xsltc.compiler.util.TypeCheckError;
|
||||
import com.sun.org.apache.xml.internal.utils.SystemIDResolver;
|
||||
import java.util.Iterator;
|
||||
import javax.xml.XMLConstants;
|
||||
import jdk.xml.internal.SecuritySupport;
|
||||
import org.xml.sax.InputSource;
|
||||
import org.xml.sax.XMLReader;
|
||||
|
||||
|
@ -1,5 +1,6 @@
|
||||
/*
|
||||
* Copyright (c) 2007, 2015, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2007, 2017, Oracle and/or its affiliates. All rights reserved.
|
||||
* @LastModified: Sep 2017
|
||||
*/
|
||||
/*
|
||||
* Licensed to the Apache Software Foundation (ASF) under one or more
|
||||
@ -24,7 +25,6 @@
|
||||
package com.sun.org.apache.xalan.internal.xsltc.compiler;
|
||||
|
||||
import com.sun.org.apache.xalan.internal.XalanConstants;
|
||||
import com.sun.org.apache.xalan.internal.utils.SecuritySupport;
|
||||
import com.sun.org.apache.xalan.internal.xsltc.compiler.util.ClassGenerator;
|
||||
import com.sun.org.apache.xalan.internal.xsltc.compiler.util.ErrorMsg;
|
||||
import com.sun.org.apache.xalan.internal.xsltc.compiler.util.MethodGenerator;
|
||||
@ -33,6 +33,7 @@ import com.sun.org.apache.xalan.internal.xsltc.compiler.util.TypeCheckError;
|
||||
import com.sun.org.apache.xml.internal.utils.SystemIDResolver;
|
||||
import java.util.Iterator;
|
||||
import javax.xml.XMLConstants;
|
||||
import jdk.xml.internal.SecuritySupport;
|
||||
import org.xml.sax.InputSource;
|
||||
import org.xml.sax.XMLReader;
|
||||
|
||||
|
@ -1,5 +1,6 @@
|
||||
/*
|
||||
* Copyright (c) 2015, 2017, Oracle and/or its affiliates. All rights reserved.
|
||||
* @LastModified: Sep 2017
|
||||
*/
|
||||
/*
|
||||
* Licensed to the Apache Software Foundation (ASF) under one or more
|
||||
@ -24,7 +25,6 @@ import com.sun.java_cup.internal.runtime.Symbol;
|
||||
import com.sun.org.apache.xalan.internal.XalanConstants;
|
||||
import com.sun.org.apache.xalan.internal.utils.FactoryImpl;
|
||||
import com.sun.org.apache.xalan.internal.utils.ObjectFactory;
|
||||
import com.sun.org.apache.xalan.internal.utils.SecuritySupport;
|
||||
import com.sun.org.apache.xalan.internal.utils.XMLSecurityManager;
|
||||
import com.sun.org.apache.xalan.internal.xsltc.compiler.util.ErrorMsg;
|
||||
import com.sun.org.apache.xalan.internal.xsltc.compiler.util.MethodType;
|
||||
@ -49,6 +49,7 @@ import javax.xml.parsers.SAXParser;
|
||||
import javax.xml.parsers.SAXParserFactory;
|
||||
import jdk.xml.internal.JdkXmlFeatures;
|
||||
import jdk.xml.internal.JdkXmlUtils;
|
||||
import jdk.xml.internal.SecuritySupport;
|
||||
import org.xml.sax.Attributes;
|
||||
import org.xml.sax.ContentHandler;
|
||||
import org.xml.sax.InputSource;
|
||||
|
@ -1,5 +1,6 @@
|
||||
/*
|
||||
* Copyright (c) 2012, 2017, Oracle and/or its affiliates. All rights reserved.
|
||||
* @LastModified: Sep 2017
|
||||
*/
|
||||
/*
|
||||
* Licensed to the Apache Software Foundation (ASF) under one or more
|
||||
@ -22,12 +23,10 @@ package com.sun.org.apache.xalan.internal.xsltc.compiler;
|
||||
|
||||
import com.sun.org.apache.bcel.internal.classfile.JavaClass;
|
||||
import com.sun.org.apache.xalan.internal.XalanConstants;
|
||||
import com.sun.org.apache.xalan.internal.utils.SecuritySupport;
|
||||
import com.sun.org.apache.xalan.internal.utils.XMLSecurityManager;
|
||||
import com.sun.org.apache.xalan.internal.xsltc.compiler.util.ErrorMsg;
|
||||
import com.sun.org.apache.xalan.internal.xsltc.compiler.util.Util;
|
||||
import com.sun.org.apache.xml.internal.dtm.DTM;
|
||||
import java.io.BufferedOutputStream;
|
||||
import java.io.ByteArrayOutputStream;
|
||||
import java.io.File;
|
||||
import java.io.FileOutputStream;
|
||||
@ -51,6 +50,7 @@ import javax.xml.XMLConstants;
|
||||
import javax.xml.catalog.CatalogFeatures;
|
||||
import jdk.xml.internal.JdkXmlFeatures;
|
||||
import jdk.xml.internal.JdkXmlUtils;
|
||||
import jdk.xml.internal.SecuritySupport;
|
||||
import org.xml.sax.InputSource;
|
||||
import org.xml.sax.XMLReader;
|
||||
|
||||
@ -730,7 +730,7 @@ public final class XSLTC {
|
||||
*/
|
||||
public boolean setDestDirectory(String dstDirName) {
|
||||
final File dir = new File(dstDirName);
|
||||
if (SecuritySupport.getFileExists(dir) || dir.mkdirs()) {
|
||||
if (SecuritySupport.doesFileExist(dir) || dir.mkdirs()) {
|
||||
_destDir = dir;
|
||||
return true;
|
||||
}
|
||||
@ -902,7 +902,7 @@ public final class XSLTC {
|
||||
String parentDir = outFile.getParent();
|
||||
if (parentDir != null) {
|
||||
File parentFile = new File(parentDir);
|
||||
if (!SecuritySupport.getFileExists(parentFile))
|
||||
if (!SecuritySupport.doesFileExist(parentFile))
|
||||
parentFile.mkdirs();
|
||||
}
|
||||
}
|
||||
|
@ -1,5 +1,6 @@
|
||||
/*
|
||||
* Copyright (c) 2013, 2016, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2013, 2017, Oracle and/or its affiliates. All rights reserved.
|
||||
* @LastModified: Sep 2017
|
||||
*/
|
||||
/*
|
||||
* Licensed to the Apache Software Foundation (ASF) under one or more
|
||||
@ -20,13 +21,12 @@
|
||||
|
||||
package com.sun.org.apache.xalan.internal.xsltc.compiler.util;
|
||||
|
||||
import com.sun.org.apache.xalan.internal.utils.SecuritySupport;
|
||||
import com.sun.org.apache.xalan.internal.xsltc.compiler.Stylesheet;
|
||||
import com.sun.org.apache.xalan.internal.xsltc.compiler.SyntaxTreeNode;
|
||||
import java.text.MessageFormat;
|
||||
import java.util.Locale;
|
||||
import java.util.ResourceBundle;
|
||||
|
||||
import com.sun.org.apache.xalan.internal.xsltc.compiler.Stylesheet;
|
||||
import com.sun.org.apache.xalan.internal.xsltc.compiler.SyntaxTreeNode;
|
||||
import jdk.xml.internal.SecuritySupport;
|
||||
|
||||
/**
|
||||
* @author Jacek Ambroziak
|
||||
|
@ -1,6 +1,6 @@
|
||||
/*
|
||||
* reserved comment block
|
||||
* DO NOT REMOVE OR ALTER!
|
||||
* Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved.
|
||||
* @LastModified: Sep 2017
|
||||
*/
|
||||
/*
|
||||
* Licensed to the Apache Software Foundation (ASF) under one or more
|
||||
@ -21,12 +21,11 @@
|
||||
|
||||
package com.sun.org.apache.xalan.internal.xsltc.compiler.util;
|
||||
|
||||
import java.util.StringTokenizer;
|
||||
|
||||
import com.sun.org.apache.bcel.internal.generic.Type;
|
||||
import com.sun.org.apache.xalan.internal.utils.SecuritySupport;
|
||||
import com.sun.org.apache.xalan.internal.xsltc.compiler.Constants;
|
||||
import com.sun.org.apache.xml.internal.utils.XML11Char;
|
||||
import java.util.StringTokenizer;
|
||||
import jdk.xml.internal.SecuritySupport;
|
||||
|
||||
/**
|
||||
* @author Jacek Ambroziak
|
||||
|
@ -1,6 +1,6 @@
|
||||
/*
|
||||
* reserved comment block
|
||||
* DO NOT REMOVE OR ALTER!
|
||||
* Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved.
|
||||
* @LastModified: Sep 2017
|
||||
*/
|
||||
/*
|
||||
* Licensed to the Apache Software Foundation (ASF) under one or more
|
||||
@ -22,10 +22,6 @@
|
||||
package com.sun.org.apache.xalan.internal.xsltc.dom;
|
||||
|
||||
import com.sun.org.apache.xalan.internal.XalanConstants;
|
||||
import java.io.FileNotFoundException;
|
||||
|
||||
import javax.xml.transform.stream.StreamSource;
|
||||
|
||||
import com.sun.org.apache.xalan.internal.xsltc.DOM;
|
||||
import com.sun.org.apache.xalan.internal.xsltc.DOMCache;
|
||||
import com.sun.org.apache.xalan.internal.xsltc.DOMEnhancedForDTM;
|
||||
@ -33,16 +29,14 @@ import com.sun.org.apache.xalan.internal.xsltc.TransletException;
|
||||
import com.sun.org.apache.xalan.internal.xsltc.compiler.util.ErrorMsg;
|
||||
import com.sun.org.apache.xalan.internal.xsltc.runtime.AbstractTranslet;
|
||||
import com.sun.org.apache.xalan.internal.xsltc.trax.TemplatesImpl;
|
||||
import com.sun.org.apache.xalan.internal.utils.SecuritySupport;
|
||||
import com.sun.org.apache.xml.internal.dtm.DTM;
|
||||
import com.sun.org.apache.xml.internal.dtm.DTMAxisIterator;
|
||||
import com.sun.org.apache.xml.internal.dtm.DTMManager;
|
||||
import com.sun.org.apache.xml.internal.dtm.ref.DTMDefaultBase;
|
||||
import com.sun.org.apache.xml.internal.dtm.ref.EmptyIterator;
|
||||
import com.sun.org.apache.xml.internal.utils.SystemIDResolver;
|
||||
|
||||
import org.xml.sax.InputSource;
|
||||
import org.xml.sax.XMLReader;
|
||||
import java.io.FileNotFoundException;
|
||||
import javax.xml.transform.stream.StreamSource;
|
||||
import jdk.xml.internal.SecuritySupport;
|
||||
|
||||
/**
|
||||
* @author Morten Jorgensen
|
||||
|
@ -1,5 +1,6 @@
|
||||
/*
|
||||
* Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved.
|
||||
* @LastModified: Sep 2017
|
||||
*/
|
||||
/*
|
||||
* Licensed to the Apache Software Foundation (ASF) under one or more
|
||||
@ -20,17 +21,16 @@
|
||||
|
||||
package com.sun.org.apache.xalan.internal.xsltc.dom;
|
||||
|
||||
import java.text.CollationKey;
|
||||
import java.text.Collator;
|
||||
import java.util.Locale;
|
||||
|
||||
import com.sun.org.apache.xalan.internal.utils.ObjectFactory;
|
||||
import com.sun.org.apache.xalan.internal.xsltc.CollatorFactory;
|
||||
import com.sun.org.apache.xalan.internal.xsltc.DOM;
|
||||
import com.sun.org.apache.xalan.internal.xsltc.TransletException;
|
||||
import com.sun.org.apache.xalan.internal.xsltc.runtime.AbstractTranslet;
|
||||
import com.sun.org.apache.xml.internal.utils.StringComparable;
|
||||
import com.sun.org.apache.xalan.internal.utils.ObjectFactory;
|
||||
import com.sun.org.apache.xalan.internal.utils.SecuritySupport;
|
||||
import java.text.CollationKey;
|
||||
import java.text.Collator;
|
||||
import java.util.Locale;
|
||||
import jdk.xml.internal.SecuritySupport;
|
||||
|
||||
/**
|
||||
* Base class for sort records containing application specific sort keys
|
||||
|
@ -1,5 +1,6 @@
|
||||
/*
|
||||
* Copyright (c) 2007, 2017, Oracle and/or its affiliates. All rights reserved.
|
||||
* @LastModified: Sep 2017
|
||||
*/
|
||||
/*
|
||||
* Licensed to the Apache Software Foundation (ASF) under one or more
|
||||
@ -23,7 +24,23 @@
|
||||
|
||||
package com.sun.org.apache.xalan.internal.xsltc.runtime;
|
||||
|
||||
import com.sun.org.apache.xalan.internal.utils.SecuritySupport;
|
||||
import com.sun.org.apache.xalan.internal.xsltc.DOM;
|
||||
import com.sun.org.apache.xalan.internal.xsltc.Translet;
|
||||
import com.sun.org.apache.xalan.internal.xsltc.dom.AbsoluteIterator;
|
||||
import com.sun.org.apache.xalan.internal.xsltc.dom.ArrayNodeListIterator;
|
||||
import com.sun.org.apache.xalan.internal.xsltc.dom.DOMAdapter;
|
||||
import com.sun.org.apache.xalan.internal.xsltc.dom.MultiDOM;
|
||||
import com.sun.org.apache.xalan.internal.xsltc.dom.SingletonIterator;
|
||||
import com.sun.org.apache.xalan.internal.xsltc.dom.StepIterator;
|
||||
import com.sun.org.apache.xml.internal.dtm.Axis;
|
||||
import com.sun.org.apache.xml.internal.dtm.DTM;
|
||||
import com.sun.org.apache.xml.internal.dtm.DTMAxisIterator;
|
||||
import com.sun.org.apache.xml.internal.dtm.DTMManager;
|
||||
import com.sun.org.apache.xml.internal.dtm.ref.DTMDefaultBase;
|
||||
import com.sun.org.apache.xml.internal.dtm.ref.DTMNodeProxy;
|
||||
import com.sun.org.apache.xml.internal.serializer.NamespaceMappings;
|
||||
import com.sun.org.apache.xml.internal.serializer.SerializationHandler;
|
||||
import com.sun.org.apache.xml.internal.utils.XML11Char;
|
||||
import java.text.DecimalFormat;
|
||||
import java.text.DecimalFormatSymbols;
|
||||
import java.text.FieldPosition;
|
||||
@ -33,31 +50,13 @@ import java.util.Locale;
|
||||
import java.util.ResourceBundle;
|
||||
import java.util.concurrent.atomic.AtomicInteger;
|
||||
import javax.xml.transform.dom.DOMSource;
|
||||
|
||||
import com.sun.org.apache.xalan.internal.xsltc.DOM;
|
||||
import com.sun.org.apache.xalan.internal.xsltc.Translet;
|
||||
import com.sun.org.apache.xalan.internal.xsltc.dom.AbsoluteIterator;
|
||||
import com.sun.org.apache.xml.internal.dtm.Axis;
|
||||
import com.sun.org.apache.xalan.internal.xsltc.dom.DOMAdapter;
|
||||
import com.sun.org.apache.xalan.internal.xsltc.dom.MultiDOM;
|
||||
import com.sun.org.apache.xalan.internal.xsltc.dom.SingletonIterator;
|
||||
import com.sun.org.apache.xalan.internal.xsltc.dom.StepIterator;
|
||||
import com.sun.org.apache.xalan.internal.xsltc.dom.ArrayNodeListIterator;
|
||||
import com.sun.org.apache.xml.internal.dtm.DTM;
|
||||
import com.sun.org.apache.xml.internal.dtm.DTMAxisIterator;
|
||||
import com.sun.org.apache.xml.internal.dtm.DTMManager;
|
||||
import com.sun.org.apache.xml.internal.dtm.ref.DTMDefaultBase;
|
||||
import com.sun.org.apache.xml.internal.dtm.ref.DTMNodeProxy;
|
||||
|
||||
import org.w3c.dom.DOMException;
|
||||
import jdk.xml.internal.SecuritySupport;
|
||||
import org.w3c.dom.Attr;
|
||||
import org.w3c.dom.DOMException;
|
||||
import org.w3c.dom.Document;
|
||||
import org.w3c.dom.Element;
|
||||
import org.w3c.dom.NodeList;
|
||||
import org.xml.sax.SAXException;
|
||||
import com.sun.org.apache.xml.internal.serializer.NamespaceMappings;
|
||||
import com.sun.org.apache.xml.internal.serializer.SerializationHandler;
|
||||
import com.sun.org.apache.xml.internal.utils.XML11Char;
|
||||
|
||||
/**
|
||||
* Standard XSLT functions. All standard functions expect the current node
|
||||
|
@ -1,6 +1,6 @@
|
||||
/*
|
||||
* reserved comment block
|
||||
* DO NOT REMOVE OR ALTER!
|
||||
* Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved.
|
||||
* @LastModified: Sep 2017
|
||||
*/
|
||||
/*
|
||||
* Licensed to the Apache Software Foundation (ASF) under one or more
|
||||
@ -21,10 +21,10 @@
|
||||
|
||||
package com.sun.org.apache.xalan.internal.xsltc.runtime.output;
|
||||
|
||||
import com.sun.org.apache.xalan.internal.utils.SecuritySupport;
|
||||
import java.io.BufferedWriter;
|
||||
import java.io.IOException;
|
||||
import java.io.Writer;
|
||||
import jdk.xml.internal.SecuritySupport;
|
||||
|
||||
/**
|
||||
* @author Santiago Pericas-Geertsen
|
||||
|
@ -1,5 +1,6 @@
|
||||
/*
|
||||
* Copyright (c) 2007, 2017, Oracle and/or its affiliates. All rights reserved.
|
||||
* @LastModified: Sep 2017
|
||||
*/
|
||||
/*
|
||||
* Licensed to the Apache Software Foundation (ASF) under one or more
|
||||
@ -25,7 +26,6 @@ package com.sun.org.apache.xalan.internal.xsltc.trax;
|
||||
|
||||
import com.sun.org.apache.xalan.internal.XalanConstants;
|
||||
import com.sun.org.apache.xalan.internal.utils.ObjectFactory;
|
||||
import com.sun.org.apache.xalan.internal.utils.SecuritySupport;
|
||||
import com.sun.org.apache.xalan.internal.xsltc.DOM;
|
||||
import com.sun.org.apache.xalan.internal.xsltc.Translet;
|
||||
import com.sun.org.apache.xalan.internal.xsltc.compiler.Constants;
|
||||
@ -41,8 +41,8 @@ import java.lang.RuntimePermission;
|
||||
import java.lang.module.Configuration;
|
||||
import java.lang.module.ModuleDescriptor;
|
||||
import java.lang.module.ModuleFinder;
|
||||
import java.lang.module.ModuleReference;
|
||||
import java.lang.module.ModuleReader;
|
||||
import java.lang.module.ModuleReference;
|
||||
import java.lang.reflect.InvocationTargetException;
|
||||
import java.security.AccessController;
|
||||
import java.security.CodeSigner;
|
||||
@ -61,6 +61,7 @@ import javax.xml.transform.Templates;
|
||||
import javax.xml.transform.Transformer;
|
||||
import javax.xml.transform.TransformerConfigurationException;
|
||||
import javax.xml.transform.URIResolver;
|
||||
import jdk.xml.internal.SecuritySupport;
|
||||
|
||||
|
||||
/**
|
||||
|
@ -1,5 +1,6 @@
|
||||
/*
|
||||
* Copyright (c) 2007, 2016, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2007, 2017, Oracle and/or its affiliates. All rights reserved.
|
||||
* @LastModified: Sep 2017
|
||||
*/
|
||||
/*
|
||||
* Licensed to the Apache Software Foundation (ASF) under one or more
|
||||
@ -24,10 +25,9 @@ import com.sun.org.apache.xalan.internal.XalanConstants;
|
||||
import com.sun.org.apache.xalan.internal.utils.FactoryImpl;
|
||||
import com.sun.org.apache.xalan.internal.utils.FeaturePropertyBase;
|
||||
import com.sun.org.apache.xalan.internal.utils.ObjectFactory;
|
||||
import com.sun.org.apache.xalan.internal.utils.SecuritySupport;
|
||||
import com.sun.org.apache.xalan.internal.utils.XMLSecurityManager;
|
||||
import com.sun.org.apache.xalan.internal.utils.XMLSecurityPropertyManager;
|
||||
import com.sun.org.apache.xalan.internal.utils.XMLSecurityPropertyManager.Property;
|
||||
import com.sun.org.apache.xalan.internal.utils.XMLSecurityPropertyManager;
|
||||
import com.sun.org.apache.xalan.internal.xsltc.compiler.Constants;
|
||||
import com.sun.org.apache.xalan.internal.xsltc.compiler.SourceLoader;
|
||||
import com.sun.org.apache.xalan.internal.xsltc.compiler.XSLTC;
|
||||
@ -52,8 +52,8 @@ import java.util.zip.ZipEntry;
|
||||
import java.util.zip.ZipFile;
|
||||
import javax.xml.XMLConstants;
|
||||
import javax.xml.catalog.CatalogException;
|
||||
import javax.xml.catalog.CatalogFeatures;
|
||||
import javax.xml.catalog.CatalogFeatures.Feature;
|
||||
import javax.xml.catalog.CatalogFeatures;
|
||||
import javax.xml.catalog.CatalogManager;
|
||||
import javax.xml.catalog.CatalogResolver;
|
||||
import javax.xml.parsers.SAXParser;
|
||||
@ -78,6 +78,7 @@ import javax.xml.transform.stream.StreamResult;
|
||||
import javax.xml.transform.stream.StreamSource;
|
||||
import jdk.xml.internal.JdkXmlFeatures;
|
||||
import jdk.xml.internal.JdkXmlUtils;
|
||||
import jdk.xml.internal.SecuritySupport;
|
||||
import org.xml.sax.InputSource;
|
||||
import org.xml.sax.XMLFilter;
|
||||
import org.xml.sax.XMLReader;
|
||||
|
@ -1,5 +1,6 @@
|
||||
/*
|
||||
* Copyright (c) 2009, 2017, Oracle and/or its affiliates. All rights reserved.
|
||||
* @LastModified: Sep 2017
|
||||
*/
|
||||
/*
|
||||
* Licensed to the Apache Software Foundation (ASF) under one or more
|
||||
@ -24,7 +25,6 @@ import com.sun.org.apache.xerces.internal.util.URI;
|
||||
import com.sun.org.apache.xerces.internal.util.XML11Char;
|
||||
import com.sun.org.apache.xerces.internal.util.XMLChar;
|
||||
import com.sun.org.apache.xerces.internal.utils.ObjectFactory;
|
||||
import com.sun.org.apache.xerces.internal.utils.SecuritySupport;
|
||||
import com.sun.org.apache.xerces.internal.xni.NamespaceContext;
|
||||
import java.io.IOException;
|
||||
import java.io.ObjectInputStream;
|
||||
@ -34,6 +34,7 @@ import java.lang.reflect.Constructor;
|
||||
import java.util.HashMap;
|
||||
import java.util.Hashtable;
|
||||
import java.util.Map;
|
||||
import jdk.xml.internal.SecuritySupport;
|
||||
import org.w3c.dom.Attr;
|
||||
import org.w3c.dom.CDATASection;
|
||||
import org.w3c.dom.Comment;
|
||||
|
@ -1,5 +1,6 @@
|
||||
/*
|
||||
* Copyright (c) 2013, 2016, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2013, 2017, Oracle and/or its affiliates. All rights reserved.
|
||||
* @LastModified: Sep 2017
|
||||
*/
|
||||
/*
|
||||
* Licensed to the Apache Software Foundation (ASF) under one or more
|
||||
@ -54,7 +55,6 @@ import java.util.Locale;
|
||||
import javax.xml.XMLConstants;
|
||||
import javax.xml.catalog.CatalogFeatures;
|
||||
import jdk.xml.internal.JdkXmlUtils;
|
||||
import jdk.xml.internal.SecuritySupport;
|
||||
import org.w3c.dom.DOMConfiguration;
|
||||
import org.w3c.dom.DOMErrorHandler;
|
||||
import org.w3c.dom.DOMException;
|
||||
|
@ -1,6 +1,6 @@
|
||||
/*
|
||||
* reserved comment block
|
||||
* DO NOT REMOVE OR ALTER!
|
||||
* Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved.
|
||||
* @LastModified: Sep 2017
|
||||
*/
|
||||
/*
|
||||
* Licensed to the Apache Software Foundation (ASF) under one or more
|
||||
@ -21,10 +21,10 @@
|
||||
|
||||
|
||||
package com.sun.org.apache.xerces.internal.dom;
|
||||
import com.sun.org.apache.xerces.internal.utils.SecuritySupport;
|
||||
import java.util.Locale;
|
||||
import java.util.MissingResourceException;
|
||||
import java.util.ResourceBundle;
|
||||
import jdk.xml.internal.SecuritySupport;
|
||||
|
||||
/**
|
||||
* Used to format DOM error messages, using the system locale.
|
||||
|
@ -1,5 +1,6 @@
|
||||
/*
|
||||
* Copyright (c) 2009, 2016, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2009, 2017, Oracle and/or its affiliates. All rights reserved.
|
||||
* @LastModified: Sep 2017
|
||||
*/
|
||||
/*
|
||||
* Licensed to the Apache Software Foundation (ASF) under one or more
|
||||
@ -20,9 +21,9 @@
|
||||
|
||||
package com.sun.org.apache.xerces.internal.impl;
|
||||
|
||||
import com.sun.org.apache.xerces.internal.utils.SecuritySupport;
|
||||
import java.util.Enumeration;
|
||||
import java.util.NoSuchElementException;
|
||||
import jdk.xml.internal.SecuritySupport;
|
||||
|
||||
/**
|
||||
* Commonly used constants.
|
||||
|
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