提交 ecd87a90 编写于 作者: L lana

Merge

...@@ -240,3 +240,5 @@ f82b730c798b6bf38946baaba8a7d80fd5efaa70 jdk8-b115 ...@@ -240,3 +240,5 @@ f82b730c798b6bf38946baaba8a7d80fd5efaa70 jdk8-b115
0dc0067f3b8efb299a4c23f76ee26ea64df9e1d7 jdk8-b116 0dc0067f3b8efb299a4c23f76ee26ea64df9e1d7 jdk8-b116
fc4ac66aa657e09de5f8257c3174f240ed0cbaf7 jdk8-b117 fc4ac66aa657e09de5f8257c3174f240ed0cbaf7 jdk8-b117
28ca338366ff2774ac9002f9f6eaff4101a3ea3b jdk8-b118 28ca338366ff2774ac9002f9f6eaff4101a3ea3b jdk8-b118
e4499a6529e8c3e762ba86f45cdd774c92a8e7bc jdk8-b119
d31cd980e1da31fa496a359caaf1a165aeb5791a jdk8-b120
...@@ -54,7 +54,7 @@ $(JCE_MANIFEST): $(MAINMANIFEST) ...@@ -54,7 +54,7 @@ $(JCE_MANIFEST): $(MAINMANIFEST)
########################################################################################## ##########################################################################################
# For security and crypto jars, always build the jar, but for closed, install the prebuilt # For security and crypto jars, always build the jar, but for closed, install the prebuilt
# signed version instead of the newly built jar. Unsigned jars are treated as intermediate # signed version instead of the newly built jar. Unsigned jars are treated as intermediate
# targets and explicitly added to the JARS list. For open, signing is not needed. See # targets and explicitly added to the TARGETS list. For open, signing is not needed. See
# SignJars.gmk for more information. # SignJars.gmk for more information.
# #
# The source for the crypto jars is not available for all licensees. The BUILD_CRYPTO # The source for the crypto jars is not available for all licensees. The BUILD_CRYPTO
...@@ -63,7 +63,7 @@ $(JCE_MANIFEST): $(MAINMANIFEST) ...@@ -63,7 +63,7 @@ $(JCE_MANIFEST): $(MAINMANIFEST)
# other way to get the jars than to build them. # other way to get the jars than to build them.
SUNPKCS11_JAR_DST := $(JDK_OUTPUTDIR)/lib/ext/sunpkcs11.jar SUNPKCS11_JAR_DST := $(JDK_OUTPUTDIR)/lib/ext/sunpkcs11.jar
SUNPKCS11_JAR_UNSIGNED := $(JDK_OUTPUTDIR)/unsigned/sunpkcs11.jar SUNPKCS11_JAR_UNSIGNED := $(JDK_OUTPUTDIR)/jce/unsigned/sunpkcs11.jar
$(eval $(call SetupArchive,BUILD_SUNPKCS11_JAR, , \ $(eval $(call SetupArchive,BUILD_SUNPKCS11_JAR, , \
SRCS := $(JDK_OUTPUTDIR)/classes_security, \ SRCS := $(JDK_OUTPUTDIR)/classes_security, \
...@@ -78,19 +78,19 @@ $(SUNPKCS11_JAR_UNSIGNED): $(JCE_MANIFEST) ...@@ -78,19 +78,19 @@ $(SUNPKCS11_JAR_UNSIGNED): $(JCE_MANIFEST)
ifndef OPENJDK ifndef OPENJDK
SUNPKCS11_JAR_SRC := $(JDK_TOPDIR)/make/closed/tools/crypto/pkcs11/sunpkcs11.jar SUNPKCS11_JAR_SRC := $(JDK_TOPDIR)/make/closed/tools/crypto/pkcs11/sunpkcs11.jar
$(SUNPKCS11_JAR_DST): $(SUNPKCS11_JAR_SRC) $(SUNPKCS11_JAR_DST): $(SUNPKCS11_JAR_SRC)
@$(ECHO) $(LOG_INFO) "\n>>>Installing prebuilt SunPKCS11 provider..." @$(ECHO) $(LOG_INFO) Copying prebuilt $(@F)
$(install-file) $(install-file)
else else
$(SUNPKCS11_JAR_DST): $(SUNPKCS11_JAR_UNSIGNED) $(SUNPKCS11_JAR_DST): $(SUNPKCS11_JAR_UNSIGNED)
$(install-file) $(install-file)
endif endif
JARS += $(SUNPKCS11_JAR_UNSIGNED) $(SUNPKCS11_JAR_DST) TARGETS += $(SUNPKCS11_JAR_UNSIGNED) $(SUNPKCS11_JAR_DST)
########################################################################################## ##########################################################################################
SUNEC_JAR_DST := $(JDK_OUTPUTDIR)/lib/ext/sunec.jar SUNEC_JAR_DST := $(JDK_OUTPUTDIR)/lib/ext/sunec.jar
SUNEC_JAR_UNSIGNED := $(JDK_OUTPUTDIR)/unsigned/sunec.jar SUNEC_JAR_UNSIGNED := $(JDK_OUTPUTDIR)/jce/unsigned/sunec.jar
$(eval $(call SetupArchive,BUILD_SUNEC_JAR, , \ $(eval $(call SetupArchive,BUILD_SUNEC_JAR, , \
SRCS := $(JDK_OUTPUTDIR)/classes_security, \ SRCS := $(JDK_OUTPUTDIR)/classes_security, \
...@@ -105,19 +105,19 @@ $(SUNEC_JAR_UNSIGNED): $(JCE_MANIFEST) ...@@ -105,19 +105,19 @@ $(SUNEC_JAR_UNSIGNED): $(JCE_MANIFEST)
ifndef OPENJDK ifndef OPENJDK
SUNEC_JAR_SRC := $(JDK_TOPDIR)/make/closed/tools/crypto/ec/sunec.jar SUNEC_JAR_SRC := $(JDK_TOPDIR)/make/closed/tools/crypto/ec/sunec.jar
$(SUNEC_JAR_DST): $(SUNEC_JAR_SRC) $(SUNEC_JAR_DST): $(SUNEC_JAR_SRC)
@$(ECHO) $(LOG_INFO) "\n>>>Installing prebuilt SunEC provider..." @$(ECHO) $(LOG_INFO) Copying prebuilt $(@F)
$(install-file) $(install-file)
else else
$(SUNEC_JAR_DST): $(SUNEC_JAR_UNSIGNED) $(SUNEC_JAR_DST): $(SUNEC_JAR_UNSIGNED)
$(install-file) $(install-file)
endif endif
JARS += $(SUNEC_JAR_UNSIGNED) $(SUNEC_JAR_DST) TARGETS += $(SUNEC_JAR_UNSIGNED) $(SUNEC_JAR_DST)
########################################################################################## ##########################################################################################
SUNJCE_PROVIDER_JAR_DST := $(JDK_OUTPUTDIR)/lib/ext/sunjce_provider.jar SUNJCE_PROVIDER_JAR_DST := $(JDK_OUTPUTDIR)/lib/ext/sunjce_provider.jar
SUNJCE_PROVIDER_JAR_UNSIGNED := $(JDK_OUTPUTDIR)/unsigned/sunjce_provider.jar SUNJCE_PROVIDER_JAR_UNSIGNED := $(JDK_OUTPUTDIR)/jce/unsigned/sunjce_provider.jar
ifneq ($(BUILD_CRYPTO), no) ifneq ($(BUILD_CRYPTO), no)
$(eval $(call SetupArchive,BUILD_SUNJCE_PROVIDER_JAR, , \ $(eval $(call SetupArchive,BUILD_SUNJCE_PROVIDER_JAR, , \
...@@ -130,25 +130,25 @@ ifneq ($(BUILD_CRYPTO), no) ...@@ -130,25 +130,25 @@ ifneq ($(BUILD_CRYPTO), no)
$(SUNJCE_PROVIDER_JAR_UNSIGNED): $(JCE_MANIFEST) $(SUNJCE_PROVIDER_JAR_UNSIGNED): $(JCE_MANIFEST)
JARS += $(SUNJCE_PROVIDER_JAR_UNSIGNED) TARGETS += $(SUNJCE_PROVIDER_JAR_UNSIGNED)
endif endif
ifndef OPENJDK ifndef OPENJDK
SUNJCE_PROVIDER_JAR_SRC := $(JDK_TOPDIR)/make/closed/tools/crypto/jce/sunjce_provider.jar SUNJCE_PROVIDER_JAR_SRC := $(JDK_TOPDIR)/make/closed/tools/crypto/jce/sunjce_provider.jar
$(SUNJCE_PROVIDER_JAR_DST): $(SUNJCE_PROVIDER_JAR_SRC) $(SUNJCE_PROVIDER_JAR_DST): $(SUNJCE_PROVIDER_JAR_SRC)
@$(ECHO) $(LOG_INFO) "\n>>>Installing prebuilt SunJCE provider..." @$(ECHO) $(LOG_INFO) Copying prebuilt $(@F)
$(install-file) $(install-file)
else else
$(SUNJCE_PROVIDER_JAR_DST): $(SUNJCE_PROVIDER_JAR_UNSIGNED) $(SUNJCE_PROVIDER_JAR_DST): $(SUNJCE_PROVIDER_JAR_UNSIGNED)
$(install-file) $(install-file)
endif endif
JARS += $(SUNJCE_PROVIDER_JAR_DST) TARGETS += $(SUNJCE_PROVIDER_JAR_DST)
########################################################################################## ##########################################################################################
JCE_JAR_DST := $(JDK_OUTPUTDIR)/lib/jce.jar JCE_JAR_DST := $(JDK_OUTPUTDIR)/lib/jce.jar
JCE_JAR_UNSIGNED := $(JDK_OUTPUTDIR)/unsigned/jce.jar JCE_JAR_UNSIGNED := $(JDK_OUTPUTDIR)/jce/unsigned/jce.jar
ifneq ($(BUILD_CRYPTO), no) ifneq ($(BUILD_CRYPTO), no)
$(eval $(call SetupArchive,BUILD_JCE_JAR, , \ $(eval $(call SetupArchive,BUILD_JCE_JAR, , \
...@@ -161,36 +161,43 @@ ifneq ($(BUILD_CRYPTO), no) ...@@ -161,36 +161,43 @@ ifneq ($(BUILD_CRYPTO), no)
$(JCE_JAR_UNSIGNED): $(JCE_MANIFEST) $(JCE_JAR_UNSIGNED): $(JCE_MANIFEST)
JARS += $(JCE_JAR_UNSIGNED) TARGETS += $(JCE_JAR_UNSIGNED)
endif endif
ifndef OPENJDK ifndef OPENJDK
JCE_JAR_SRC := $(JDK_TOPDIR)/make/closed/tools/crypto/jce/jce.jar JCE_JAR_SRC := $(JDK_TOPDIR)/make/closed/tools/crypto/jce/jce.jar
$(JCE_JAR_DST): $(JCE_JAR_SRC) $(JCE_JAR_DST): $(JCE_JAR_SRC)
@$(ECHO) $(LOG_INFO) "\n>>>Installing prebuilt jce.jar..." @$(ECHO) $(LOG_INFO) Copying prebuilt $(@F)
$(install-file) $(install-file)
else else
$(JCE_JAR_DST): $(JCE_JAR_UNSIGNED) $(JCE_JAR_DST): $(JCE_JAR_UNSIGNED)
$(install-file) $(install-file)
endif endif
JARS += $(JCE_JAR_DST) TARGETS += $(JCE_JAR_DST)
########################################################################################## ##########################################################################################
US_EXPORT_POLICY_JAR_DST := $(JDK_OUTPUTDIR)/lib/security/US_export_policy.jar US_EXPORT_POLICY_JAR_DST := $(JDK_OUTPUTDIR)/lib/security/US_export_policy.jar
US_EXPORT_POLICY_JAR_UNSIGNED := $(JDK_OUTPUTDIR)/unsigned/US_export_policy.jar
ifneq ($(BUILD_CRYPTO), no) ifneq ($(BUILD_CRYPTO), no)
US_EXPORT_POLICY_JAR_LIMITED_UNSIGNED := \
$(JDK_OUTPUTDIR)/jce/unsigned/policy/limited/US_export_policy.jar
US_EXPORT_POLICY_JAR_UNLIMITED_UNSIGNED := \
$(JDK_OUTPUTDIR)/jce/unsigned/policy/unlimited/US_export_policy.jar
# #
# TODO fix so that SetupArchive does not write files into SRCS # TODO fix so that SetupArchive does not write files into SRCS
# then we don't need this extra copying # then we don't need this extra copying
# #
# NOTE: We currently do not place restrictions on our limited export # NOTE: We currently do not place restrictions on our limited export
# policy. This was not a typo. # policy. This was not a typo. This means we are shipping the same file
# for both limimted and unlimited US_export_policy.jar.
# #
US_EXPORT_POLICY_JAR_SRC_DIR := $(JDK_TOPDIR)/make/data/cryptopolicy/unlimited US_EXPORT_POLICY_JAR_SRC_DIR := $(JDK_TOPDIR)/make/data/cryptopolicy/unlimited
US_EXPORT_POLICY_JAR_TMP := $(JDK_OUTPUTDIR)/US_export_policy_jar.tmp US_EXPORT_POLICY_JAR_TMP := \
$(JDK_OUTPUTDIR)/jce/unsigned/policy/unlimited/US_export_policy_jar.tmp
$(US_EXPORT_POLICY_JAR_TMP)/%: $(US_EXPORT_POLICY_JAR_SRC_DIR)/% $(US_EXPORT_POLICY_JAR_TMP)/%: $(US_EXPORT_POLICY_JAR_SRC_DIR)/%
$(install-file) $(install-file)
...@@ -200,77 +207,113 @@ ifneq ($(BUILD_CRYPTO), no) ...@@ -200,77 +207,113 @@ ifneq ($(BUILD_CRYPTO), no)
$(eval $(call SetupArchive,BUILD_US_EXPORT_POLICY_JAR, $(US_EXPORT_POLICY_JAR_DEPS), \ $(eval $(call SetupArchive,BUILD_US_EXPORT_POLICY_JAR, $(US_EXPORT_POLICY_JAR_DEPS), \
SRCS := $(US_EXPORT_POLICY_JAR_TMP), \ SRCS := $(US_EXPORT_POLICY_JAR_TMP), \
SUFFIXES := .policy, \ SUFFIXES := .policy, \
JAR := $(US_EXPORT_POLICY_JAR_UNSIGNED), \ JAR := $(US_EXPORT_POLICY_JAR_UNLIMITED_UNSIGNED), \
EXTRA_MANIFEST_ATTR := Crypto-Strength: unlimited, \ EXTRA_MANIFEST_ATTR := Crypto-Strength: unlimited, \
SKIP_METAINF := true)) SKIP_METAINF := true))
JARS += $(US_EXPORT_POLICY_JAR_UNSIGNED) $(US_EXPORT_POLICY_JAR_LIMITED_UNSIGNED): $(US_EXPORT_POLICY_JAR_UNLIMITED_UNSIGNED)
$(ECHO) $(LOG_INFO) Copying unlimited $(patsubst $(OUTPUT_ROOT)/%,%,$@)
$(install-file)
TARGETS += $(US_EXPORT_POLICY_JAR_LIMITED_UNSIGNED) \
$(US_EXPORT_POLICY_JAR_UNLIMITED_UNSIGNED)
endif endif
ifndef OPENJDK ifndef OPENJDK
ifeq ($(UNLIMITED_CRYPTO), true)
$(error No prebuilt unlimited crypto jars available)
endif
$(US_EXPORT_POLICY_JAR_DST): $(JDK_TOPDIR)/make/closed/tools/crypto/jce/US_export_policy.jar $(US_EXPORT_POLICY_JAR_DST): $(JDK_TOPDIR)/make/closed/tools/crypto/jce/US_export_policy.jar
$(ECHO) $(LOG_INFO) Copying $(@F) $(ECHO) $(LOG_INFO) Copying prebuilt $(@F)
$(install-file) $(install-file)
else else
$(US_EXPORT_POLICY_JAR_DST): $(US_EXPORT_POLICY_JAR_UNSIGNED) ifeq ($(UNLIMITED_CRYPTO), true)
$(US_EXPORT_POLICY_JAR_DST): $(US_EXPORT_POLICY_JAR_UNLIMITED_UNSIGNED)
$(install-file) $(install-file)
else
$(US_EXPORT_POLICY_JAR_DST): $(US_EXPORT_POLICY_JAR_LIMITED_UNSIGNED)
$(install-file)
endif
endif endif
JARS += $(US_EXPORT_POLICY_JAR_DST) TARGETS += $(US_EXPORT_POLICY_JAR_DST)
########################################################################################## ##########################################################################################
LOCAL_POLICY_JAR_DST := $(JDK_OUTPUTDIR)/lib/security/local_policy.jar LOCAL_POLICY_JAR_DST := $(JDK_OUTPUTDIR)/lib/security/local_policy.jar
LOCAL_POLICY_JAR_UNSIGNED := $(JDK_OUTPUTDIR)/unsigned/local_policy.jar
ifneq ($(BUILD_CRYPTO), no) ifneq ($(BUILD_CRYPTO), no)
LOCAL_POLICY_JAR_LIMITED_UNSIGNED := \
$(JDK_OUTPUTDIR)/jce/unsigned/policy/limited/local_policy.jar
LOCAL_POLICY_JAR_UNLIMITED_UNSIGNED := \
$(JDK_OUTPUTDIR)/jce/unsigned/policy/unlimited/local_policy.jar
# #
# TODO fix so that SetupArchive does not write files into SRCS # TODO fix so that SetupArchive does not write files into SRCS
# then we don't need this extra copying # then we don't need this extra copying
# #
LOCAL_POLICY_JAR_TMP := $(JDK_OUTPUTDIR)/local_policy_jar.tmp LOCAL_POLICY_JAR_LIMITED_TMP := \
$(JDK_OUTPUTDIR)/jce/unsigned/policy/limited/local_policy_jar.tmp
LOCAL_POLICY_JAR_UNLIMITED_TMP := \
$(JDK_OUTPUTDIR)/jce/unsigned/policy/unlimited/local_policy_jar.tmp
ifeq ($(UNLIMITED_CRYPTO), true) $(LOCAL_POLICY_JAR_LIMITED_TMP)/%: $(JDK_TOPDIR)/make/data/cryptopolicy/limited/%
LOCAL_POLICY_JAR_SRC_DIR := $(JDK_TOPDIR)/make/data/cryptopolicy/unlimited $(install-file)
LOCAL_POLICY_JAR_DEPS := $(LOCAL_POLICY_JAR_TMP)/default_local.policy
LOCAL_POLICY_JAR_ATTR := Crypto-Strength: unlimited
else
LOCAL_POLICY_JAR_SRC_DIR := $(JDK_TOPDIR)/make/data/cryptopolicy/limited
LOCAL_POLICY_JAR_DEPS := $(LOCAL_POLICY_JAR_TMP)/exempt_local.policy \
$(LOCAL_POLICY_JAR_TMP)/default_local.policy
LOCAL_POLICY_JAR_ATTR := Crypto-Strength: limited
endif
$(LOCAL_POLICY_JAR_TMP)/%: $(LOCAL_POLICY_JAR_SRC_DIR)/% $(LOCAL_POLICY_JAR_UNLIMITED_TMP)/%: $(JDK_TOPDIR)/make/data/cryptopolicy/unlimited/%
$(install-file) $(install-file)
$(eval $(call SetupArchive,BUILD_LOCAL_POLICY_JAR, $(LOCAL_POLICY_JAR_DEPS), \ $(eval $(call SetupArchive,BUILD_LOCAL_POLICY_JAR_LIMITED, \
SRCS := $(LOCAL_POLICY_JAR_TMP), \ $(LOCAL_POLICY_JAR_LIMITED_TMP)/exempt_local.policy \
$(LOCAL_POLICY_JAR_LIMITED_TMP)/default_local.policy, \
SRCS := $(LOCAL_POLICY_JAR_LIMITED_TMP), \
SUFFIXES := .policy, \ SUFFIXES := .policy, \
JAR := $(LOCAL_POLICY_JAR_UNSIGNED), \ JAR := $(LOCAL_POLICY_JAR_LIMITED_UNSIGNED), \
EXTRA_MANIFEST_ATTR := $(LOCAL_POLICY_JAR_ATTR), \ EXTRA_MANIFEST_ATTR := Crypto-Strength: limited, \
SKIP_METAINF := true)) SKIP_METAINF := true))
JARS += $(LOCAL_POLICY_JAR_UNSIGNED) $(eval $(call SetupArchive,BUILD_LOCAL_POLICY_JAR_UNLIMITED, \
$(LOCAL_POLICY_JAR_UNLIMITED_TMP)/default_local.policy, \
SRCS := $(LOCAL_POLICY_JAR_UNLIMITED_TMP), \
SUFFIXES := .policy, \
JAR := $(LOCAL_POLICY_JAR_UNLIMITED_UNSIGNED), \
EXTRA_MANIFEST_ATTR := Crypto-Strength: unlimited, \
SKIP_METAINF := true))
TARGETS += $(LOCAL_POLICY_JAR_LIMITED_UNSIGNED) $(LOCAL_POLICY_JAR_UNLIMITED_UNSIGNED)
ifndef OPENJDK
$(JDK_OUTPUTDIR)/jce/unsigned/policy/unlimited/README.txt: \
$(JDK_TOPDIR)/make/closed/javax/crypto/doc/README.txt
$(install-file)
TARGETS += $(JDK_OUTPUTDIR)/jce/unsigned/policy/unlimited/README.txt
endif
endif endif
ifndef OPENJDK ifndef OPENJDK
$(LOCAL_POLICY_JAR_DST): $(JDK_TOPDIR)/make/closed/tools/crypto/jce/local_policy.jar $(LOCAL_POLICY_JAR_DST): $(JDK_TOPDIR)/make/closed/tools/crypto/jce/local_policy.jar
$(ECHO) $(LOG_INFO) Copying $(@F) $(ECHO) $(LOG_INFO) Copying prebuilt $(@F)
$(install-file) $(install-file)
else else
$(LOCAL_POLICY_JAR_DST): $(LOCAL_POLICY_JAR_UNSIGNED) ifeq ($(UNLIMITED_CRYPTO), true)
$(LOCAL_POLICY_JAR_DST): $(LOCAL_POLICY_JAR_UNLIMITED_UNSIGNED)
$(install-file) $(install-file)
else
$(LOCAL_POLICY_JAR_DST): $(LOCAL_POLICY_JAR_LIMITED_UNSIGNED)
$(install-file)
endif
endif endif
JARS += $(LOCAL_POLICY_JAR_DST) TARGETS += $(LOCAL_POLICY_JAR_DST)
########################################################################################## ##########################################################################################
ifeq ($(OPENJDK_TARGET_OS), windows) ifeq ($(OPENJDK_TARGET_OS), windows)
SUNMSCAPI_JAR_DST := $(JDK_OUTPUTDIR)/lib/ext/sunmscapi.jar SUNMSCAPI_JAR_DST := $(JDK_OUTPUTDIR)/lib/ext/sunmscapi.jar
SUNMSCAPI_JAR_UNSIGNED := $(JDK_OUTPUTDIR)/unsigned/sunmscapi.jar SUNMSCAPI_JAR_UNSIGNED := $(JDK_OUTPUTDIR)/jce/unsigned/sunmscapi.jar
$(eval $(call SetupArchive,BUILD_SUNMSCAPI_JAR, , \ $(eval $(call SetupArchive,BUILD_SUNMSCAPI_JAR, , \
SRCS := $(JDK_OUTPUTDIR)/classes_security, \ SRCS := $(JDK_OUTPUTDIR)/classes_security, \
...@@ -285,14 +328,14 @@ ifeq ($(OPENJDK_TARGET_OS), windows) ...@@ -285,14 +328,14 @@ ifeq ($(OPENJDK_TARGET_OS), windows)
ifndef OPENJDK ifndef OPENJDK
SUNMSCAPI_JAR_SRC := $(JDK_TOPDIR)/make/closed/tools/crypto/mscapi/sunmscapi.jar SUNMSCAPI_JAR_SRC := $(JDK_TOPDIR)/make/closed/tools/crypto/mscapi/sunmscapi.jar
$(SUNMSCAPI_JAR_DST): $(SUNMSCAPI_JAR_SRC) $(SUNMSCAPI_JAR_DST): $(SUNMSCAPI_JAR_SRC)
@$(ECHO) $(LOG_INFO) "\n>>>Installing prebuilt SunMSCAPI provider..." @$(ECHO) $(LOG_INFO) Copying prebuilt $(@F)
$(install-file) $(install-file)
else else
$(SUNMSCAPI_JAR_DST): $(SUNMSCAPI_JAR_UNSIGNED) $(SUNMSCAPI_JAR_DST): $(SUNMSCAPI_JAR_UNSIGNED)
$(install-file) $(install-file)
endif endif
JARS += $(SUNMSCAPI_JAR_UNSIGNED) $(SUNMSCAPI_JAR_DST) TARGETS += $(SUNMSCAPI_JAR_UNSIGNED) $(SUNMSCAPI_JAR_DST)
endif endif
...@@ -302,7 +345,7 @@ ifeq ($(OPENJDK_TARGET_OS), solaris) ...@@ -302,7 +345,7 @@ ifeq ($(OPENJDK_TARGET_OS), solaris)
ifndef OPENJDK ifndef OPENJDK
UCRYPTO_JAR_DST := $(JDK_OUTPUTDIR)/lib/ext/ucrypto.jar UCRYPTO_JAR_DST := $(JDK_OUTPUTDIR)/lib/ext/ucrypto.jar
UCRYPTO_JAR_UNSIGNED := $(JDK_OUTPUTDIR)/unsigned/ucrypto.jar UCRYPTO_JAR_UNSIGNED := $(JDK_OUTPUTDIR)/jce/unsigned/ucrypto.jar
UCRYPTO_JAR_SRC := $(JDK_TOPDIR)/make/closed/tools/crypto/ucrypto/ucrypto.jar UCRYPTO_JAR_SRC := $(JDK_TOPDIR)/make/closed/tools/crypto/ucrypto/ucrypto.jar
$(eval $(call SetupArchive,BUILD_UCRYPTO_JAR, , \ $(eval $(call SetupArchive,BUILD_UCRYPTO_JAR, , \
...@@ -316,14 +359,14 @@ ifeq ($(OPENJDK_TARGET_OS), solaris) ...@@ -316,14 +359,14 @@ ifeq ($(OPENJDK_TARGET_OS), solaris)
$(UCRYPTO_JAR_UNSIGNED): $(JCE_MANIFEST) $(UCRYPTO_JAR_UNSIGNED): $(JCE_MANIFEST)
$(UCRYPTO_JAR_DST): $(UCRYPTO_JAR_SRC) $(UCRYPTO_JAR_DST): $(UCRYPTO_JAR_SRC)
@$(ECHO) $(LOG_INFO) "\n>>>Installing prebuilt OracleUcrypto provider..." @$(ECHO) $(LOG_INFO) Copying prebuilt $(@F)
$(install-file) $(install-file)
JARS += $(UCRYPTO_JAR_UNSIGNED) $(UCRYPTO_JAR_DST) TARGETS += $(UCRYPTO_JAR_UNSIGNED) $(UCRYPTO_JAR_DST)
endif endif
endif endif
all: $(JARS) all: $(TARGETS)
.PHONY: default all .PHONY: default all
...@@ -80,7 +80,7 @@ check-keystore: ...@@ -80,7 +80,7 @@ check-keystore:
exit 2; \ exit 2; \
fi fi
$(JCE_OUTPUTDIR)/%: $(JDK_OUTPUTDIR)/unsigned/% $(JDK_OUTPUTDIR)/jce/signed/%: $(JDK_OUTPUTDIR)/jce/unsigned/%
$(call install-file) $(call install-file)
$(JARSIGNER) -keystore $(SIGNING_KEYSTORE) \ $(JARSIGNER) -keystore $(SIGNING_KEYSTORE) \
$@ $(SIGNING_ALIAS) < $(SIGNING_PASSPHRASE) $@ $(SIGNING_ALIAS) < $(SIGNING_PASSPHRASE)
...@@ -88,26 +88,33 @@ $(JCE_OUTPUTDIR)/%: $(JDK_OUTPUTDIR)/unsigned/% ...@@ -88,26 +88,33 @@ $(JCE_OUTPUTDIR)/%: $(JDK_OUTPUTDIR)/unsigned/%
JAR_LIST := \ JAR_LIST := \
jce.jar \ jce.jar \
local_policy.jar \ policy/limited/local_policy.jar \
policy/limited/US_export_policy.jar \
policy/unlimited/local_policy.jar \
policy/unlimited/US_export_policy.jar \
sunec.jar \ sunec.jar \
sunjce_provider.jar \ sunjce_provider.jar \
sunpkcs11.jar \ sunpkcs11.jar \
US_export_policy.jar \
sunmscapi.jar \ sunmscapi.jar \
ucrypto.jar \ ucrypto.jar \
# #
UNSIGNED_JARS := $(wildcard $(addprefix $(JDK_OUTPUTDIR)/unsigned/, $(JAR_LIST))) UNSIGNED_JARS := $(wildcard $(addprefix $(JDK_OUTPUTDIR)/jce/unsigned/, $(JAR_LIST)))
ifeq ($(UNSIGNED_JARS), ) ifeq ($(UNSIGNED_JARS), )
$(error No jars found in $(JDK_OUTPUTDIR)/unsigned/) $(error No jars found in $(JDK_OUTPUTDIR)/jce/unsigned/)
endif endif
SIGNED_JARS := $(patsubst $(JDK_OUTPUTDIR)/unsigned/%,$(JCE_OUTPUTDIR)/%, $(UNSIGNED_JARS)) SIGNED_JARS := $(patsubst $(JDK_OUTPUTDIR)/jce/unsigned/%,$(JDK_OUTPUTDIR)/jce/signed/%, \
$(UNSIGNED_JARS))
$(SIGNED_JARS): check-keystore $(SIGNED_JARS): check-keystore
all: $(SIGNED_JARS) $(JDK_OUTPUTDIR)/jce/signed/policy/unlimited/README.txt: \
$(JDK_OUTPUTDIR)/jce/unsigned/policy/unlimited/README.txt
$(install-file)
all: $(SIGNED_JARS) $(JDK_OUTPUTDIR)/jce/signed/policy/unlimited/README.txt
@$(PRINTF) "\n*** The jar files built by the 'sign-jars' target are developer ***" @$(PRINTF) "\n*** The jar files built by the 'sign-jars' target are developer ***"
@$(PRINTF) "\n*** builds only and *MUST NOT* be checked into the closed workspace. ***" @$(PRINTF) "\n*** builds only and *MUST NOT* be checked into the closed workspace. ***"
@$(PRINTF) "\n*** ***" @$(PRINTF) "\n*** ***"
......
...@@ -62,7 +62,7 @@ jdeps \- Java class dependency analyzer\&. ...@@ -62,7 +62,7 @@ jdeps \- Java class dependency analyzer\&.
\fIoptions\fR \fIoptions\fR
Command-line options\&. See Options\&. Command-line options\&. See Options\&.
.TP .TP
\fIclass\fR\fIes\fR \fIclasses\fR
Name of the classes to analyze\&. You can specify a class that can be found in the class path, by its file name, a directory, or a JAR file\&. Name of the classes to analyze\&. You can specify a class that can be found in the class path, by its file name, a directory, or a JAR file\&.
.SH DESCRIPTION .SH DESCRIPTION
The \fI\fR\f3jdeps\fR command shows the package-level or class-level dependencies of Java class files\&. The input class can be a path name to a \f3\&.class\fR file, a directory, a JAR file, or it can be a fully qualified class name to analyze all class files\&. The options determine the output\&. By default, \f3jdeps\fR outputs the dependencies to the system output\&. It can generate the dependencies in DOT language (see the \f3-dotoutput\fR option)\&. The \fI\fR\f3jdeps\fR command shows the package-level or class-level dependencies of Java class files\&. The input class can be a path name to a \f3\&.class\fR file, a directory, a JAR file, or it can be a fully qualified class name to analyze all class files\&. The options determine the output\&. By default, \f3jdeps\fR outputs the dependencies to the system output\&. It can generate the dependencies in DOT language (see the \f3-dotoutput\fR option)\&.
...@@ -106,6 +106,12 @@ Finds dependencies in packages matching the specified regular expression pattern ...@@ -106,6 +106,12 @@ Finds dependencies in packages matching the specified regular expression pattern
.br .br
Restricts analysis to classes matching pattern\&. This option filters the list of classes to be analyzed\&. It can be used together with \f3-p\fR and \f3-e\fR which apply pattern to the dependencies\&. Restricts analysis to classes matching pattern\&. This option filters the list of classes to be analyzed\&. It can be used together with \f3-p\fR and \f3-e\fR which apply pattern to the dependencies\&.
.TP .TP
-jdkinternals
.br
Finds class-level dependences in JDK internal APIs\&. By default, it analyzes all classes specified in the \f3-classpath\fR option and in input files unless you specified the \f3-include\fR option\&. You cannot use this option with the \f3-p\fR, \f3-e\fR, and \f3-s\fR options\&.
\fIWarning\fR: JDK internal APIs may not be accessible in upcoming releases\&.
.TP
-P, -profile -P, -profile
.br .br
Shows profile or the file containing a package\&. Shows profile or the file containing a package\&.
......
...@@ -62,7 +62,7 @@ jdeps \- Java class dependency analyzer\&. ...@@ -62,7 +62,7 @@ jdeps \- Java class dependency analyzer\&.
\fIoptions\fR \fIoptions\fR
Command-line options\&. See Options\&. Command-line options\&. See Options\&.
.TP .TP
\fIclass\fR\fIes\fR \fIclasses\fR
Name of the classes to analyze\&. You can specify a class that can be found in the class path, by its file name, a directory, or a JAR file\&. Name of the classes to analyze\&. You can specify a class that can be found in the class path, by its file name, a directory, or a JAR file\&.
.SH DESCRIPTION .SH DESCRIPTION
The \fI\fR\f3jdeps\fR command shows the package-level or class-level dependencies of Java class files\&. The input class can be a path name to a \f3\&.class\fR file, a directory, a JAR file, or it can be a fully qualified class name to analyze all class files\&. The options determine the output\&. By default, \f3jdeps\fR outputs the dependencies to the system output\&. It can generate the dependencies in DOT language (see the \f3-dotoutput\fR option)\&. The \fI\fR\f3jdeps\fR command shows the package-level or class-level dependencies of Java class files\&. The input class can be a path name to a \f3\&.class\fR file, a directory, a JAR file, or it can be a fully qualified class name to analyze all class files\&. The options determine the output\&. By default, \f3jdeps\fR outputs the dependencies to the system output\&. It can generate the dependencies in DOT language (see the \f3-dotoutput\fR option)\&.
...@@ -106,6 +106,12 @@ Finds dependencies in packages matching the specified regular expression pattern ...@@ -106,6 +106,12 @@ Finds dependencies in packages matching the specified regular expression pattern
.br .br
Restricts analysis to classes matching pattern\&. This option filters the list of classes to be analyzed\&. It can be used together with \f3-p\fR and \f3-e\fR which apply pattern to the dependencies\&. Restricts analysis to classes matching pattern\&. This option filters the list of classes to be analyzed\&. It can be used together with \f3-p\fR and \f3-e\fR which apply pattern to the dependencies\&.
.TP .TP
-jdkinternals
.br
Finds class-level dependences in JDK internal APIs\&. By default, it analyzes all classes specified in the \f3-classpath\fR option and in input files unless you specified the \f3-include\fR option\&. You cannot use this option with the \f3-p\fR, \f3-e\fR, and \f3-s\fR options\&.
\fIWarning\fR: JDK internal APIs may not be accessible in upcoming releases\&.
.TP
-P, -profile -P, -profile
.br .br
Shows profile or the file containing a package\&. Shows profile or the file containing a package\&.
......
...@@ -916,8 +916,7 @@ public class Krb5LoginModule implements LoginModule { ...@@ -916,8 +916,7 @@ public class Krb5LoginModule implements LoginModule {
char[] tmpPassword = ((PasswordCallback) char[] tmpPassword = ((PasswordCallback)
callbacks[0]).getPassword(); callbacks[0]).getPassword();
if (tmpPassword == null) { if (tmpPassword == null) {
// treat a NULL password as an empty password throw new LoginException("No password provided");
tmpPassword = new char[0];
} }
password = new char[tmpPassword.length]; password = new char[tmpPassword.length];
System.arraycopy(tmpPassword, 0, System.arraycopy(tmpPassword, 0,
......
...@@ -392,7 +392,7 @@ public class Applet extends Panel { ...@@ -392,7 +392,7 @@ public class Applet extends Panel {
* Each element of the array should be a set of three * Each element of the array should be a set of three
* <code>Strings</code> containing the name, the type, and a * <code>Strings</code> containing the name, the type, and a
* description. For example: * description. For example:
* <p><blockquote><pre> * <blockquote><pre>
* String pinfo[][] = { * String pinfo[][] = {
* {"fps", "1-10", "frames per second"}, * {"fps", "1-10", "frames per second"},
* {"repeat", "boolean", "repeat image loop"}, * {"repeat", "boolean", "repeat image loop"},
......
...@@ -107,7 +107,7 @@ public interface AppletContext { ...@@ -107,7 +107,7 @@ public interface AppletContext {
* <code>target</code> argument indicates in which HTML frame the * <code>target</code> argument indicates in which HTML frame the
* document is to be displayed. * document is to be displayed.
* The target argument is interpreted as follows: * The target argument is interpreted as follows:
* <p> *
* <center><table border="3" summary="Target arguments and their descriptions"> * <center><table border="3" summary="Target arguments and their descriptions">
* <tr><th>Target Argument</th><th>Description</th></tr> * <tr><th>Target Argument</th><th>Description</th></tr>
* <tr><td><code>"_self"</code> <td>Show in the window and frame that * <tr><td><code>"_self"</code> <td>Show in the window and frame that
......
...@@ -43,7 +43,6 @@ import java.security.BasicPermission; ...@@ -43,7 +43,6 @@ import java.security.BasicPermission;
* target names, and for each provides a description of what the * target names, and for each provides a description of what the
* permission allows and a discussion of the risks of granting code * permission allows and a discussion of the risks of granting code
* the permission. * the permission.
* <P>
* *
* <table border=1 cellpadding=5 summary="AWTPermission target names, descriptions, and associated risks."> * <table border=1 cellpadding=5 summary="AWTPermission target names, descriptions, and associated risks.">
* <tr> * <tr>
......
...@@ -175,7 +175,6 @@ import sun.java2d.SunCompositeContext; ...@@ -175,7 +175,6 @@ import sun.java2d.SunCompositeContext;
* <em>F<sub>s</sub></em> and <em>F<sub>d</sub></em> and then the resulting * <em>F<sub>s</sub></em> and <em>F<sub>d</sub></em> and then the resulting
* premultiplied components <em>A<sub>r</sub></em> and <em>C<sub>r</sub></em>. * premultiplied components <em>A<sub>r</sub></em> and <em>C<sub>r</sub></em>.
* *
* <p>
* <h3>Preparing Results</h3> * <h3>Preparing Results</h3>
* *
* <p> * <p>
...@@ -193,7 +192,6 @@ import sun.java2d.SunCompositeContext; ...@@ -193,7 +192,6 @@ import sun.java2d.SunCompositeContext;
* by zero" and the color components are left as * by zero" and the color components are left as
* all zeros. * all zeros.
* *
* <p>
* <h3>Performance Considerations</h3> * <h3>Performance Considerations</h3>
* *
* <p> * <p>
...@@ -216,7 +214,6 @@ import sun.java2d.SunCompositeContext; ...@@ -216,7 +214,6 @@ import sun.java2d.SunCompositeContext;
* for their pixels. Such sources supply an alpha of 1.0 for * for their pixels. Such sources supply an alpha of 1.0 for
* all of their pixels. * all of their pixels.
* *
* <p>
* <li> * <li>
* Many destinations also have no place to store the alpha values * Many destinations also have no place to store the alpha values
* that result from the blending calculations performed by this class. * that result from the blending calculations performed by this class.
...@@ -227,7 +224,6 @@ import sun.java2d.SunCompositeContext; ...@@ -227,7 +224,6 @@ import sun.java2d.SunCompositeContext;
* values by the resulting alpha value before storing the color * values by the resulting alpha value before storing the color
* values and discarding the alpha value. * values and discarding the alpha value.
* *
* <p>
* <li> * <li>
* The accuracy of the results depends on the manner in which pixels * The accuracy of the results depends on the manner in which pixels
* are stored in the destination. * are stored in the destination.
...@@ -248,7 +244,6 @@ import sun.java2d.SunCompositeContext; ...@@ -248,7 +244,6 @@ import sun.java2d.SunCompositeContext;
* the need to choose a pixel from a limited palette to match the * the need to choose a pixel from a limited palette to match the
* results of the blending equations. * results of the blending equations.
* *
* <p>
* <li> * <li>
* Nearly all formats store pixels as discrete integers rather than * Nearly all formats store pixels as discrete integers rather than
* the floating point values used in the reference equations above. * the floating point values used in the reference equations above.
...@@ -268,7 +263,6 @@ import sun.java2d.SunCompositeContext; ...@@ -268,7 +263,6 @@ import sun.java2d.SunCompositeContext;
* represents 0.0 and 0xff represents * represents 0.0 and 0xff represents
* 1.0. * 1.0.
* *
* <p>
* <li> * <li>
* The internal implementation can approximate some of the equations * The internal implementation can approximate some of the equations
* and it can also eliminate some steps to avoid unnecessary operations. * and it can also eliminate some steps to avoid unnecessary operations.
...@@ -332,7 +326,6 @@ import sun.java2d.SunCompositeContext; ...@@ -332,7 +326,6 @@ import sun.java2d.SunCompositeContext;
* <p> * <p>
* and thus they would all match. * and thus they would all match.
* *
* <p>
* <li> * <li>
* Because of the technique of simplifying the equations for * Because of the technique of simplifying the equations for
* calculation efficiency, some implementations might perform * calculation efficiency, some implementations might perform
......
...@@ -39,7 +39,7 @@ import java.lang.annotation.Native; ...@@ -39,7 +39,7 @@ import java.lang.annotation.Native;
* {@link Shape} and the decorations applied at the ends and joins of * {@link Shape} and the decorations applied at the ends and joins of
* path segments of the <code>Shape</code>. * path segments of the <code>Shape</code>.
* These rendering attributes include: * These rendering attributes include:
* <dl compact> * <dl>
* <dt><i>width</i> * <dt><i>width</i>
* <dd>The pen width, measured perpendicularly to the pen trajectory. * <dd>The pen width, measured perpendicularly to the pen trajectory.
* <dt><i>end caps</i> * <dt><i>end caps</i>
......
...@@ -99,7 +99,7 @@ import java.util.Hashtable; ...@@ -99,7 +99,7 @@ import java.util.Hashtable;
* style="float:center; margin: 7px 10px;"> * style="float:center; margin: 7px 10px;">
* <p> * <p>
* The code for this applet is as follows: * The code for this applet is as follows:
* <p> *
* <hr><blockquote><pre> * <hr><blockquote><pre>
* import java.awt.*; * import java.awt.*;
* import java.applet.Applet; * import java.applet.Applet;
......
...@@ -388,7 +388,7 @@ public class Button extends Component implements Accessible { ...@@ -388,7 +388,7 @@ public class Button extends Component implements Accessible {
* This method is not called unless action events are * This method is not called unless action events are
* enabled for this button. Action events are enabled * enabled for this button. Action events are enabled
* when one of the following occurs: * when one of the following occurs:
* <p><ul> * <ul>
* <li>An <code>ActionListener</code> object is registered * <li>An <code>ActionListener</code> object is registered
* via <code>addActionListener</code>. * via <code>addActionListener</code>.
* <li>Action events are enabled via <code>enableEvents</code>. * <li>Action events are enabled via <code>enableEvents</code>.
......
...@@ -41,7 +41,7 @@ import javax.accessibility.*; ...@@ -41,7 +41,7 @@ import javax.accessibility.*;
* <p> * <p>
* The following code example creates a set of check boxes in * The following code example creates a set of check boxes in
* a grid layout: * a grid layout:
* <p> *
* <hr><blockquote><pre> * <hr><blockquote><pre>
* setLayout(new GridLayout(3, 1)); * setLayout(new GridLayout(3, 1));
* add(new Checkbox("one", null, true)); * add(new Checkbox("one", null, true));
...@@ -558,7 +558,7 @@ public class Checkbox extends Component implements ItemSelectable, Accessible { ...@@ -558,7 +558,7 @@ public class Checkbox extends Component implements ItemSelectable, Accessible {
* This method is not called unless item events are * This method is not called unless item events are
* enabled for this component. Item events are enabled * enabled for this component. Item events are enabled
* when one of the following occurs: * when one of the following occurs:
* <p><ul> * <ul>
* <li>An <code>ItemListener</code> object is registered * <li>An <code>ItemListener</code> object is registered
* via <code>addItemListener</code>. * via <code>addItemListener</code>.
* <li>Item events are enabled via <code>enableEvents</code>. * <li>Item events are enabled via <code>enableEvents</code>.
......
...@@ -35,7 +35,7 @@ package java.awt; ...@@ -35,7 +35,7 @@ package java.awt;
* <p> * <p>
* The following code example produces a new check box group, * The following code example produces a new check box group,
* with three check boxes: * with three check boxes:
* <p> *
* <hr><blockquote><pre> * <hr><blockquote><pre>
* setLayout(new GridLayout(3, 1)); * setLayout(new GridLayout(3, 1));
* CheckboxGroup cbg = new CheckboxGroup(); * CheckboxGroup cbg = new CheckboxGroup();
......
...@@ -367,7 +367,7 @@ public class CheckboxMenuItem extends MenuItem implements ItemSelectable, Access ...@@ -367,7 +367,7 @@ public class CheckboxMenuItem extends MenuItem implements ItemSelectable, Access
* This method is not called unless item events are * This method is not called unless item events are
* enabled for this menu item. Item events are enabled * enabled for this menu item. Item events are enabled
* when one of the following occurs: * when one of the following occurs:
* <p><ul> * <ul>
* <li>An <code>ItemListener</code> object is registered * <li>An <code>ItemListener</code> object is registered
* via <code>addItemListener</code>. * via <code>addItemListener</code>.
* <li>Item events are enabled via <code>enableEvents</code>. * <li>Item events are enabled via <code>enableEvents</code>.
......
...@@ -40,7 +40,7 @@ import javax.accessibility.*; ...@@ -40,7 +40,7 @@ import javax.accessibility.*;
* The current choice is displayed as the title of the menu. * The current choice is displayed as the title of the menu.
* <p> * <p>
* The following code example produces a pop-up menu: * The following code example produces a pop-up menu:
* <p> *
* <hr><blockquote><pre> * <hr><blockquote><pre>
* Choice ColorChooser = new Choice(); * Choice ColorChooser = new Choice();
* ColorChooser.add("Green"); * ColorChooser.add("Green");
...@@ -609,7 +609,7 @@ public class Choice extends Component implements ItemSelectable, Accessible { ...@@ -609,7 +609,7 @@ public class Choice extends Component implements ItemSelectable, Accessible {
* This method is not called unless item events are * This method is not called unless item events are
* enabled for this component. Item events are enabled * enabled for this component. Item events are enabled
* when one of the following occurs: * when one of the following occurs:
* <p><ul> * <ul>
* <li>An <code>ItemListener</code> object is registered * <li>An <code>ItemListener</code> object is registered
* via <code>addItemListener</code>. * via <code>addItemListener</code>.
* <li>Item events are enabled via <code>enableEvents</code>. * <li>Item events are enabled via <code>enableEvents</code>.
......
...@@ -106,7 +106,7 @@ import sun.util.logging.PlatformLogger; ...@@ -106,7 +106,7 @@ import sun.util.logging.PlatformLogger;
* adding/removing components to/from containers, the whole hierarchy must be * adding/removing components to/from containers, the whole hierarchy must be
* validated afterwards by means of the {@link Container#validate()} method * validated afterwards by means of the {@link Container#validate()} method
* invoked on the top-most invalid container of the hierarchy. * invoked on the top-most invalid container of the hierarchy.
* <p> *
* <h3>Serialization</h3> * <h3>Serialization</h3>
* It is important to note that only AWT listeners which conform * It is important to note that only AWT listeners which conform
* to the <code>Serializable</code> protocol will be saved when * to the <code>Serializable</code> protocol will be saved when
...@@ -3859,7 +3859,7 @@ public abstract class Component implements ImageObserver, MenuContainer, ...@@ -3859,7 +3859,7 @@ public abstract class Component implements ImageObserver, MenuContainer,
* This is a proxy capabilities class used when a FlipBufferStrategy * This is a proxy capabilities class used when a FlipBufferStrategy
* is created instead of the requested Blit strategy. * is created instead of the requested Blit strategy.
* *
* @see sun.awt.SunGraphicsEnvironment#isFlipStrategyPreferred(ComponentPeer) * @see sun.java2d.SunGraphicsEnvironment#isFlipStrategyPreferred(ComponentPeer)
*/ */
private class ProxyCapabilities extends ExtendedBufferCapabilities { private class ProxyCapabilities extends ExtendedBufferCapabilities {
private BufferCapabilities orig; private BufferCapabilities orig;
...@@ -4515,7 +4515,7 @@ public abstract class Component implements ImageObserver, MenuContainer, ...@@ -4515,7 +4515,7 @@ public abstract class Component implements ImageObserver, MenuContainer,
* Private class to perform sub-region blitting. Swing will use * Private class to perform sub-region blitting. Swing will use
* this subclass via the SubRegionShowable interface in order to * this subclass via the SubRegionShowable interface in order to
* copy only the area changed during a repaint. * copy only the area changed during a repaint.
* @see javax.swing.BufferStrategyPaintManager * See javax.swing.BufferStrategyPaintManager.
*/ */
private class BltSubRegionBufferStrategy extends BltBufferStrategy private class BltSubRegionBufferStrategy extends BltBufferStrategy
implements SubRegionShowable implements SubRegionShowable
...@@ -6328,7 +6328,7 @@ public abstract class Component implements ImageObserver, MenuContainer, ...@@ -6328,7 +6328,7 @@ public abstract class Component implements ImageObserver, MenuContainer,
* This method is not called unless component events are * This method is not called unless component events are
* enabled for this component. Component events are enabled * enabled for this component. Component events are enabled
* when one of the following occurs: * when one of the following occurs:
* <p><ul> * <ul>
* <li>A <code>ComponentListener</code> object is registered * <li>A <code>ComponentListener</code> object is registered
* via <code>addComponentListener</code>. * via <code>addComponentListener</code>.
* <li>Component events are enabled via <code>enableEvents</code>. * <li>Component events are enabled via <code>enableEvents</code>.
...@@ -6373,7 +6373,7 @@ public abstract class Component implements ImageObserver, MenuContainer, ...@@ -6373,7 +6373,7 @@ public abstract class Component implements ImageObserver, MenuContainer,
* This method is not called unless focus events are * This method is not called unless focus events are
* enabled for this component. Focus events are enabled * enabled for this component. Focus events are enabled
* when one of the following occurs: * when one of the following occurs:
* <p><ul> * <ul>
* <li>A <code>FocusListener</code> object is registered * <li>A <code>FocusListener</code> object is registered
* via <code>addFocusListener</code>. * via <code>addFocusListener</code>.
* <li>Focus events are enabled via <code>enableEvents</code>. * <li>Focus events are enabled via <code>enableEvents</code>.
...@@ -6393,7 +6393,7 @@ public abstract class Component implements ImageObserver, MenuContainer, ...@@ -6393,7 +6393,7 @@ public abstract class Component implements ImageObserver, MenuContainer,
* with a <code>FocusEvent</code> as the argument will result in a * with a <code>FocusEvent</code> as the argument will result in a
* call to the <code>Component</code>'s <code>processFocusEvent</code> * call to the <code>Component</code>'s <code>processFocusEvent</code>
* method regardless of the current <code>KeyboardFocusManager</code>. * method regardless of the current <code>KeyboardFocusManager</code>.
* <p> *
* <p>Note that if the event parameter is <code>null</code> * <p>Note that if the event parameter is <code>null</code>
* the behavior is unspecified and may result in an * the behavior is unspecified and may result in an
* exception. * exception.
...@@ -6430,7 +6430,7 @@ public abstract class Component implements ImageObserver, MenuContainer, ...@@ -6430,7 +6430,7 @@ public abstract class Component implements ImageObserver, MenuContainer,
* This method is not called unless key events are * This method is not called unless key events are
* enabled for this component. Key events are enabled * enabled for this component. Key events are enabled
* when one of the following occurs: * when one of the following occurs:
* <p><ul> * <ul>
* <li>A <code>KeyListener</code> object is registered * <li>A <code>KeyListener</code> object is registered
* via <code>addKeyListener</code>. * via <code>addKeyListener</code>.
* <li>Key events are enabled via <code>enableEvents</code>. * <li>Key events are enabled via <code>enableEvents</code>.
...@@ -6499,7 +6499,7 @@ public abstract class Component implements ImageObserver, MenuContainer, ...@@ -6499,7 +6499,7 @@ public abstract class Component implements ImageObserver, MenuContainer,
* This method is not called unless mouse events are * This method is not called unless mouse events are
* enabled for this component. Mouse events are enabled * enabled for this component. Mouse events are enabled
* when one of the following occurs: * when one of the following occurs:
* <p><ul> * <ul>
* <li>A <code>MouseListener</code> object is registered * <li>A <code>MouseListener</code> object is registered
* via <code>addMouseListener</code>. * via <code>addMouseListener</code>.
* <li>Mouse events are enabled via <code>enableEvents</code>. * <li>Mouse events are enabled via <code>enableEvents</code>.
...@@ -6547,7 +6547,7 @@ public abstract class Component implements ImageObserver, MenuContainer, ...@@ -6547,7 +6547,7 @@ public abstract class Component implements ImageObserver, MenuContainer,
* This method is not called unless mouse motion events are * This method is not called unless mouse motion events are
* enabled for this component. Mouse motion events are enabled * enabled for this component. Mouse motion events are enabled
* when one of the following occurs: * when one of the following occurs:
* <p><ul> * <ul>
* <li>A <code>MouseMotionListener</code> object is registered * <li>A <code>MouseMotionListener</code> object is registered
* via <code>addMouseMotionListener</code>. * via <code>addMouseMotionListener</code>.
* <li>Mouse motion events are enabled via <code>enableEvents</code>. * <li>Mouse motion events are enabled via <code>enableEvents</code>.
...@@ -6586,7 +6586,7 @@ public abstract class Component implements ImageObserver, MenuContainer, ...@@ -6586,7 +6586,7 @@ public abstract class Component implements ImageObserver, MenuContainer,
* This method is not called unless mouse wheel events are * This method is not called unless mouse wheel events are
* enabled for this component. Mouse wheel events are enabled * enabled for this component. Mouse wheel events are enabled
* when one of the following occurs: * when one of the following occurs:
* <p><ul> * <ul>
* <li>A <code>MouseWheelListener</code> object is registered * <li>A <code>MouseWheelListener</code> object is registered
* via <code>addMouseWheelListener</code>. * via <code>addMouseWheelListener</code>.
* <li>Mouse wheel events are enabled via <code>enableEvents</code>. * <li>Mouse wheel events are enabled via <code>enableEvents</code>.
...@@ -6630,7 +6630,7 @@ public abstract class Component implements ImageObserver, MenuContainer, ...@@ -6630,7 +6630,7 @@ public abstract class Component implements ImageObserver, MenuContainer,
* This method is not called unless input method events * This method is not called unless input method events
* are enabled for this component. Input method events are enabled * are enabled for this component. Input method events are enabled
* when one of the following occurs: * when one of the following occurs:
* <p><ul> * <ul>
* <li>An <code>InputMethodListener</code> object is registered * <li>An <code>InputMethodListener</code> object is registered
* via <code>addInputMethodListener</code>. * via <code>addInputMethodListener</code>.
* <li>Input method events are enabled via <code>enableEvents</code>. * <li>Input method events are enabled via <code>enableEvents</code>.
...@@ -6669,7 +6669,7 @@ public abstract class Component implements ImageObserver, MenuContainer, ...@@ -6669,7 +6669,7 @@ public abstract class Component implements ImageObserver, MenuContainer,
* This method is not called unless hierarchy events * This method is not called unless hierarchy events
* are enabled for this component. Hierarchy events are enabled * are enabled for this component. Hierarchy events are enabled
* when one of the following occurs: * when one of the following occurs:
* <p><ul> * <ul>
* <li>An <code>HierarchyListener</code> object is registered * <li>An <code>HierarchyListener</code> object is registered
* via <code>addHierarchyListener</code>. * via <code>addHierarchyListener</code>.
* <li>Hierarchy events are enabled via <code>enableEvents</code>. * <li>Hierarchy events are enabled via <code>enableEvents</code>.
...@@ -6705,7 +6705,7 @@ public abstract class Component implements ImageObserver, MenuContainer, ...@@ -6705,7 +6705,7 @@ public abstract class Component implements ImageObserver, MenuContainer,
* This method is not called unless hierarchy bounds events * This method is not called unless hierarchy bounds events
* are enabled for this component. Hierarchy bounds events are enabled * are enabled for this component. Hierarchy bounds events are enabled
* when one of the following occurs: * when one of the following occurs:
* <p><ul> * <ul>
* <li>An <code>HierarchyBoundsListener</code> object is registered * <li>An <code>HierarchyBoundsListener</code> object is registered
* via <code>addHierarchyBoundsListener</code>. * via <code>addHierarchyBoundsListener</code>.
* <li>Hierarchy bounds events are enabled via <code>enableEvents</code>. * <li>Hierarchy bounds events are enabled via <code>enableEvents</code>.
......
...@@ -185,7 +185,7 @@ public class Container extends Component { ...@@ -185,7 +185,7 @@ public class Container extends Component {
* the method can return the Container on which it is originally called * the method can return the Container on which it is originally called
* in case if none of its children are the current mouse event targets. * in case if none of its children are the current mouse event targets.
* *
* @see #getMouseEventTarget(int, int, boolean, boolean, boolean) * @see #getMouseEventTarget(int, int, boolean)
*/ */
static final boolean INCLUDE_SELF = true; static final boolean INCLUDE_SELF = true;
...@@ -194,7 +194,7 @@ public class Container extends Component { ...@@ -194,7 +194,7 @@ public class Container extends Component {
* of <code>getMouseEventTarget</code>. It is used to specify whether * of <code>getMouseEventTarget</code>. It is used to specify whether
* the method should search only lightweight components. * the method should search only lightweight components.
* *
* @see #getMouseEventTarget(int, int, boolean, boolean, boolean) * @see #getMouseEventTarget(int, int, boolean)
*/ */
static final boolean SEARCH_HEAVYWEIGHTS = true; static final boolean SEARCH_HEAVYWEIGHTS = true;
...@@ -1036,7 +1036,7 @@ public class Container extends Component { ...@@ -1036,7 +1036,7 @@ public class Container extends Component {
* every add request to a container as all other add methods defer * every add request to a container as all other add methods defer
* to this one. An overriding method should * to this one. An overriding method should
* usually include a call to the superclass's version of the method: * usually include a call to the superclass's version of the method:
* <p> *
* <blockquote> * <blockquote>
* <code>super.addImpl(comp, constraints, index)</code> * <code>super.addImpl(comp, constraints, index)</code>
* </blockquote> * </blockquote>
......
...@@ -28,20 +28,20 @@ interface EventFilter { ...@@ -28,20 +28,20 @@ interface EventFilter {
/** /**
* Enumeration for possible values for <code>acceptEvent(AWTEvent ev)</code> method. * Enumeration for possible values for <code>acceptEvent(AWTEvent ev)</code> method.
* @see EventDispatchThread#pumpEventsForFilters(EventFilter) * @see EventDispatchThread#pumpEventsForFilter
*/ */
static enum FilterAction { static enum FilterAction {
/** /**
* ACCEPT means that this filter do not filter the event and allowes other * ACCEPT means that this filter do not filter the event and allowes other
* active filters to proceed it. If all the active filters accept the event, it * active filters to proceed it. If all the active filters accept the event, it
* is dispatched by the <code>EventDispatchThread</code> * is dispatched by the <code>EventDispatchThread</code>
* @see EventDispatchThread#pumpEventsForFilters(EventFilter) * @see EventDispatchThread#pumpEventsForFilter
*/ */
ACCEPT, ACCEPT,
/** /**
* REJECT means that this filter filter the event. No other filters are queried, * REJECT means that this filter filter the event. No other filters are queried,
* and the event is not dispatched by the <code>EventDispatchedThread</code> * and the event is not dispatched by the <code>EventDispatchedThread</code>
* @see EventDispatchThread#pumpEventsForFilters(EventFilter) * @see EventDispatchThread#pumpEventsForFilter
*/ */
REJECT, REJECT,
/** /**
...@@ -51,7 +51,7 @@ interface EventFilter { ...@@ -51,7 +51,7 @@ interface EventFilter {
* It is not recommended to use ACCEPT_IMMEDIATELY as there may be some active * It is not recommended to use ACCEPT_IMMEDIATELY as there may be some active
* filters not queried yet that do not accept this event. It is primarily used * filters not queried yet that do not accept this event. It is primarily used
* by modal filters. * by modal filters.
* @see EventDispatchThread#pumpEventsForFilters(EventFilter) * @see EventDispatchThread#pumpEventsForFilter
* @see ModalEventFilter * @see ModalEventFilter
*/ */
ACCEPT_IMMEDIATELY ACCEPT_IMMEDIATELY
......
...@@ -652,7 +652,7 @@ public class EventQueue { ...@@ -652,7 +652,7 @@ public class EventQueue {
* Dispatches an event. The manner in which the event is * Dispatches an event. The manner in which the event is
* dispatched depends upon the type of the event and the * dispatched depends upon the type of the event and the
* type of the event's source object: * type of the event's source object:
* <p> *
* <table border=1 summary="Event types, source types, and dispatch methods"> * <table border=1 summary="Event types, source types, and dispatch methods">
* <tr> * <tr>
* <th>Event Type</th> * <th>Event Type</th>
......
...@@ -439,7 +439,6 @@ public class FileDialog extends Dialog { ...@@ -439,7 +439,6 @@ public class FileDialog extends Dialog {
* Note that the method is private and it's intended to be used * Note that the method is private and it's intended to be used
* by the peers through the AWTAccessor API. * by the peers through the AWTAccessor API.
* *
* @param directory the current directory
* @param files the array that contains the short names of * @param files the array that contains the short names of
* all the files that the user selects. * all the files that the user selects.
* *
......
...@@ -57,7 +57,7 @@ import java.io.IOException; ...@@ -57,7 +57,7 @@ import java.io.IOException;
* style="float:center; margin: 7px 10px;"> * style="float:center; margin: 7px 10px;">
* <p> * <p>
* Here is the code for this applet: * Here is the code for this applet:
* <p> *
* <hr><blockquote><pre> * <hr><blockquote><pre>
* import java.awt.*; * import java.awt.*;
* import java.applet.Applet; * import java.applet.Applet;
...@@ -129,9 +129,9 @@ public class FlowLayout implements LayoutManager, java.io.Serializable { ...@@ -129,9 +129,9 @@ public class FlowLayout implements LayoutManager, java.io.Serializable {
* how each row distributes empty space. * how each row distributes empty space.
* It can be one of the following values: * It can be one of the following values:
* <ul> * <ul>
* <code>LEFT</code> * <li><code>LEFT</code>
* <code>RIGHT</code> * <li><code>RIGHT</code>
* <code>CENTER</code> * <li><code>CENTER</code>
* </ul> * </ul>
* *
* @serial * @serial
...@@ -146,11 +146,11 @@ public class FlowLayout implements LayoutManager, java.io.Serializable { ...@@ -146,11 +146,11 @@ public class FlowLayout implements LayoutManager, java.io.Serializable {
* v1.2 and greater. * v1.2 and greater.
* It can be one of the following three values: * It can be one of the following three values:
* <ul> * <ul>
* <code>LEFT</code> * <li><code>LEFT</code>
* <code>RIGHT</code> * <li><code>RIGHT</code>
* <code>CENTER</code> * <li><code>CENTER</code>
* <code>LEADING</code> * <li><code>LEADING</code>
* <code>TRAILING</code> * <li><code>TRAILING</code>
* </ul> * </ul>
* *
* @serial * @serial
......
...@@ -75,13 +75,13 @@ import static sun.font.EAttribute.*; ...@@ -75,13 +75,13 @@ import static sun.font.EAttribute.*;
* *
* A <em>character</em> is a symbol that represents an item such as a letter, * A <em>character</em> is a symbol that represents an item such as a letter,
* a digit, or punctuation in an abstract way. For example, <code>'g'</code>, * a digit, or punctuation in an abstract way. For example, <code>'g'</code>,
* <font size=-1>LATIN SMALL LETTER G</font>, is a character. * LATIN SMALL LETTER G, is a character.
* <p> * <p>
* A <em>glyph</em> is a shape used to render a character or a sequence of * A <em>glyph</em> is a shape used to render a character or a sequence of
* characters. In simple writing systems, such as Latin, typically one glyph * characters. In simple writing systems, such as Latin, typically one glyph
* represents one character. In general, however, characters and glyphs do not * represents one character. In general, however, characters and glyphs do not
* have one-to-one correspondence. For example, the character '&aacute;' * have one-to-one correspondence. For example, the character '&aacute;'
* <font size=-1>LATIN SMALL LETTER A WITH ACUTE</font>, can be represented by * LATIN SMALL LETTER A WITH ACUTE, can be represented by
* two glyphs: one for 'a' and one for '&acute;'. On the other hand, the * two glyphs: one for 'a' and one for '&acute;'. On the other hand, the
* two-character string "fi" can be represented by a single glyph, an * two-character string "fi" can be represented by a single glyph, an
* "fi" ligature. In complex writing systems, such as Arabic or the South * "fi" ligature. In complex writing systems, such as Arabic or the South
...@@ -93,7 +93,7 @@ import static sun.font.EAttribute.*; ...@@ -93,7 +93,7 @@ import static sun.font.EAttribute.*;
* of characters as well as the tables needed to map sequences of characters to * of characters as well as the tables needed to map sequences of characters to
* corresponding sequences of glyphs. * corresponding sequences of glyphs.
* *
* <h4>Physical and Logical Fonts</h4> * <h3>Physical and Logical Fonts</h3>
* *
* The Java Platform distinguishes between two kinds of fonts: * The Java Platform distinguishes between two kinds of fonts:
* <em>physical</em> fonts and <em>logical</em> fonts. * <em>physical</em> fonts and <em>logical</em> fonts.
...@@ -130,7 +130,7 @@ import static sun.font.EAttribute.*; ...@@ -130,7 +130,7 @@ import static sun.font.EAttribute.*;
* <a href="http://www.oracle.com/technetwork/java/javase/tech/faq-jsp-138165.html">Internationalization FAQ</a> * <a href="http://www.oracle.com/technetwork/java/javase/tech/faq-jsp-138165.html">Internationalization FAQ</a>
* document. * document.
* *
* <h4>Font Faces and Names</h4> * <h3>Font Faces and Names</h3>
* *
* A <code>Font</code> * A <code>Font</code>
* can have many faces, such as heavy, medium, oblique, gothic and * can have many faces, such as heavy, medium, oblique, gothic and
...@@ -160,7 +160,7 @@ import static sun.font.EAttribute.*; ...@@ -160,7 +160,7 @@ import static sun.font.EAttribute.*;
* with varying sizes, styles, transforms and font features via the * with varying sizes, styles, transforms and font features via the
* <code>deriveFont</code> methods in this class. * <code>deriveFont</code> methods in this class.
* *
* <h4>Font and TextAttribute</h4> * <h3>Font and TextAttribute</h3>
* *
* <p><code>Font</code> supports most * <p><code>Font</code> supports most
* <code>TextAttribute</code>s. This makes some operations, such as * <code>TextAttribute</code>s. This makes some operations, such as
...@@ -197,7 +197,7 @@ import static sun.font.EAttribute.*; ...@@ -197,7 +197,7 @@ import static sun.font.EAttribute.*;
* avoid this problem. Clients who use input method highlights can * avoid this problem. Clients who use input method highlights can
* convert these to the platform-specific attributes for that * convert these to the platform-specific attributes for that
* highlight on the current platform and set them on the Font as * highlight on the current platform and set them on the Font as
* a workaround.</p> * a workaround.
* *
* <p>The <code>Map</code>-based constructor and * <p>The <code>Map</code>-based constructor and
* <code>deriveFont</code> APIs ignore the FONT attribute, and it is * <code>deriveFont</code> APIs ignore the FONT attribute, and it is
...@@ -1419,7 +1419,7 @@ public class Font implements java.io.Serializable ...@@ -1419,7 +1419,7 @@ public class Font implements java.io.Serializable
* To ensure that this method returns the desired Font, * To ensure that this method returns the desired Font,
* format the <code>str</code> parameter in * format the <code>str</code> parameter in
* one of these ways * one of these ways
* <p> *
* <ul> * <ul>
* <li><em>fontname-style-pointsize</em> * <li><em>fontname-style-pointsize</em>
* <li><em>fontname-pointsize</em> * <li><em>fontname-pointsize</em>
......
...@@ -39,7 +39,7 @@ import java.text.AttributedCharacterIterator; ...@@ -39,7 +39,7 @@ import java.text.AttributedCharacterIterator;
* A <code>Graphics</code> object encapsulates state information needed * A <code>Graphics</code> object encapsulates state information needed
* for the basic rendering operations that Java supports. This * for the basic rendering operations that Java supports. This
* state information includes the following properties: * state information includes the following properties:
* <p> *
* <ul> * <ul>
* <li>The <code>Component</code> object on which to draw. * <li>The <code>Component</code> object on which to draw.
* <li>A translation origin for rendering and clipping coordinates. * <li>A translation origin for rendering and clipping coordinates.
...@@ -63,7 +63,7 @@ import java.text.AttributedCharacterIterator; ...@@ -63,7 +63,7 @@ import java.text.AttributedCharacterIterator;
* <p> * <p>
* The graphics pen hangs down and to the right from the path it traverses. * The graphics pen hangs down and to the right from the path it traverses.
* This has the following implications: * This has the following implications:
* <p><ul> * <ul>
* <li>If you draw a figure that covers a given rectangle, that * <li>If you draw a figure that covers a given rectangle, that
* figure occupies one extra row of pixels on the right and bottom edges * figure occupies one extra row of pixels on the right and bottom edges
* as compared to filling a figure that is bounded by that same rectangle. * as compared to filling a figure that is bounded by that same rectangle.
...@@ -136,7 +136,7 @@ public abstract class Graphics { ...@@ -136,7 +136,7 @@ public abstract class Graphics {
* interpreted in the coordinate system of the original * interpreted in the coordinate system of the original
* <code>Graphics</code> object. The new graphics context is * <code>Graphics</code> object. The new graphics context is
* identical to the original, except in two respects: * identical to the original, except in two respects:
* <p> *
* <ul> * <ul>
* <li> * <li>
* The new graphics context is translated by (<i>x</i>,&nbsp;<i>y</i>). * The new graphics context is translated by (<i>x</i>,&nbsp;<i>y</i>).
......
...@@ -457,7 +457,7 @@ public class GridBagConstraints implements Cloneable, java.io.Serializable { ...@@ -457,7 +457,7 @@ public class GridBagConstraints implements Cloneable, java.io.Serializable {
* resize the component, and if so, how. * resize the component, and if so, how.
* <p> * <p>
* The following values are valid for <code>fill</code>: * The following values are valid for <code>fill</code>:
* <p> *
* <ul> * <ul>
* <li> * <li>
* <code>NONE</code>: Do not resize the component. * <code>NONE</code>: Do not resize the component.
......
...@@ -55,7 +55,7 @@ import java.util.Arrays; ...@@ -55,7 +55,7 @@ import java.util.Arrays;
* of the <code>GridBagConstraints</code> objects that are associated * of the <code>GridBagConstraints</code> objects that are associated
* with its components. You customize a <code>GridBagConstraints</code> * with its components. You customize a <code>GridBagConstraints</code>
* object by setting one or more of its instance variables: * object by setting one or more of its instance variables:
* <p> *
* <dl> * <dl>
* <dt>{@link GridBagConstraints#gridx}, * <dt>{@link GridBagConstraints#gridx},
* {@link GridBagConstraints#gridy} * {@link GridBagConstraints#gridy}
...@@ -121,7 +121,7 @@ import java.util.Arrays; ...@@ -121,7 +121,7 @@ import java.util.Arrays;
* <code>ComponentOrientation</code> property while absolute values * <code>ComponentOrientation</code> property while absolute values
* are not. Baseline relative values are calculated relative to the * are not. Baseline relative values are calculated relative to the
* baseline. Valid values are: * baseline. Valid values are:
* <p> *
* <center><table BORDER=0 WIDTH=800 * <center><table BORDER=0 WIDTH=800
* SUMMARY="absolute, relative and baseline values as described above"> * SUMMARY="absolute, relative and baseline values as described above">
* <tr> * <tr>
...@@ -251,7 +251,7 @@ import java.util.Arrays; ...@@ -251,7 +251,7 @@ import java.util.Arrays;
* managed by a grid bag layout. Figure 2 shows the layout for a horizontal, * managed by a grid bag layout. Figure 2 shows the layout for a horizontal,
* left-to-right container and Figure 3 shows the layout for a horizontal, * left-to-right container and Figure 3 shows the layout for a horizontal,
* right-to-left container. * right-to-left container.
* <p> *
* <center><table WIDTH=600 summary="layout"> * <center><table WIDTH=600 summary="layout">
* <tr ALIGN=CENTER> * <tr ALIGN=CENTER>
* <td> * <td>
...@@ -270,7 +270,7 @@ import java.util.Arrays; ...@@ -270,7 +270,7 @@ import java.util.Arrays;
* of its associated <code>GridBagConstraints</code> object * of its associated <code>GridBagConstraints</code> object
* set to <code>GridBagConstraints.BOTH</code>. * set to <code>GridBagConstraints.BOTH</code>.
* In addition, the components have the following non-default constraints: * In addition, the components have the following non-default constraints:
* <p> *
* <ul> * <ul>
* <li>Button1, Button2, Button3: <code>weightx&nbsp;=&nbsp;1.0</code> * <li>Button1, Button2, Button3: <code>weightx&nbsp;=&nbsp;1.0</code>
* <li>Button4: <code>weightx&nbsp;=&nbsp;1.0</code>, * <li>Button4: <code>weightx&nbsp;=&nbsp;1.0</code>,
...@@ -285,7 +285,7 @@ import java.util.Arrays; ...@@ -285,7 +285,7 @@ import java.util.Arrays;
* </ul> * </ul>
* <p> * <p>
* Here is the code that implements the example shown above: * Here is the code that implements the example shown above:
* <p> *
* <hr><blockquote><pre> * <hr><blockquote><pre>
* import java.awt.*; * import java.awt.*;
* import java.util.*; * import java.util.*;
......
...@@ -32,7 +32,7 @@ package java.awt; ...@@ -32,7 +32,7 @@ package java.awt;
* and one component is placed in each rectangle. * and one component is placed in each rectangle.
* For example, the following is an applet that lays out six buttons * For example, the following is an applet that lays out six buttons
* into three rows and two columns: * into three rows and two columns:
* <p> *
* <hr><blockquote> * <hr><blockquote>
* <pre> * <pre>
* import java.awt.*; * import java.awt.*;
...@@ -54,7 +54,7 @@ package java.awt; ...@@ -54,7 +54,7 @@ package java.awt;
* and left-to-right, the above example produces the output shown in Figure 1. * and left-to-right, the above example produces the output shown in Figure 1.
* If the container's <code>ComponentOrientation</code> property is horizontal * If the container's <code>ComponentOrientation</code> property is horizontal
* and right-to-left, the example produces the output shown in Figure 2. * and right-to-left, the example produces the output shown in Figure 2.
* <p> *
* <table style="float:center" WIDTH=600 summary="layout"> * <table style="float:center" WIDTH=600 summary="layout">
* <tr ALIGN=CENTER> * <tr ALIGN=CENTER>
* <td><img SRC="doc-files/GridLayout-1.gif" * <td><img SRC="doc-files/GridLayout-1.gif"
......
...@@ -36,7 +36,7 @@ import javax.accessibility.*; ...@@ -36,7 +36,7 @@ import javax.accessibility.*;
* directly. * directly.
* <p> * <p>
* For example, the code&nbsp;.&nbsp;.&nbsp;. * For example, the code&nbsp;.&nbsp;.&nbsp;.
* <p> *
* <hr><blockquote><pre> * <hr><blockquote><pre>
* setLayout(new FlowLayout(FlowLayout.CENTER, 10, 10)); * setLayout(new FlowLayout(FlowLayout.CENTER, 10, 10));
* add(new Label("Hi There!")); * add(new Label("Hi There!"));
......
...@@ -75,7 +75,6 @@ import java.beans.ConstructorProperties; ...@@ -75,7 +75,6 @@ import java.beans.ConstructorProperties;
* <p> * <p>
* The following code demonstrates typical usage of * The following code demonstrates typical usage of
* {@code LinearGradientPaint}: * {@code LinearGradientPaint}:
* <p>
* <pre> * <pre>
* Point2D start = new Point2D.Float(0, 0); * Point2D start = new Point2D.Float(0, 0);
* Point2D end = new Point2D.Float(50, 50); * Point2D end = new Point2D.Float(50, 50);
...@@ -92,7 +91,6 @@ import java.beans.ConstructorProperties; ...@@ -92,7 +91,6 @@ import java.beans.ConstructorProperties;
* <p> * <p>
* This image demonstrates the example code above for each * This image demonstrates the example code above for each
* of the three cycle methods: * of the three cycle methods:
* <p>
* <center> * <center>
* <img src = "doc-files/LinearGradientPaint.png" * <img src = "doc-files/LinearGradientPaint.png"
* alt="image showing the output of the example code"> * alt="image showing the output of the example code">
......
...@@ -66,8 +66,8 @@ final class LinearGradientPaintContext extends MultipleGradientPaintContext { ...@@ -66,8 +66,8 @@ final class LinearGradientPaintContext extends MultipleGradientPaintContext {
* concatenated with this) * concatenated with this)
* @param hints the hints that the context object uses to choose * @param hints the hints that the context object uses to choose
* between rendering alternatives * between rendering alternatives
* @param dStart gradient start point, in user space * @param start gradient start point, in user space
* @param dEnd gradient end point, in user space * @param end gradient end point, in user space
* @param fractions the fractions specifying the gradient distribution * @param fractions the fractions specifying the gradient distribution
* @param colors the gradient colors * @param colors the gradient colors
* @param cycleMethod either NO_CYCLE, REFLECT, or REPEAT * @param cycleMethod either NO_CYCLE, REFLECT, or REPEAT
......
...@@ -41,7 +41,7 @@ import javax.accessibility.*; ...@@ -41,7 +41,7 @@ import javax.accessibility.*;
* the user can choose either one item or multiple items. * the user can choose either one item or multiple items.
* <p> * <p>
* For example, the code&nbsp;.&nbsp;.&nbsp;. * For example, the code&nbsp;.&nbsp;.&nbsp;.
* <p> *
* <hr><blockquote><pre> * <hr><blockquote><pre>
* List lst = new List(4, false); * List lst = new List(4, false);
* lst.add("Mercury"); * lst.add("Mercury");
...@@ -1082,7 +1082,7 @@ public class List extends Component implements ItemSelectable, Accessible { ...@@ -1082,7 +1082,7 @@ public class List extends Component implements ItemSelectable, Accessible {
* This method is not called unless item events are * This method is not called unless item events are
* enabled for this component. Item events are enabled * enabled for this component. Item events are enabled
* when one of the following occurs: * when one of the following occurs:
* <p><ul> * <ul>
* <li>An <code>ItemListener</code> object is registered * <li>An <code>ItemListener</code> object is registered
* via <code>addItemListener</code>. * via <code>addItemListener</code>.
* <li>Item events are enabled via <code>enableEvents</code>. * <li>Item events are enabled via <code>enableEvents</code>.
...@@ -1113,7 +1113,7 @@ public class List extends Component implements ItemSelectable, Accessible { ...@@ -1113,7 +1113,7 @@ public class List extends Component implements ItemSelectable, Accessible {
* This method is not called unless action events are * This method is not called unless action events are
* enabled for this component. Action events are enabled * enabled for this component. Action events are enabled
* when one of the following occurs: * when one of the following occurs:
* <p><ul> * <ul>
* <li>An <code>ActionListener</code> object is registered * <li>An <code>ActionListener</code> object is registered
* via <code>addActionListener</code>. * via <code>addActionListener</code>.
* <li>Action events are enabled via <code>enableEvents</code>. * <li>Action events are enabled via <code>enableEvents</code>.
......
...@@ -648,7 +648,7 @@ public class MenuItem extends MenuComponent implements Accessible { ...@@ -648,7 +648,7 @@ public class MenuItem extends MenuComponent implements Accessible {
* This method is not called unless action events are * This method is not called unless action events are
* enabled for this component. Action events are enabled * enabled for this component. Action events are enabled
* when one of the following occurs: * when one of the following occurs:
* <p><ul> * <ul>
* <li>An <code>ActionListener</code> object is registered * <li>An <code>ActionListener</code> object is registered
* via <code>addActionListener</code>. * via <code>addActionListener</code>.
* <li>Action events are enabled via <code>enableEvents</code>. * <li>Action events are enabled via <code>enableEvents</code>.
......
...@@ -104,7 +104,6 @@ import java.beans.ConstructorProperties; ...@@ -104,7 +104,6 @@ import java.beans.ConstructorProperties;
* The following code demonstrates typical usage of * The following code demonstrates typical usage of
* {@code RadialGradientPaint}, where the center and focus points are * {@code RadialGradientPaint}, where the center and focus points are
* the same: * the same:
* <p>
* <pre> * <pre>
* Point2D center = new Point2D.Float(50, 50); * Point2D center = new Point2D.Float(50, 50);
* float radius = 25; * float radius = 25;
...@@ -117,7 +116,6 @@ import java.beans.ConstructorProperties; ...@@ -117,7 +116,6 @@ import java.beans.ConstructorProperties;
* <p> * <p>
* This image demonstrates the example code above, with default * This image demonstrates the example code above, with default
* (centered) focus for each of the three cycle methods: * (centered) focus for each of the three cycle methods:
* <p>
* <center> * <center>
* <img src = "doc-files/RadialGradientPaint-1.png" alt="image showing the * <img src = "doc-files/RadialGradientPaint-1.png" alt="image showing the
* output of the sameple code"> * output of the sameple code">
...@@ -126,7 +124,6 @@ import java.beans.ConstructorProperties; ...@@ -126,7 +124,6 @@ import java.beans.ConstructorProperties;
* <p> * <p>
* It is also possible to specify a non-centered focus point, as * It is also possible to specify a non-centered focus point, as
* in the following code: * in the following code:
* <p>
* <pre> * <pre>
* Point2D center = new Point2D.Float(50, 50); * Point2D center = new Point2D.Float(50, 50);
* float radius = 25; * float radius = 25;
...@@ -142,7 +139,6 @@ import java.beans.ConstructorProperties; ...@@ -142,7 +139,6 @@ import java.beans.ConstructorProperties;
* <p> * <p>
* This image demonstrates the previous example code, with non-centered * This image demonstrates the previous example code, with non-centered
* focus for each of the three cycle methods: * focus for each of the three cycle methods:
* <p>
* <center> * <center>
* <img src = "doc-files/RadialGradientPaint-2.png" alt="image showing the * <img src = "doc-files/RadialGradientPaint-2.png" alt="image showing the
* output of the sample code"> * output of the sample code">
......
...@@ -46,7 +46,7 @@ import javax.accessibility.*; ...@@ -46,7 +46,7 @@ import javax.accessibility.*;
* <p> * <p>
* Each scroll bar in this example could be created with * Each scroll bar in this example could be created with
* code similar to the following: * code similar to the following:
* <p> *
* <hr><blockquote><pre> * <hr><blockquote><pre>
* redSlider=new Scrollbar(Scrollbar.VERTICAL, 0, 1, 0, 255); * redSlider=new Scrollbar(Scrollbar.VERTICAL, 0, 1, 0, 255);
* add(redSlider); * add(redSlider);
...@@ -65,7 +65,7 @@ import javax.accessibility.*; ...@@ -65,7 +65,7 @@ import javax.accessibility.*;
* The value range represented by the bubble in this example * The value range represented by the bubble in this example
* is the <em>visible amount</em>. The horizontal scroll bar * is the <em>visible amount</em>. The horizontal scroll bar
* in this example could be created with code like the following: * in this example could be created with code like the following:
* <p> *
* <hr><blockquote><pre> * <hr><blockquote><pre>
* ranger = new Scrollbar(Scrollbar.HORIZONTAL, 0, 60, 0, 300); * ranger = new Scrollbar(Scrollbar.HORIZONTAL, 0, 60, 0, 300);
* add(ranger); * add(ranger);
...@@ -103,7 +103,7 @@ import javax.accessibility.*; ...@@ -103,7 +103,7 @@ import javax.accessibility.*;
* <p> * <p>
* The <code>AdjustmentEvent</code> class defines five types * The <code>AdjustmentEvent</code> class defines five types
* of adjustment event, listed here: * of adjustment event, listed here:
* <p> *
* <ul> * <ul>
* <li><code>AdjustmentEvent.TRACK</code> is sent out when the * <li><code>AdjustmentEvent.TRACK</code> is sent out when the
* user drags the scroll bar's bubble. * user drags the scroll bar's bubble.
...@@ -136,7 +136,7 @@ import javax.accessibility.*; ...@@ -136,7 +136,7 @@ import javax.accessibility.*;
* that are associated with scroll bars in previous platform versions. * that are associated with scroll bars in previous platform versions.
* The following list gives the adjustment event type, * The following list gives the adjustment event type,
* and the corresponding JDK&nbsp;1.0 event type it replaces. * and the corresponding JDK&nbsp;1.0 event type it replaces.
* <p> *
* <ul> * <ul>
* <li><code>AdjustmentEvent.TRACK</code> replaces * <li><code>AdjustmentEvent.TRACK</code> replaces
* <code>Event.SCROLL_ABSOLUTE</code> * <code>Event.SCROLL_ABSOLUTE</code>
...@@ -295,7 +295,7 @@ public class Scrollbar extends Component implements Adjustable, Accessible { ...@@ -295,7 +295,7 @@ public class Scrollbar extends Component implements Adjustable, Accessible {
* Constructs a new vertical scroll bar. * Constructs a new vertical scroll bar.
* The default properties of the scroll bar are listed in * The default properties of the scroll bar are listed in
* the following table: * the following table:
* <p> *
* <table border=1 summary="Scrollbar default properties"> * <table border=1 summary="Scrollbar default properties">
* <tr> * <tr>
* <th>Property</th> * <th>Property</th>
...@@ -1104,11 +1104,11 @@ public class Scrollbar extends Component implements Adjustable, Accessible { ...@@ -1104,11 +1104,11 @@ public class Scrollbar extends Component implements Adjustable, Accessible {
* This method is not called unless adjustment events are * This method is not called unless adjustment events are
* enabled for this component. Adjustment events are enabled * enabled for this component. Adjustment events are enabled
* when one of the following occurs: * when one of the following occurs:
* <p><ul> * <ul>
* <li>An <code>AdjustmentListener</code> object is registered * <li>An <code>AdjustmentListener</code> object is registered
* via <code>addAdjustmentListener</code>. * via <code>addAdjustmentListener</code>.
* <li>Adjustment events are enabled via <code>enableEvents</code>. * <li>Adjustment events are enabled via <code>enableEvents</code>.
* </ul><p> * </ul>
* <p>Note that if the event parameter is <code>null</code> * <p>Note that if the event parameter is <code>null</code>
* the behavior is unspecified and may result in an * the behavior is unspecified and may result in an
* exception. * exception.
......
...@@ -463,7 +463,7 @@ public final class SystemColor extends Color implements java.io.Serializable { ...@@ -463,7 +463,7 @@ public final class SystemColor extends Color implements java.io.Serializable {
} }
/** /**
* Called from <init> & toolkit to update the above systemColors cache. * Called from {@code <init>} and toolkit to update the above systemColors cache.
*/ */
private static void updateSystemColors() { private static void updateSystemColors() {
if (!GraphicsEnvironment.isHeadless()) { if (!GraphicsEnvironment.isHeadless()) {
......
...@@ -361,7 +361,7 @@ public class SystemTray { ...@@ -361,7 +361,7 @@ public class SystemTray {
/** /**
* Adds a {@code PropertyChangeListener} to the list of listeners for the * Adds a {@code PropertyChangeListener} to the list of listeners for the
* specific property. The following properties are currently supported: * specific property. The following properties are currently supported:
* <p> *
* <table border=1 summary="SystemTray properties"> * <table border=1 summary="SystemTray properties">
* <tr> * <tr>
* <th>Property</th> * <th>Property</th>
......
...@@ -45,7 +45,7 @@ import javax.accessibility.*; ...@@ -45,7 +45,7 @@ import javax.accessibility.*;
* style="float:center; margin: 7px 10px;"> * style="float:center; margin: 7px 10px;">
* <p> * <p>
* This text area could be created by the following line of code: * This text area could be created by the following line of code:
* <p> *
* <hr><blockquote><pre> * <hr><blockquote><pre>
* new TextArea("Hello", 5, 40); * new TextArea("Hello", 5, 40);
* </pre></blockquote><hr> * </pre></blockquote><hr>
......
...@@ -45,7 +45,7 @@ import javax.accessibility.*; ...@@ -45,7 +45,7 @@ import javax.accessibility.*;
* style="float:center; margin: 7px 10px;"> * style="float:center; margin: 7px 10px;">
* <p> * <p>
* Here is the code that produces these four text fields: * Here is the code that produces these four text fields:
* <p> *
* <hr><blockquote><pre> * <hr><blockquote><pre>
* TextField tf1, tf2, tf3, tf4; * TextField tf1, tf2, tf3, tf4;
* // a blank text field * // a blank text field
...@@ -596,7 +596,7 @@ public class TextField extends TextComponent { ...@@ -596,7 +596,7 @@ public class TextField extends TextComponent {
* This method is not called unless action events are * This method is not called unless action events are
* enabled for this component. Action events are enabled * enabled for this component. Action events are enabled
* when one of the following occurs: * when one of the following occurs:
* <p><ul> * <ul>
* <li>An <code>ActionListener</code> object is registered * <li>An <code>ActionListener</code> object is registered
* via <code>addActionListener</code>. * via <code>addActionListener</code>.
* <li>Action events are enabled via <code>enableEvents</code>. * <li>Action events are enabled via <code>enableEvents</code>.
......
...@@ -80,19 +80,19 @@ import sun.util.CoreResourceBundleControl; ...@@ -80,19 +80,19 @@ import sun.util.CoreResourceBundleControl;
* <br>For example, calling <code>ScrollPane.setScrollPosition</code> * <br>For example, calling <code>ScrollPane.setScrollPosition</code>
* and then <code>getScrollPosition</code> may return an incorrect * and then <code>getScrollPosition</code> may return an incorrect
* value if the original request has not yet been processed. * value if the original request has not yet been processed.
* <p> *
* <li>Moving the focus from one component to another. * <li>Moving the focus from one component to another.
* <br>For more information, see * <br>For more information, see
* <a href="http://docs.oracle.com/javase/tutorial/uiswing/misc/focus.html#transferTiming">Timing * <a href="http://docs.oracle.com/javase/tutorial/uiswing/misc/focus.html#transferTiming">Timing
* Focus Transfers</a>, a section in * Focus Transfers</a>, a section in
* <a href="http://java.sun.com/docs/books/tutorial/uiswing/">The Swing * <a href="http://java.sun.com/docs/books/tutorial/uiswing/">The Swing
* Tutorial</a>. * Tutorial</a>.
* <p> *
* <li>Making a top-level container visible. * <li>Making a top-level container visible.
* <br>Calling <code>setVisible(true)</code> on a <code>Window</code>, * <br>Calling <code>setVisible(true)</code> on a <code>Window</code>,
* <code>Frame</code> or <code>Dialog</code> may occur * <code>Frame</code> or <code>Dialog</code> may occur
* asynchronously. * asynchronously.
* <p> *
* <li>Setting the size or location of a top-level container. * <li>Setting the size or location of a top-level container.
* <br>Calls to <code>setSize</code>, <code>setBounds</code> or * <br>Calls to <code>setSize</code>, <code>setBounds</code> or
* <code>setLocation</code> on a <code>Window</code>, * <code>setLocation</code> on a <code>Window</code>,
......
...@@ -91,7 +91,7 @@ class WaitDispatchSupport implements SecondaryLoop { ...@@ -91,7 +91,7 @@ class WaitDispatchSupport implements SecondaryLoop {
* *
* @param dispatchThread An event dispatch thread that * @param dispatchThread An event dispatch thread that
* should not stop dispatching events while waiting * should not stop dispatching events while waiting
* @param extCondition A conditional object used to determine * @param extCond A conditional object used to determine
* if the loop should be terminated * if the loop should be terminated
* *
* @since 1.7 * @since 1.7
...@@ -161,7 +161,7 @@ class WaitDispatchSupport implements SecondaryLoop { ...@@ -161,7 +161,7 @@ class WaitDispatchSupport implements SecondaryLoop {
} }
/** /**
* @inheritDoc * {@inheritDoc}
*/ */
@Override @Override
public boolean enter() { public boolean enter() {
...@@ -281,7 +281,7 @@ class WaitDispatchSupport implements SecondaryLoop { ...@@ -281,7 +281,7 @@ class WaitDispatchSupport implements SecondaryLoop {
} }
/** /**
* @inheritDoc * {@inheritDoc}
*/ */
public boolean exit() { public boolean exit() {
if (log.isLoggable(PlatformLogger.Level.FINE)) { if (log.isLoggable(PlatformLogger.Level.FINE)) {
......
...@@ -212,7 +212,7 @@ public class Window extends Container implements Accessible { ...@@ -212,7 +212,7 @@ public class Window extends Container implements Accessible {
* *
* @serial * @serial
* @see #getIconImages * @see #getIconImages
* @see #setIconImages(List<? extends Image>) * @see #setIconImages
*/ */
transient java.util.List<Image> icons; transient java.util.List<Image> icons;
......
...@@ -27,7 +27,8 @@ ...@@ -27,7 +27,8 @@
* *
*/ */
/********************************************************************** /*
**********************************************************************
********************************************************************** **********************************************************************
********************************************************************** **********************************************************************
*** COPYRIGHT (c) Eastman Kodak Company, 1997 *** *** COPYRIGHT (c) Eastman Kodak Company, 1997 ***
......
...@@ -23,7 +23,8 @@ ...@@ -23,7 +23,8 @@
* questions. * questions.
*/ */
/********************************************************************** /*
**********************************************************************
********************************************************************** **********************************************************************
********************************************************************** **********************************************************************
*** COPYRIGHT (c) Eastman Kodak Company, 1997 *** *** COPYRIGHT (c) Eastman Kodak Company, 1997 ***
...@@ -91,7 +92,6 @@ import sun.java2d.cmm.CMSManager; ...@@ -91,7 +92,6 @@ import sun.java2d.cmm.CMSManager;
</pre> </pre>
* *
* <p>
* @see ICC_ColorSpace * @see ICC_ColorSpace
*/ */
......
...@@ -23,7 +23,8 @@ ...@@ -23,7 +23,8 @@
* questions. * questions.
*/ */
/********************************************************************** /*
**********************************************************************
********************************************************************** **********************************************************************
********************************************************************** **********************************************************************
*** COPYRIGHT (c) Eastman Kodak Company, 1997 *** *** COPYRIGHT (c) Eastman Kodak Company, 1997 ***
...@@ -77,7 +78,6 @@ import sun.java2d.cmm.PCMM; ...@@ -77,7 +78,6 @@ import sun.java2d.cmm.PCMM;
* imported images with a known color space. At most, such applets * imported images with a known color space. At most, such applets
* would need to get one of the default color spaces via * would need to get one of the default color spaces via
* ColorSpace.getInstance(). * ColorSpace.getInstance().
* <p>
* @see ColorSpace * @see ColorSpace
* @see ICC_Profile * @see ICC_Profile
*/ */
...@@ -481,7 +481,6 @@ public class ICC_ColorSpace extends ColorSpace { ...@@ -481,7 +481,6 @@ public class ICC_ColorSpace extends ColorSpace {
* be the same as the media white point tag XYZ value in the ICC * be the same as the media white point tag XYZ value in the ICC
* profile for an sRGB device. * profile for an sRGB device.
* <p> * <p>
* <p>
* @param colorvalue a float array with length of at least 3. * @param colorvalue a float array with length of at least 3.
* @return a float array with length equal to the number of * @return a float array with length equal to the number of
* components in this ColorSpace. * components in this ColorSpace.
......
...@@ -23,7 +23,8 @@ ...@@ -23,7 +23,8 @@
* questions. * questions.
*/ */
/********************************************************************** /*
**********************************************************************
********************************************************************** **********************************************************************
********************************************************************** **********************************************************************
*** COPYRIGHT (c) Eastman Kodak Company, 1997 *** *** COPYRIGHT (c) Eastman Kodak Company, 1997 ***
...@@ -86,7 +87,6 @@ import java.security.PrivilegedAction; ...@@ -86,7 +87,6 @@ import java.security.PrivilegedAction;
* ICC Profile Format Specification. Most profiles of interest * ICC Profile Format Specification. Most profiles of interest
* either have invertible transformations or explicitly specify * either have invertible transformations or explicitly specify
* transformations going both directions. * transformations going both directions.
* <p>
* @see ICC_ColorSpace * @see ICC_ColorSpace
*/ */
......
...@@ -23,7 +23,8 @@ ...@@ -23,7 +23,8 @@
* questions. * questions.
*/ */
/********************************************************************** /*
**********************************************************************
********************************************************************** **********************************************************************
********************************************************************** **********************************************************************
*** COPYRIGHT (c) Eastman Kodak Company, 1997 *** *** COPYRIGHT (c) Eastman Kodak Company, 1997 ***
...@@ -63,7 +64,6 @@ import sun.java2d.cmm.ProfileDeferralInfo; ...@@ -63,7 +64,6 @@ import sun.java2d.cmm.ProfileDeferralInfo;
</pre> </pre>
* The inverse transform is done by converting the PCS Y components to * The inverse transform is done by converting the PCS Y components to
* device Gray via the inverse of the grayTRC. * device Gray via the inverse of the grayTRC.
* <p>
*/ */
......
...@@ -23,7 +23,8 @@ ...@@ -23,7 +23,8 @@
* questions. * questions.
*/ */
/********************************************************************** /*
**********************************************************************
********************************************************************** **********************************************************************
********************************************************************** **********************************************************************
*** COPYRIGHT (c) Eastman Kodak Company, 1997 *** *** COPYRIGHT (c) Eastman Kodak Company, 1997 ***
...@@ -82,7 +83,6 @@ import sun.java2d.cmm.ProfileDeferralInfo; ...@@ -82,7 +83,6 @@ import sun.java2d.cmm.ProfileDeferralInfo;
* The inverse transform is performed by converting PCS XYZ components to linear * The inverse transform is performed by converting PCS XYZ components to linear
* RGB components through the inverse of the above 3x3 matrix, and then converting * RGB components through the inverse of the above 3x3 matrix, and then converting
* linear RGB to device RGB through inverses of the TRCs. * linear RGB to device RGB through inverses of the TRCs.
* <p>
*/ */
...@@ -111,7 +111,7 @@ extends ICC_Profile { ...@@ -111,7 +111,7 @@ extends ICC_Profile {
/** /**
* Constructs an new <code>ICC_ProfileRGB</code> from a CMM ID. * Constructs an new <code>ICC_ProfileRGB</code> from a CMM ID.
* *
* @param ID The CMM ID for the profile. * @param p The CMM ID for the profile.
* *
*/ */
ICC_ProfileRGB(Profile p) { ICC_ProfileRGB(Profile p) {
......
...@@ -71,7 +71,7 @@ class DnDEventMulticaster extends AWTEventMulticaster ...@@ -71,7 +71,7 @@ class DnDEventMulticaster extends AWTEventMulticaster
* Handles the <code>DragSourceDragEvent</code> by invoking * Handles the <code>DragSourceDragEvent</code> by invoking
* <code>dragOver</code> on listener-a and listener-b. * <code>dragOver</code> on listener-a and listener-b.
* *
* @param e the <code>DragSourceDragEvent</code> * @param dsde the <code>DragSourceDragEvent</code>
*/ */
public void dragOver(DragSourceDragEvent dsde) { public void dragOver(DragSourceDragEvent dsde) {
((DragSourceListener)a).dragOver(dsde); ((DragSourceListener)a).dragOver(dsde);
......
...@@ -37,7 +37,6 @@ package java.awt.dnd; ...@@ -37,7 +37,6 @@ package java.awt.dnd;
* to provide appropriate feedback to the end user * to provide appropriate feedback to the end user
* when the operation completes. * when the operation completes.
* <P> * <P>
* <P>
* @since 1.2 * @since 1.2
*/ */
......
...@@ -197,7 +197,7 @@ public class DropTarget implements DropTargetListener, Serializable { ...@@ -197,7 +197,7 @@ public class DropTarget implements DropTargetListener, Serializable {
* <P> * <P>
* The Component will receive drops only if it is enabled. * The Component will receive drops only if it is enabled.
* @param c The new <code>Component</code> this <code>DropTarget</code> * @param c The new <code>Component</code> this <code>DropTarget</code>
* is to be associated with.<P> * is to be associated with.
*/ */
public synchronized void setComponent(Component c) { public synchronized void setComponent(Component c) {
...@@ -246,7 +246,6 @@ public class DropTarget implements DropTargetListener, Serializable { ...@@ -246,7 +246,6 @@ public class DropTarget implements DropTargetListener, Serializable {
* Sets the default acceptable actions for this <code>DropTarget</code> * Sets the default acceptable actions for this <code>DropTarget</code>
* <P> * <P>
* @param ops the default actions * @param ops the default actions
* <P>
* @see java.awt.dnd.DnDConstants * @see java.awt.dnd.DnDConstants
*/ */
......
...@@ -49,7 +49,7 @@ package java.awt.event; ...@@ -49,7 +49,7 @@ package java.awt.event;
* methods. * methods.
* The relevant method in the listener object is invoked and the {@code MouseEvent} * The relevant method in the listener object is invoked and the {@code MouseEvent}
* or {@code MouseWheelEvent} is passed to it in following cases: * or {@code MouseWheelEvent} is passed to it in following cases:
* <p><ul> * <ul>
* <li>when a mouse button is pressed, released, or clicked (pressed and released) * <li>when a mouse button is pressed, released, or clicked (pressed and released)
* <li>when the mouse cursor enters or exits the component * <li>when the mouse cursor enters or exits the component
* <li>when the mouse wheel rotated, or mouse moved or dragged * <li>when the mouse wheel rotated, or mouse moved or dragged
......
...@@ -57,7 +57,6 @@ import java.awt.geom.AffineTransform; ...@@ -57,7 +57,6 @@ import java.awt.geom.AffineTransform;
* <code>FontRenderContext</code> which is directly constructed will * <code>FontRenderContext</code> which is directly constructed will
* most likely not represent any actual graphics device, and may lead * most likely not represent any actual graphics device, and may lead
* to unexpected or incorrect results. * to unexpected or incorrect results.
* <p>
* @see java.awt.RenderingHints#KEY_TEXT_ANTIALIASING * @see java.awt.RenderingHints#KEY_TEXT_ANTIALIASING
* @see java.awt.RenderingHints#KEY_FRACTIONALMETRICS * @see java.awt.RenderingHints#KEY_FRACTIONALMETRICS
* @see java.awt.Graphics2D#getFontRenderContext() * @see java.awt.Graphics2D#getFontRenderContext()
......
...@@ -322,7 +322,7 @@ final class StyledParagraph { ...@@ -322,7 +322,7 @@ final class StyledParagraph {
} }
/** /**
* Return i such that starts[i] <= index < starts[i+1]. starts * Return i such that starts[i] &lt;= index &lt; starts[i+1]. starts
* must be in increasing order, with at least one element greater * must be in increasing order, with at least one element greater
* than index. * than index.
*/ */
......
...@@ -46,8 +46,7 @@ import java.beans.ConstructorProperties; ...@@ -46,8 +46,7 @@ import java.beans.ConstructorProperties;
* [ y'] = [ m10 m11 m12 ] [ y ] = [ m10x + m11y + m12 ] * [ y'] = [ m10 m11 m12 ] [ y ] = [ m10x + m11y + m12 ]
* [ 1 ] [ 0 0 1 ] [ 1 ] [ 1 ] * [ 1 ] [ 0 0 1 ] [ 1 ] [ 1 ]
* </pre> * </pre>
* <p> * <h3><a name="quadrantapproximation">Handling 90-Degree Rotations</a></h3>
* <h4><a name="quadrantapproximation">Handling 90-Degree Rotations</a></h4>
* <p> * <p>
* In some variations of the <code>rotate</code> methods in the * In some variations of the <code>rotate</code> methods in the
* <code>AffineTransform</code> class, a double-precision argument * <code>AffineTransform</code> class, a double-precision argument
......
...@@ -1047,7 +1047,7 @@ public abstract class QuadCurve2D implements Shape, Cloneable { ...@@ -1047,7 +1047,7 @@ public abstract class QuadCurve2D implements Shape, Cloneable {
/** /**
* Evaluate the t values in the first num slots of the vals[] array * Evaluate the t values in the first num slots of the vals[] array
* and place the evaluated values back into the same array. Only * and place the evaluated values back into the same array. Only
* evaluate t values that are within the range <0, 1>, including * evaluate t values that are within the range &lt;0, 1&gt;, including
* the 0 and 1 ends of the range iff the include0 or include1 * the 0 and 1 ends of the range iff the include0 or include1
* booleans are true. If an "inflection" equation is handed in, * booleans are true. If an "inflection" equation is handed in,
* then any points which represent a point of inflection for that * then any points which represent a point of inflection for that
...@@ -1081,7 +1081,7 @@ public abstract class QuadCurve2D implements Shape, Cloneable { ...@@ -1081,7 +1081,7 @@ public abstract class QuadCurve2D implements Shape, Cloneable {
/** /**
* Determine where coord lies with respect to the range from * Determine where coord lies with respect to the range from
* low to high. It is assumed that low <= high. The return * low to high. It is assumed that low &lt;= high. The return
* value is one of the 5 values BELOW, LOWEDGE, INSIDE, HIGHEDGE, * value is one of the 5 values BELOW, LOWEDGE, INSIDE, HIGHEDGE,
* or ABOVE. * or ABOVE.
*/ */
......
...@@ -54,7 +54,6 @@ import java.awt.Image; ...@@ -54,7 +54,6 @@ import java.awt.Image;
* <p> * <p>
* Alternatively, the contents of the back buffer can be copied, or * Alternatively, the contents of the back buffer can be copied, or
* <i>blitted</i> forward in a chain instead of moving the video pointer. * <i>blitted</i> forward in a chain instead of moving the video pointer.
* <p>
* <pre>{@code * <pre>{@code
* Double buffering: * Double buffering:
* *
......
...@@ -927,7 +927,6 @@ public class BufferedImage extends java.awt.Image ...@@ -927,7 +927,6 @@ public class BufferedImage extends java.awt.Image
* each color component in the returned data when * each color component in the returned data when
* using this method. With a specified coordinate (x,&nbsp;y) in the * using this method. With a specified coordinate (x,&nbsp;y) in the
* image, the ARGB pixel can be accessed in this way: * image, the ARGB pixel can be accessed in this way:
* <p>
* *
* <pre> * <pre>
* pixel = rgbArray[offset + (y-startY)*scansize + (x-startX)]; </pre> * pixel = rgbArray[offset + (y-startY)*scansize + (x-startX)]; </pre>
......
...@@ -23,7 +23,8 @@ ...@@ -23,7 +23,8 @@
* questions. * questions.
*/ */
/********************************************************************** /*
**********************************************************************
********************************************************************** **********************************************************************
********************************************************************** **********************************************************************
*** COPYRIGHT (c) Eastman Kodak Company, 1997 *** *** COPYRIGHT (c) Eastman Kodak Company, 1997 ***
...@@ -64,7 +65,6 @@ import java.awt.RenderingHints; ...@@ -64,7 +65,6 @@ import java.awt.RenderingHints;
* color conversion. * color conversion.
* <p> * <p>
* Note that Source and Destination may be the same object. * Note that Source and Destination may be the same object.
* <p>
* @see java.awt.RenderingHints#KEY_COLOR_RENDERING * @see java.awt.RenderingHints#KEY_COLOR_RENDERING
* @see java.awt.RenderingHints#KEY_DITHERING * @see java.awt.RenderingHints#KEY_DITHERING
*/ */
......
...@@ -41,7 +41,7 @@ public interface CheckboxPeer extends ComponentPeer { ...@@ -41,7 +41,7 @@ public interface CheckboxPeer extends ComponentPeer {
* Sets the state of the checkbox to be checked ({@code true}) or * Sets the state of the checkbox to be checked ({@code true}) or
* unchecked ({@code false}). * unchecked ({@code false}).
* *
* @param t the state to set on the checkbox * @param state the state to set on the checkbox
* *
* @see Checkbox#setState(boolean) * @see Checkbox#setState(boolean)
*/ */
......
...@@ -87,7 +87,7 @@ public interface DesktopPeer { ...@@ -87,7 +87,7 @@ public interface DesktopPeer {
* filling the message fields including to, cc, etc, with the values * filling the message fields including to, cc, etc, with the values
* specified by the given mailto URL. * specified by the given mailto URL.
* *
* @param uri represents a mailto URL with specified values of the message. * @param mailtoURL represents a mailto URL with specified values of the message.
* The syntax of mailto URL is defined by * The syntax of mailto URL is defined by
* <a href="http://www.ietf.org/rfc/rfc2368.txt">RFC2368: The mailto * <a href="http://www.ietf.org/rfc/rfc2368.txt">RFC2368: The mailto
* URL scheme</a> * URL scheme</a>
...@@ -103,5 +103,5 @@ public interface DesktopPeer { ...@@ -103,5 +103,5 @@ public interface DesktopPeer {
* @throws IOException If the user default browser is not found, * @throws IOException If the user default browser is not found,
* or it fails to be launched. * or it fails to be launched.
*/ */
void browse(URI url) throws IOException; void browse(URI uri) throws IOException;
} }
...@@ -533,7 +533,7 @@ public class BufferedReader extends Reader { ...@@ -533,7 +533,7 @@ public class BufferedReader extends Reader {
/** /**
* Returns a {@code Stream}, the elements of which are lines read from * Returns a {@code Stream}, the elements of which are lines read from
* this {@code BufferedReader}. The {@link Stream} is lazily populated, * this {@code BufferedReader}. The {@link Stream} is lazily populated,
* i.e, read only occurs during the * i.e., read only occurs during the
* <a href="../util/stream/package-summary.html#StreamOps">terminal * <a href="../util/stream/package-summary.html#StreamOps">terminal
* stream operation</a>. * stream operation</a>.
* *
...@@ -550,8 +550,8 @@ public class BufferedReader extends Reader { ...@@ -550,8 +550,8 @@ public class BufferedReader extends Reader {
* UncheckedIOException} which will be thrown from the {@code Stream} * UncheckedIOException} which will be thrown from the {@code Stream}
* method that caused the read to take place. This method will return a * method that caused the read to take place. This method will return a
* Stream if invoked on a BufferedReader that is closed. Any operation on * Stream if invoked on a BufferedReader that is closed. Any operation on
* that stream requires reading from the BufferedReader after is it closed * that stream that requires reading from the BufferedReader after it is
* will cause an UncheckedIOException to be thrown. * closed, will cause an UncheckedIOException to be thrown.
* *
* @return a {@code Stream<String>} providing the lines of text * @return a {@code Stream<String>} providing the lines of text
* described by this {@code BufferedReader} * described by this {@code BufferedReader}
...@@ -587,6 +587,7 @@ public class BufferedReader extends Reader { ...@@ -587,6 +587,7 @@ public class BufferedReader extends Reader {
} }
} }
}; };
return StreamSupport.stream(Spliterators.spliteratorUnknownSize(iter, Spliterator.ORDERED), false); return StreamSupport.stream(Spliterators.spliteratorUnknownSize(
iter, Spliterator.ORDERED | Spliterator.NONNULL), false);
} }
} }
...@@ -87,7 +87,7 @@ public interface CharSequence { ...@@ -87,7 +87,7 @@ public interface CharSequence {
char charAt(int index); char charAt(int index);
/** /**
* Returns a new <code>CharSequence</code> that is a subsequence of this sequence. * Returns a <code>CharSequence</code> that is a subsequence of this sequence.
* The subsequence starts with the <code>char</code> value at the specified index and * The subsequence starts with the <code>char</code> value at the specified index and
* ends with the <code>char</code> value at index <tt>end - 1</tt>. The length * ends with the <code>char</code> value at index <tt>end - 1</tt>. The length
* (in <code>char</code>s) of the * (in <code>char</code>s) of the
......
...@@ -1565,8 +1565,12 @@ public final class Class<T> implements java.io.Serializable, ...@@ -1565,8 +1565,12 @@ public final class Class<T> implements java.io.Serializable,
* methods inherited by the array type from {@code Object}. It does not * methods inherited by the array type from {@code Object}. It does not
* contain a {@code Method} object for {@code clone()}. * contain a {@code Method} object for {@code clone()}.
* *
* <p> If this {@code Class} object represents a class or interface with no * <p> If this {@code Class} object represents an interface then the
* public methods, then the returned array has length 0. * returned array does not contain any implicitly declared methods from
* {@code Object}. Therefore, if no methods are explicitly declared in
* this interface or any of its superinterfaces then the returned array
* has length 0. (Note that a {@code Class} object which represents a class
* always has public methods, inherited from {@code Object}.)
* *
* <p> If this {@code Class} object represents a primitive type or void, * <p> If this {@code Class} object represents a primitive type or void,
* then the returned array has length 0. * then the returned array has length 0.
...@@ -1699,25 +1703,29 @@ public final class Class<T> implements java.io.Serializable, ...@@ -1699,25 +1703,29 @@ public final class Class<T> implements java.io.Serializable,
* order. If {@code parameterTypes} is {@code null}, it is * order. If {@code parameterTypes} is {@code null}, it is
* treated as if it were an empty array. * treated as if it were an empty array.
* *
* <p> If the {@code name} is "{@code <init>};"or "{@code <clinit>}" a * <p> If the {@code name} is "{@code <init>}" or "{@code <clinit>}" a
* {@code NoSuchMethodException} is raised. Otherwise, the method to * {@code NoSuchMethodException} is raised. Otherwise, the method to
* be reflected is determined by the algorithm that follows. Let C be the * be reflected is determined by the algorithm that follows. Let C be the
* class represented by this object: * class or interface represented by this object:
* <OL> * <OL>
* <LI> C is searched for any <I>matching methods</I>. If no matching * <LI> C is searched for a <I>matching method</I>, as defined below. If a
* method is found, the algorithm of step 1 is invoked recursively on * matching method is found, it is reflected.</LI>
* the superclass of C.</LI> * <LI> If no matching method is found by step 1 then:
* <LI> If no method was found in step 1 above, the superinterfaces of C * <OL TYPE="a">
* are searched for a matching method. If any such method is found, it * <LI> If C is a class other than {@code Object}, then this algorithm is
* is reflected.</LI> * invoked recursively on the superclass of C.</LI>
* <LI> If C is the class {@code Object}, or if C is an interface, then
* the superinterfaces of C (if any) are searched for a matching
* method. If any such method is found, it is reflected.</LI>
* </OL></LI>
* </OL> * </OL>
* *
* To find a matching method in a class C:&nbsp; If C declares exactly one * <p> To find a matching method in a class or interface C:&nbsp; If C
* public method with the specified name and exactly the same formal * declares exactly one public method with the specified name and exactly
* parameter types, that is the method reflected. If more than one such * the same formal parameter types, that is the method reflected. If more
* method is found in C, and one of these methods has a return type that is * than one such method is found in C, and one of these methods has a
* more specific than any of the others, that method is reflected; * return type that is more specific than any of the others, that method is
* otherwise one of the methods is chosen arbitrarily. * reflected; otherwise one of the methods is chosen arbitrarily.
* *
* <p>Note that there may be more than one matching method in a * <p>Note that there may be more than one matching method in a
* class because while the Java language forbids a class to * class because while the Java language forbids a class to
......
...@@ -1958,7 +1958,7 @@ public final class String ...@@ -1958,7 +1958,7 @@ public final class String
} }
/** /**
* Returns a new character sequence that is a subsequence of this sequence. * Returns a character sequence that is a subsequence of this sequence.
* *
* <p> An invocation of this method of the form * <p> An invocation of this method of the form
* *
......
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html lang="en">
<head>
<title>Value-based Classes</title>
<link rel="stylesheet" type="text/css" href="../../../stylesheet.css" title="Style">
</head>
<body>
<h2 id="ValueBased">Value-based Classes</h2>
Some classes, such as <code>java.util.Optional</code> and
<code>java.time.LocalDateTime</code>, are <em>value-based</em>. Instances of a
value-based class:
<ul>
<li>are final and immutable (though may contain references to mutable
objects);</li>
<li>have implementations of <code>equals</code>,
<code>hashCode</code>, and <code>toString</code> which are computed
solely from the instance's state and not from its identity or the state
of any other object or variable;</li>
<li>make no use of identity-sensitive operations such as reference
equality (<code>==</code>) between instances, identity hash code of
instances, or synchronization on an instances's intrinsic lock;</li>
<li>are considered equal solely based on <code>equals()</code>, not
based on reference equality (<code>==</code>);</li>
<li>do not have accessible constructors, but are instead instantiated
through factory methods which make no committment as to the identity
of returned instances;</li>
<li>are <em>freely substitutable</em> when equal, meaning that interchanging
any two instances <code>x</code> and <code>y</code> that are equal
according to <code>equals()</code> in any computation or method
invocation should produce no visible change in behavior.
</li>
</ul>
<p>A program may produce unpredictable results if it attempts to distinguish two
references to equal values of a value-based class, whether directly via reference
equality or indirectly via an appeal to synchronization, identity hashing,
serialization, or any other identity-sensitive mechanism. Use of such
identity-sensitive operations on instances of value-based classes may have
unpredictable effects and should be avoided.</p>
</body>
</html>
...@@ -215,7 +215,7 @@ public class BigInteger extends Number implements Comparable<BigInteger> { ...@@ -215,7 +215,7 @@ public class BigInteger extends Number implements Comparable<BigInteger> {
* Karatsuba multiplication will be used. This value is found * Karatsuba multiplication will be used. This value is found
* experimentally to work well. * experimentally to work well.
*/ */
private static final int KARATSUBA_THRESHOLD = 50; private static final int KARATSUBA_THRESHOLD = 80;
/** /**
* The threshold value for using 3-way Toom-Cook multiplication. * The threshold value for using 3-way Toom-Cook multiplication.
...@@ -224,7 +224,7 @@ public class BigInteger extends Number implements Comparable<BigInteger> { ...@@ -224,7 +224,7 @@ public class BigInteger extends Number implements Comparable<BigInteger> {
* the mag arrays is greater than this threshold, then Toom-Cook * the mag arrays is greater than this threshold, then Toom-Cook
* multiplication will be used. * multiplication will be used.
*/ */
private static final int TOOM_COOK_THRESHOLD = 75; private static final int TOOM_COOK_THRESHOLD = 240;
/** /**
* The threshold value for using Karatsuba squaring. If the number * The threshold value for using Karatsuba squaring. If the number
...@@ -232,7 +232,7 @@ public class BigInteger extends Number implements Comparable<BigInteger> { ...@@ -232,7 +232,7 @@ public class BigInteger extends Number implements Comparable<BigInteger> {
* Karatsuba squaring will be used. This value is found * Karatsuba squaring will be used. This value is found
* experimentally to work well. * experimentally to work well.
*/ */
private static final int KARATSUBA_SQUARE_THRESHOLD = 90; private static final int KARATSUBA_SQUARE_THRESHOLD = 128;
/** /**
* The threshold value for using Toom-Cook squaring. If the number * The threshold value for using Toom-Cook squaring. If the number
...@@ -240,15 +240,23 @@ public class BigInteger extends Number implements Comparable<BigInteger> { ...@@ -240,15 +240,23 @@ public class BigInteger extends Number implements Comparable<BigInteger> {
* Toom-Cook squaring will be used. This value is found * Toom-Cook squaring will be used. This value is found
* experimentally to work well. * experimentally to work well.
*/ */
private static final int TOOM_COOK_SQUARE_THRESHOLD = 140; private static final int TOOM_COOK_SQUARE_THRESHOLD = 216;
/** /**
* The threshold value for using Burnikel-Ziegler division. If the number * The threshold value for using Burnikel-Ziegler division. If the number
* of ints in the number are larger than this value, * of ints in the divisor are larger than this value, Burnikel-Ziegler
* Burnikel-Ziegler division will be used. This value is found * division may be used. This value is found experimentally to work well.
* experimentally to work well. */
static final int BURNIKEL_ZIEGLER_THRESHOLD = 80;
/**
* The offset value for using Burnikel-Ziegler division. If the number
* of ints in the divisor exceeds the Burnikel-Ziegler threshold, and the
* number of ints in the dividend is greater than the number of ints in the
* divisor plus this value, Burnikel-Ziegler division will be used. This
* value is found experimentally to work well.
*/ */
static final int BURNIKEL_ZIEGLER_THRESHOLD = 50; static final int BURNIKEL_ZIEGLER_OFFSET = 40;
/** /**
* The threshold value for using Schoenhage recursive base conversion. If * The threshold value for using Schoenhage recursive base conversion. If
...@@ -258,7 +266,7 @@ public class BigInteger extends Number implements Comparable<BigInteger> { ...@@ -258,7 +266,7 @@ public class BigInteger extends Number implements Comparable<BigInteger> {
* relatively flat for thresholds between 2-25, so this choice may be * relatively flat for thresholds between 2-25, so this choice may be
* varied within this range for very small effect. * varied within this range for very small effect.
*/ */
private static final int SCHOENHAGE_BASE_CONVERSION_THRESHOLD = 8; private static final int SCHOENHAGE_BASE_CONVERSION_THRESHOLD = 20;
//Constructors //Constructors
...@@ -1815,7 +1823,7 @@ public class BigInteger extends Number implements Comparable<BigInteger> { ...@@ -1815,7 +1823,7 @@ public class BigInteger extends Number implements Comparable<BigInteger> {
int len = mag.length; int len = mag.length;
if (len <= n) { if (len <= n) {
return this; return abs();
} }
int lowerInts[] = new int[n]; int lowerInts[] = new int[n];
...@@ -2017,8 +2025,8 @@ public class BigInteger extends Number implements Comparable<BigInteger> { ...@@ -2017,8 +2025,8 @@ public class BigInteger extends Number implements Comparable<BigInteger> {
* @throws ArithmeticException if {@code val} is zero. * @throws ArithmeticException if {@code val} is zero.
*/ */
public BigInteger divide(BigInteger val) { public BigInteger divide(BigInteger val) {
if (mag.length < BURNIKEL_ZIEGLER_THRESHOLD || if (val.mag.length < BURNIKEL_ZIEGLER_THRESHOLD ||
val.mag.length < BURNIKEL_ZIEGLER_THRESHOLD) { mag.length - val.mag.length < BURNIKEL_ZIEGLER_OFFSET) {
return divideKnuth(val); return divideKnuth(val);
} else { } else {
return divideBurnikelZiegler(val); return divideBurnikelZiegler(val);
...@@ -2054,8 +2062,8 @@ public class BigInteger extends Number implements Comparable<BigInteger> { ...@@ -2054,8 +2062,8 @@ public class BigInteger extends Number implements Comparable<BigInteger> {
* @throws ArithmeticException if {@code val} is zero. * @throws ArithmeticException if {@code val} is zero.
*/ */
public BigInteger[] divideAndRemainder(BigInteger val) { public BigInteger[] divideAndRemainder(BigInteger val) {
if (mag.length < BURNIKEL_ZIEGLER_THRESHOLD || if (val.mag.length < BURNIKEL_ZIEGLER_THRESHOLD ||
val.mag.length < BURNIKEL_ZIEGLER_THRESHOLD) { mag.length - val.mag.length < BURNIKEL_ZIEGLER_OFFSET) {
return divideAndRemainderKnuth(val); return divideAndRemainderKnuth(val);
} else { } else {
return divideAndRemainderBurnikelZiegler(val); return divideAndRemainderBurnikelZiegler(val);
...@@ -2083,8 +2091,8 @@ public class BigInteger extends Number implements Comparable<BigInteger> { ...@@ -2083,8 +2091,8 @@ public class BigInteger extends Number implements Comparable<BigInteger> {
* @throws ArithmeticException if {@code val} is zero. * @throws ArithmeticException if {@code val} is zero.
*/ */
public BigInteger remainder(BigInteger val) { public BigInteger remainder(BigInteger val) {
if (mag.length < BURNIKEL_ZIEGLER_THRESHOLD || if (val.mag.length < BURNIKEL_ZIEGLER_THRESHOLD ||
val.mag.length < BURNIKEL_ZIEGLER_THRESHOLD) { mag.length - val.mag.length < BURNIKEL_ZIEGLER_OFFSET) {
return remainderKnuth(val); return remainderKnuth(val);
} else { } else {
return remainderBurnikelZiegler(val); return remainderBurnikelZiegler(val);
......
...@@ -1148,8 +1148,8 @@ class MutableBigInteger { ...@@ -1148,8 +1148,8 @@ class MutableBigInteger {
} }
MutableBigInteger divide(MutableBigInteger b, MutableBigInteger quotient, boolean needRemainder) { MutableBigInteger divide(MutableBigInteger b, MutableBigInteger quotient, boolean needRemainder) {
if (intLen < BigInteger.BURNIKEL_ZIEGLER_THRESHOLD || if (b.intLen < BigInteger.BURNIKEL_ZIEGLER_THRESHOLD ||
b.intLen < BigInteger.BURNIKEL_ZIEGLER_THRESHOLD) { intLen - b.intLen < BigInteger.BURNIKEL_ZIEGLER_OFFSET) {
return divideKnuth(b, quotient, needRemainder); return divideKnuth(b, quotient, needRemainder);
} else { } else {
return divideAndRemainderBurnikelZiegler(b, quotient); return divideAndRemainderBurnikelZiegler(b, quotient);
......
...@@ -336,6 +336,8 @@ public abstract class Provider extends Properties { ...@@ -336,6 +336,8 @@ public abstract class Provider extends Properties {
* if a security manager exists and its {@link * if a security manager exists and its {@link
* java.lang.SecurityManager#checkSecurityAccess} method * java.lang.SecurityManager#checkSecurityAccess} method
* denies access to set property values. * denies access to set property values.
*
* @since 1.8
*/ */
@Override @Override
public synchronized Object putIfAbsent(Object key, Object value) { public synchronized Object putIfAbsent(Object key, Object value) {
...@@ -385,6 +387,8 @@ public abstract class Provider extends Properties { ...@@ -385,6 +387,8 @@ public abstract class Provider extends Properties {
* if a security manager exists and its {@link * if a security manager exists and its {@link
* java.lang.SecurityManager#checkSecurityAccess} method * java.lang.SecurityManager#checkSecurityAccess} method
* denies access to remove this provider's properties. * denies access to remove this provider's properties.
*
* @since 1.8
*/ */
@Override @Override
public synchronized boolean remove(Object key, Object value) { public synchronized boolean remove(Object key, Object value) {
...@@ -408,6 +412,8 @@ public abstract class Provider extends Properties { ...@@ -408,6 +412,8 @@ public abstract class Provider extends Properties {
* if a security manager exists and its {@link * if a security manager exists and its {@link
* java.lang.SecurityManager#checkSecurityAccess} method * java.lang.SecurityManager#checkSecurityAccess} method
* denies access to set property values. * denies access to set property values.
*
* @since 1.8
*/ */
@Override @Override
public synchronized boolean replace(Object key, Object oldValue, public synchronized boolean replace(Object key, Object oldValue,
...@@ -433,6 +439,8 @@ public abstract class Provider extends Properties { ...@@ -433,6 +439,8 @@ public abstract class Provider extends Properties {
* if a security manager exists and its {@link * if a security manager exists and its {@link
* java.lang.SecurityManager#checkSecurityAccess} method * java.lang.SecurityManager#checkSecurityAccess} method
* denies access to set property values. * denies access to set property values.
*
* @since 1.8
*/ */
@Override @Override
public synchronized Object replace(Object key, Object value) { public synchronized Object replace(Object key, Object value) {
...@@ -459,6 +467,8 @@ public abstract class Provider extends Properties { ...@@ -459,6 +467,8 @@ public abstract class Provider extends Properties {
* if a security manager exists and its {@link * if a security manager exists and its {@link
* java.lang.SecurityManager#checkSecurityAccess} method * java.lang.SecurityManager#checkSecurityAccess} method
* denies access to set property values. * denies access to set property values.
*
* @since 1.8
*/ */
@Override @Override
public synchronized void replaceAll(BiFunction<? super Object, ? super Object, ? extends Object> function) { public synchronized void replaceAll(BiFunction<? super Object, ? super Object, ? extends Object> function) {
...@@ -485,6 +495,8 @@ public abstract class Provider extends Properties { ...@@ -485,6 +495,8 @@ public abstract class Provider extends Properties {
* if a security manager exists and its {@link * if a security manager exists and its {@link
* java.lang.SecurityManager#checkSecurityAccess} method * java.lang.SecurityManager#checkSecurityAccess} method
* denies access to set property values or remove properties. * denies access to set property values or remove properties.
*
* @since 1.8
*/ */
@Override @Override
public synchronized Object compute(Object key, public synchronized Object compute(Object key,
...@@ -514,6 +526,8 @@ public abstract class Provider extends Properties { ...@@ -514,6 +526,8 @@ public abstract class Provider extends Properties {
* if a security manager exists and its {@link * if a security manager exists and its {@link
* java.lang.SecurityManager#checkSecurityAccess} method * java.lang.SecurityManager#checkSecurityAccess} method
* denies access to set property values and remove properties. * denies access to set property values and remove properties.
*
* @since 1.8
*/ */
@Override @Override
public synchronized Object computeIfAbsent(Object key, Function<? super Object, ? extends Object> mappingFunction) { public synchronized Object computeIfAbsent(Object key, Function<? super Object, ? extends Object> mappingFunction) {
...@@ -541,6 +555,8 @@ public abstract class Provider extends Properties { ...@@ -541,6 +555,8 @@ public abstract class Provider extends Properties {
* if a security manager exists and its {@link * if a security manager exists and its {@link
* java.lang.SecurityManager#checkSecurityAccess} method * java.lang.SecurityManager#checkSecurityAccess} method
* denies access to set property values or remove properties. * denies access to set property values or remove properties.
*
* @since 1.8
*/ */
@Override @Override
public synchronized Object computeIfPresent(Object key, BiFunction<? super Object, ? super Object, ? extends Object> remappingFunction) { public synchronized Object computeIfPresent(Object key, BiFunction<? super Object, ? super Object, ? extends Object> remappingFunction) {
...@@ -571,6 +587,8 @@ public abstract class Provider extends Properties { ...@@ -571,6 +587,8 @@ public abstract class Provider extends Properties {
* if a security manager exists and its {@link * if a security manager exists and its {@link
* java.lang.SecurityManager#checkSecurityAccess} method * java.lang.SecurityManager#checkSecurityAccess} method
* denies access to set property values or remove properties. * denies access to set property values or remove properties.
*
* @since 1.8
*/ */
@Override @Override
public synchronized Object merge(Object key, Object value, BiFunction<? super Object, ? super Object, ? extends Object> remappingFunction) { public synchronized Object merge(Object key, Object value, BiFunction<? super Object, ? super Object, ? extends Object> remappingFunction) {
...@@ -589,13 +607,18 @@ public abstract class Provider extends Properties { ...@@ -589,13 +607,18 @@ public abstract class Provider extends Properties {
checkInitialized(); checkInitialized();
return super.get(key); return super.get(key);
} }
/**
* @since 1.8
*/
@Override @Override
public synchronized Object getOrDefault(Object key, Object defaultValue) { public synchronized Object getOrDefault(Object key, Object defaultValue) {
checkInitialized(); checkInitialized();
return super.getOrDefault(key, defaultValue); return super.getOrDefault(key, defaultValue);
} }
/**
* @since 1.8
*/
@Override @Override
public synchronized void forEach(BiConsumer<? super Object, ? super Object> action) { public synchronized void forEach(BiConsumer<? super Object, ? super Object> action) {
checkInitialized(); checkInitialized();
......
...@@ -1108,7 +1108,7 @@ public interface CallableStatement extends PreparedStatement { ...@@ -1108,7 +1108,7 @@ public interface CallableStatement extends PreparedStatement {
* parameter; if a database access error occurs or * parameter; if a database access error occurs or
* this method is called on a closed <code>CallableStatement</code> * this method is called on a closed <code>CallableStatement</code>
* @exception SQLFeatureNotSupportedException if * @exception SQLFeatureNotSupportedException if
* the JDBC driver does not support this data type * the JDBC driver does not support the specified targetSqlType
* @see Types * @see Types
* @see #getObject * @see #getObject
* @since 1.4 * @since 1.4
...@@ -1131,7 +1131,7 @@ public interface CallableStatement extends PreparedStatement { ...@@ -1131,7 +1131,7 @@ public interface CallableStatement extends PreparedStatement {
* parameter; if a database access error occurs or * parameter; if a database access error occurs or
* this method is called on a closed <code>CallableStatement</code> * this method is called on a closed <code>CallableStatement</code>
* @exception SQLFeatureNotSupportedException if * @exception SQLFeatureNotSupportedException if
* the JDBC driver does not support this data type * the JDBC driver does not support the specified targetSqlType
* @see #getObject * @see #getObject
* @since 1.4 * @since 1.4
*/ */
...@@ -2536,7 +2536,7 @@ public interface CallableStatement extends PreparedStatement { ...@@ -2536,7 +2536,7 @@ public interface CallableStatement extends PreparedStatement {
* or Reader object and the value of the scale parameter is less * or Reader object and the value of the scale parameter is less
* than zero * than zero
* @exception SQLFeatureNotSupportedException if * @exception SQLFeatureNotSupportedException if
* the JDBC driver does not support this data type * the JDBC driver does not support the specified targetSqlType
* @see JDBCType * @see JDBCType
* @see SQLType * @see SQLType
* *
...@@ -2562,7 +2562,7 @@ public interface CallableStatement extends PreparedStatement { ...@@ -2562,7 +2562,7 @@ public interface CallableStatement extends PreparedStatement {
* parameter; if a database access error occurs * parameter; if a database access error occurs
* or this method is called on a closed {@code CallableStatement} * or this method is called on a closed {@code CallableStatement}
* @exception SQLFeatureNotSupportedException if * @exception SQLFeatureNotSupportedException if
* the JDBC driver does not support this data type * the JDBC driver does not support the specified targetSqlType
* @see JDBCType * @see JDBCType
* @see SQLType * @see SQLType
* @since 1.8 * @since 1.8
...@@ -2603,7 +2603,7 @@ public interface CallableStatement extends PreparedStatement { ...@@ -2603,7 +2603,7 @@ public interface CallableStatement extends PreparedStatement {
* if a database access error occurs or * if a database access error occurs or
* this method is called on a closed {@code CallableStatement} * this method is called on a closed {@code CallableStatement}
* @exception SQLFeatureNotSupportedException if * @exception SQLFeatureNotSupportedException if
* the JDBC driver does not support this data type * the JDBC driver does not support the specified sqlType
* @see JDBCType * @see JDBCType
* @see SQLType * @see SQLType
* @since 1.8 * @since 1.8
...@@ -2639,7 +2639,7 @@ public interface CallableStatement extends PreparedStatement { ...@@ -2639,7 +2639,7 @@ public interface CallableStatement extends PreparedStatement {
* if a database access error occurs or * if a database access error occurs or
* this method is called on a closed {@code CallableStatement} * this method is called on a closed {@code CallableStatement}
* @exception SQLFeatureNotSupportedException if * @exception SQLFeatureNotSupportedException if
* the JDBC driver does not support this data type * the JDBC driver does not support the specified sqlType
* @see JDBCType * @see JDBCType
* @see SQLType * @see SQLType
* @since 1.8 * @since 1.8
...@@ -2686,7 +2686,7 @@ public interface CallableStatement extends PreparedStatement { ...@@ -2686,7 +2686,7 @@ public interface CallableStatement extends PreparedStatement {
* if a database access error occurs or * if a database access error occurs or
* this method is called on a closed {@code CallableStatement} * this method is called on a closed {@code CallableStatement}
* @exception SQLFeatureNotSupportedException if * @exception SQLFeatureNotSupportedException if
* the JDBC driver does not support this data type * the JDBC driver does not support the specified sqlType
* @see JDBCType * @see JDBCType
* @see SQLType * @see SQLType
* @since 1.8 * @since 1.8
...@@ -2725,7 +2725,7 @@ public interface CallableStatement extends PreparedStatement { ...@@ -2725,7 +2725,7 @@ public interface CallableStatement extends PreparedStatement {
* parameter; if a database access error occurs or * parameter; if a database access error occurs or
* this method is called on a closed {@code CallableStatement} * this method is called on a closed {@code CallableStatement}
* @exception SQLFeatureNotSupportedException if * @exception SQLFeatureNotSupportedException if
* the JDBC driver does not support this data type * the JDBC driver does not support the specified sqlType
* or if the JDBC driver does not support * or if the JDBC driver does not support
* this method * this method
* @since 1.8 * @since 1.8
...@@ -2762,7 +2762,7 @@ public interface CallableStatement extends PreparedStatement { ...@@ -2762,7 +2762,7 @@ public interface CallableStatement extends PreparedStatement {
* parameter; if a database access error occurs or * parameter; if a database access error occurs or
* this method is called on a closed {@code CallableStatement} * this method is called on a closed {@code CallableStatement}
* @exception SQLFeatureNotSupportedException if * @exception SQLFeatureNotSupportedException if
* the JDBC driver does not support this data type * the JDBC driver does not support the specified sqlType
* or if the JDBC driver does not support * or if the JDBC driver does not support
* this method * this method
* @since 1.8 * @since 1.8
...@@ -2811,7 +2811,7 @@ public interface CallableStatement extends PreparedStatement { ...@@ -2811,7 +2811,7 @@ public interface CallableStatement extends PreparedStatement {
* parameter; if a database access error occurs or * parameter; if a database access error occurs or
* this method is called on a closed {@code CallableStatement} * this method is called on a closed {@code CallableStatement}
* @exception SQLFeatureNotSupportedException if * @exception SQLFeatureNotSupportedException if
* the JDBC driver does not support this data type * the JDBC driver does not support the specified sqlType
* or if the JDBC driver does not support this method * or if the JDBC driver does not support this method
* @see JDBCType * @see JDBCType
* @see SQLType * @see SQLType
......
...@@ -213,8 +213,8 @@ public class DriverManager { ...@@ -213,8 +213,8 @@ public class DriverManager {
* The <code>DriverManager</code> attempts to select an appropriate driver from * The <code>DriverManager</code> attempts to select an appropriate driver from
* the set of registered JDBC drivers. * the set of registered JDBC drivers.
*<p> *<p>
* <B>Note:</B> If a property is specified as part of the {@code url} and * <B>Note:</B> If the {@code user} or {@code password} property are
* is also specified in the {@code Properties} object, it is * also specified as part of the {@code url}, it is
* implementation-defined as to which value will take precedence. * implementation-defined as to which value will take precedence.
* For maximum portability, an application should only specify a * For maximum portability, an application should only specify a
* property once. * property once.
...@@ -320,7 +320,7 @@ public class DriverManager { ...@@ -320,7 +320,7 @@ public class DriverManager {
* Registers the given driver with the {@code DriverManager}. * Registers the given driver with the {@code DriverManager}.
* A newly-loaded driver class should call * A newly-loaded driver class should call
* the method {@code registerDriver} to make itself * the method {@code registerDriver} to make itself
* known to the {@code DriverManager}. If the driver had previously been * known to the {@code DriverManager}. If the driver is currently
* registered, no action is taken. * registered, no action is taken.
* *
* @param driver the new JDBC Driver that is to be registered with the * @param driver the new JDBC Driver that is to be registered with the
...@@ -338,7 +338,7 @@ public class DriverManager { ...@@ -338,7 +338,7 @@ public class DriverManager {
* Registers the given driver with the {@code DriverManager}. * Registers the given driver with the {@code DriverManager}.
* A newly-loaded driver class should call * A newly-loaded driver class should call
* the method {@code registerDriver} to make itself * the method {@code registerDriver} to make itself
* known to the {@code DriverManager}. If the driver had previously been * known to the {@code DriverManager}. If the driver is currently
* registered, no action is taken. * registered, no action is taken.
* *
* @param driver the new JDBC Driver that is to be registered with the * @param driver the new JDBC Driver that is to be registered with the
...@@ -347,6 +347,7 @@ public class DriverManager { ...@@ -347,6 +347,7 @@ public class DriverManager {
* {@code DriverManager#deregisterDriver} is called * {@code DriverManager#deregisterDriver} is called
* @exception SQLException if a database access error occurs * @exception SQLException if a database access error occurs
* @exception NullPointerException if {@code driver} is null * @exception NullPointerException if {@code driver} is null
* @since 1.8
*/ */
public static synchronized void registerDriver(java.sql.Driver driver, public static synchronized void registerDriver(java.sql.Driver driver,
DriverAction da) DriverAction da)
......
...@@ -218,8 +218,8 @@ public enum JDBCType implements SQLType { ...@@ -218,8 +218,8 @@ public enum JDBCType implements SQLType {
} }
/** /**
* Returns the name of the data type. *{@inheritDoc }
* @return The name of the data type. * @return The name of this {@code SQLType}.
*/ */
public String getName() { public String getName() {
return name(); return name();
......
...@@ -401,7 +401,7 @@ public interface PreparedStatement extends Statement { ...@@ -401,7 +401,7 @@ public interface PreparedStatement extends Statement {
* marker in the SQL statement; if a database access error occurs or this * marker in the SQL statement; if a database access error occurs or this
* method is called on a closed PreparedStatement * method is called on a closed PreparedStatement
* @exception SQLFeatureNotSupportedException if * @exception SQLFeatureNotSupportedException if
* the JDBC driver does not support this data type * the JDBC driver does not support the specified targetSqlType
* @see Types * @see Types
*/ */
void setObject(int parameterIndex, Object x, int targetSqlType) void setObject(int parameterIndex, Object x, int targetSqlType)
...@@ -951,7 +951,7 @@ public interface PreparedStatement extends Statement { ...@@ -951,7 +951,7 @@ public interface PreparedStatement extends Statement {
* or Reader object and the value of the scale parameter is less * or Reader object and the value of the scale parameter is less
* than zero * than zero
* @exception SQLFeatureNotSupportedException if * @exception SQLFeatureNotSupportedException if
* the JDBC driver does not support this data type * the JDBC driver does not support the specified targetSqlType
* @see Types * @see Types
* *
*/ */
...@@ -1255,7 +1255,7 @@ public interface PreparedStatement extends Statement { ...@@ -1255,7 +1255,7 @@ public interface PreparedStatement extends Statement {
* or Reader object and the value of the scale parameter is less * or Reader object and the value of the scale parameter is less
* than zero * than zero
* @exception SQLFeatureNotSupportedException if * @exception SQLFeatureNotSupportedException if
* the JDBC driver does not support this data type * the JDBC driver does not support the specified targetSqlType
* @see JDBCType * @see JDBCType
* @see SQLType * @see SQLType
* @since 1.8 * @since 1.8
...@@ -1281,7 +1281,7 @@ public interface PreparedStatement extends Statement { ...@@ -1281,7 +1281,7 @@ public interface PreparedStatement extends Statement {
* parameter marker in the SQL statement; if a database access error occurs * parameter marker in the SQL statement; if a database access error occurs
* or this method is called on a closed {@code PreparedStatement} * or this method is called on a closed {@code PreparedStatement}
* @exception SQLFeatureNotSupportedException if * @exception SQLFeatureNotSupportedException if
* the JDBC driver does not support this data type * the JDBC driver does not support the specified targetSqlType
* @see JDBCType * @see JDBCType
* @see SQLType * @see SQLType
* @since 1.8 * @since 1.8
......
...@@ -4178,7 +4178,7 @@ public interface ResultSet extends Wrapper, AutoCloseable { ...@@ -4178,7 +4178,7 @@ public interface ResultSet extends Wrapper, AutoCloseable {
* the result set concurrency is {@code CONCUR_READ_ONLY} * the result set concurrency is {@code CONCUR_READ_ONLY}
* or this method is called on a closed result set * or this method is called on a closed result set
* @exception SQLFeatureNotSupportedException if the JDBC driver does not * @exception SQLFeatureNotSupportedException if the JDBC driver does not
* support this method; if the JDBC driver does not support this data type * support this method; if the JDBC driver does not support the specified targetSqlType
* @see JDBCType * @see JDBCType
* @see SQLType * @see SQLType
* @since 1.8 * @since 1.8
...@@ -4221,7 +4221,7 @@ public interface ResultSet extends Wrapper, AutoCloseable { ...@@ -4221,7 +4221,7 @@ public interface ResultSet extends Wrapper, AutoCloseable {
* the result set concurrency is {@code CONCUR_READ_ONLY} * the result set concurrency is {@code CONCUR_READ_ONLY}
* or this method is called on a closed result set * or this method is called on a closed result set
* @exception SQLFeatureNotSupportedException if the JDBC driver does not * @exception SQLFeatureNotSupportedException if the JDBC driver does not
* support this method; if the JDBC driver does not support this data type * support this method; if the JDBC driver does not support the specified targetSqlType
* @see JDBCType * @see JDBCType
* @see SQLType * @see SQLType
* @since 1.8 * @since 1.8
...@@ -4249,7 +4249,7 @@ public interface ResultSet extends Wrapper, AutoCloseable { ...@@ -4249,7 +4249,7 @@ public interface ResultSet extends Wrapper, AutoCloseable {
* the result set concurrency is {@code CONCUR_READ_ONLY} * the result set concurrency is {@code CONCUR_READ_ONLY}
* or this method is called on a closed result set * or this method is called on a closed result set
* @exception SQLFeatureNotSupportedException if the JDBC driver does not * @exception SQLFeatureNotSupportedException if the JDBC driver does not
* support this method; if the JDBC driver does not support this data type * support this method; if the JDBC driver does not support the specified targetSqlType
* @see JDBCType * @see JDBCType
* @see SQLType * @see SQLType
* @since 1.8 * @since 1.8
...@@ -4279,7 +4279,7 @@ public interface ResultSet extends Wrapper, AutoCloseable { ...@@ -4279,7 +4279,7 @@ public interface ResultSet extends Wrapper, AutoCloseable {
* the result set concurrency is {@code CONCUR_READ_ONLY} * the result set concurrency is {@code CONCUR_READ_ONLY}
* or this method is called on a closed result set * or this method is called on a closed result set
* @exception SQLFeatureNotSupportedException if the JDBC driver does not * @exception SQLFeatureNotSupportedException if the JDBC driver does not
* support this method; if the JDBC driver does not support this data type * support this method; if the JDBC driver does not support the specified targetSqlType
* @see JDBCType * @see JDBCType
* @see SQLType * @see SQLType
* @since 1.8 * @since 1.8
......
...@@ -122,7 +122,7 @@ public final class SQLPermission extends BasicPermission { ...@@ -122,7 +122,7 @@ public final class SQLPermission extends BasicPermission {
* *
* @param name the name of this <code>SQLPermission</code> object, which must * @param name the name of this <code>SQLPermission</code> object, which must
* be either {@code setLog}, {@code callAbort}, {@code setSyncFactory}, * be either {@code setLog}, {@code callAbort}, {@code setSyncFactory},
* or {@code setNetworkTimeout} * {@code deregisterDriver}, or {@code setNetworkTimeout}
* @throws NullPointerException if <code>name</code> is <code>null</code>. * @throws NullPointerException if <code>name</code> is <code>null</code>.
* @throws IllegalArgumentException if <code>name</code> is empty. * @throws IllegalArgumentException if <code>name</code> is empty.
...@@ -140,7 +140,7 @@ public final class SQLPermission extends BasicPermission { ...@@ -140,7 +140,7 @@ public final class SQLPermission extends BasicPermission {
* *
* @param name the name of this <code>SQLPermission</code> object, which must * @param name the name of this <code>SQLPermission</code> object, which must
* be either {@code setLog}, {@code callAbort}, {@code setSyncFactory}, * be either {@code setLog}, {@code callAbort}, {@code setSyncFactory},
* or {@code setNetworkTimeout} * {@code deregisterDriver}, or {@code setNetworkTimeout}
* @param actions should be <code>null</code> * @param actions should be <code>null</code>
* @throws NullPointerException if <code>name</code> is <code>null</code>. * @throws NullPointerException if <code>name</code> is <code>null</code>.
* @throws IllegalArgumentException if <code>name</code> is empty. * @throws IllegalArgumentException if <code>name</code> is empty.
......
...@@ -63,6 +63,7 @@ import java.util.stream.Collector; ...@@ -63,6 +63,7 @@ import java.util.stream.Collector;
public class DoubleSummaryStatistics implements DoubleConsumer { public class DoubleSummaryStatistics implements DoubleConsumer {
private long count; private long count;
private double sum; private double sum;
private double sumCompensation; // Low order bits of sum
private double min = Double.POSITIVE_INFINITY; private double min = Double.POSITIVE_INFINITY;
private double max = Double.NEGATIVE_INFINITY; private double max = Double.NEGATIVE_INFINITY;
...@@ -81,7 +82,7 @@ public class DoubleSummaryStatistics implements DoubleConsumer { ...@@ -81,7 +82,7 @@ public class DoubleSummaryStatistics implements DoubleConsumer {
@Override @Override
public void accept(double value) { public void accept(double value) {
++count; ++count;
sum += value; sumWithCompensation(value);
min = Math.min(min, value); min = Math.min(min, value);
max = Math.max(max, value); max = Math.max(max, value);
} }
...@@ -95,11 +96,23 @@ public class DoubleSummaryStatistics implements DoubleConsumer { ...@@ -95,11 +96,23 @@ public class DoubleSummaryStatistics implements DoubleConsumer {
*/ */
public void combine(DoubleSummaryStatistics other) { public void combine(DoubleSummaryStatistics other) {
count += other.count; count += other.count;
sum += other.sum; sumWithCompensation(other.sum);
sumWithCompensation(other.sumCompensation);
min = Math.min(min, other.min); min = Math.min(min, other.min);
max = Math.max(max, other.max); max = Math.max(max, other.max);
} }
/**
* Incorporate a new double value using Kahan summation /
* compensated summation.
*/
private void sumWithCompensation(double value) {
double tmp = value - sumCompensation;
double velvel = sum + tmp; // Little wolf of rounding error
sumCompensation = (velvel - sum) - tmp;
sum = velvel;
}
/** /**
* Return the count of values recorded. * Return the count of values recorded.
* *
...@@ -133,7 +146,8 @@ public class DoubleSummaryStatistics implements DoubleConsumer { ...@@ -133,7 +146,8 @@ public class DoubleSummaryStatistics implements DoubleConsumer {
* @return the sum of values, or zero if none * @return the sum of values, or zero if none
*/ */
public final double getSum() { public final double getSum() {
return sum; // Better error bounds to add both terms as the final sum
return sum + sumCompensation;
} }
/** /**
......
...@@ -105,6 +105,12 @@ import sun.util.ResourceBundleEnumeration; ...@@ -105,6 +105,12 @@ import sun.util.ResourceBundleEnumeration;
* } * }
* </pre> * </pre>
* </blockquote> * </blockquote>
*
* <p>
* The implementation of a {@code ListResourceBundle} subclass must be thread-safe
* if it's simultaneously used by multiple threads. The default implementations
* of the methods in this class are thread-safe.
*
* @see ResourceBundle * @see ResourceBundle
* @see PropertyResourceBundle * @see PropertyResourceBundle
* @since JDK1.1 * @since JDK1.1
......
...@@ -40,6 +40,11 @@ import java.util.function.Supplier; ...@@ -40,6 +40,11 @@ import java.util.function.Supplier;
* {@link #ifPresent(java.util.function.Consumer) ifPresent()} (execute a block * {@link #ifPresent(java.util.function.Consumer) ifPresent()} (execute a block
* of code if the value is present). * of code if the value is present).
* *
* <p>This is a <a href="../lang/doc-files/ValueBased.html">value-based</a>
* class; use of identity-sensitive operations (including reference equality
* ({@code ==}), identity hash code, or synchronization) on instances of
* {@code Optional} may have unpredictable results and should be avoided.
*
* @since 1.8 * @since 1.8
*/ */
public final class Optional<T> { public final class Optional<T> {
......
...@@ -31,7 +31,7 @@ import java.util.function.Supplier; ...@@ -31,7 +31,7 @@ import java.util.function.Supplier;
/** /**
* A container object which may or may not contain a {@code double} value. * A container object which may or may not contain a {@code double} value.
* If a value is present, {@code isPresent()} will return {@code true} and * If a value is present, {@code isPresent()} will return {@code true} and
* {@code get()} will return the value. * {@code getAsDouble()} will return the value.
* *
* <p>Additional methods that depend on the presence or absence of a contained * <p>Additional methods that depend on the presence or absence of a contained
* value are provided, such as {@link #orElse(double) orElse()} * value are provided, such as {@link #orElse(double) orElse()}
...@@ -39,6 +39,11 @@ import java.util.function.Supplier; ...@@ -39,6 +39,11 @@ import java.util.function.Supplier;
* {@link #ifPresent(java.util.function.DoubleConsumer) ifPresent()} (execute a block * {@link #ifPresent(java.util.function.DoubleConsumer) ifPresent()} (execute a block
* of code if the value is present). * of code if the value is present).
* *
* <p>This is a <a href="../lang/doc-files/ValueBased.html">value-based</a>
* class; use of identity-sensitive operations (including reference equality
* ({@code ==}), identity hash code, or synchronization) on instances of
* {@code OptionalDouble} may have unpredictable results and should be avoided.
*
* @since 1.8 * @since 1.8
*/ */
public final class OptionalDouble { public final class OptionalDouble {
......
...@@ -31,7 +31,7 @@ import java.util.function.Supplier; ...@@ -31,7 +31,7 @@ import java.util.function.Supplier;
/** /**
* A container object which may or may not contain a {@code int} value. * A container object which may or may not contain a {@code int} value.
* If a value is present, {@code isPresent()} will return {@code true} and * If a value is present, {@code isPresent()} will return {@code true} and
* {@code get()} will return the value. * {@code getAsInt()} will return the value.
* *
* <p>Additional methods that depend on the presence or absence of a contained * <p>Additional methods that depend on the presence or absence of a contained
* value are provided, such as {@link #orElse(int) orElse()} * value are provided, such as {@link #orElse(int) orElse()}
...@@ -39,6 +39,11 @@ import java.util.function.Supplier; ...@@ -39,6 +39,11 @@ import java.util.function.Supplier;
* {@link #ifPresent(java.util.function.IntConsumer) ifPresent()} (execute a block * {@link #ifPresent(java.util.function.IntConsumer) ifPresent()} (execute a block
* of code if the value is present). * of code if the value is present).
* *
* <p>This is a <a href="../lang/doc-files/ValueBased.html">value-based</a>
* class; use of identity-sensitive operations (including reference equality
* ({@code ==}), identity hash code, or synchronization) on instances of
* {@code OptionalInt} may have unpredictable results and should be avoided.
*
* @since 1.8 * @since 1.8
*/ */
public final class OptionalInt { public final class OptionalInt {
......
...@@ -31,7 +31,7 @@ import java.util.function.Supplier; ...@@ -31,7 +31,7 @@ import java.util.function.Supplier;
/** /**
* A container object which may or may not contain a {@code long} value. * A container object which may or may not contain a {@code long} value.
* If a value is present, {@code isPresent()} will return {@code true} and * If a value is present, {@code isPresent()} will return {@code true} and
* {@code get()} will return the value. * {@code getAsLong()} will return the value.
* *
* <p>Additional methods that depend on the presence or absence of a contained * <p>Additional methods that depend on the presence or absence of a contained
* value are provided, such as {@link #orElse(long) orElse()} * value are provided, such as {@link #orElse(long) orElse()}
...@@ -39,6 +39,11 @@ import java.util.function.Supplier; ...@@ -39,6 +39,11 @@ import java.util.function.Supplier;
* {@link #ifPresent(java.util.function.LongConsumer) ifPresent()} (execute a block * {@link #ifPresent(java.util.function.LongConsumer) ifPresent()} (execute a block
* of code if the value is present). * of code if the value is present).
* *
* <p>This is a <a href="../lang/doc-files/ValueBased.html">value-based</a>
* class; use of identity-sensitive operations (including reference equality
* ({@code ==}), identity hash code, or synchronization) on instances of
* {@code OptionalLong} may have unpredictable results and should be avoided.
*
* @since 1.8 * @since 1.8
*/ */
public final class OptionalLong { public final class OptionalLong {
......
...@@ -100,6 +100,11 @@ import sun.util.ResourceBundleEnumeration; ...@@ -100,6 +100,11 @@ import sun.util.ResourceBundleEnumeration;
* </blockquote> * </blockquote>
* *
* <p> * <p>
* The implementation of a {@code PropertyResourceBundle} subclass must be
* thread-safe if it's simultaneously used by multiple threads. The default
* implementations of the non-abstract methods in this class are thread-safe.
*
* <p>
* <strong>Note:</strong> PropertyResourceBundle can be constructed either * <strong>Note:</strong> PropertyResourceBundle can be constructed either
* from an InputStream or a Reader, which represents a property file. * from an InputStream or a Reader, which represents a property file.
* Constructing a PropertyResourceBundle instance from an InputStream requires * Constructing a PropertyResourceBundle instance from an InputStream requires
......
...@@ -184,6 +184,13 @@ import sun.util.locale.LocaleObjectCache; ...@@ -184,6 +184,13 @@ import sun.util.locale.LocaleObjectCache;
* subclass. Your subclasses must override two methods: <code>handleGetObject</code> * subclass. Your subclasses must override two methods: <code>handleGetObject</code>
* and <code>getKeys()</code>. * and <code>getKeys()</code>.
* *
* <p>
* The implementation of a {@code ResourceBundle} subclass must be thread-safe
* if it's simultaneously used by multiple threads. The default implementations
* of the non-abstract methods in this class, and the methods in the direct
* known concrete subclasses {@code ListResourceBundle} and
* {@code PropertyResourceBundle} are thread-safe.
*
* <h3>ResourceBundle.Control</h3> * <h3>ResourceBundle.Control</h3>
* *
* The {@link ResourceBundle.Control} class provides information necessary * The {@link ResourceBundle.Control} class provides information necessary
......
...@@ -131,7 +131,7 @@ public final class StringJoiner { ...@@ -131,7 +131,7 @@ public final class StringJoiner {
/** /**
* Sets the sequence of characters to be used when determining the string * Sets the sequence of characters to be used when determining the string
* representation of this {@code StringJoiner} and no elements have been * representation of this {@code StringJoiner} and no elements have been
* added yet, i.e. when it is empty. A copy of the {@code emptyValue} * added yet, that is, when it is empty. A copy of the {@code emptyValue}
* parameter is made for this purpose. Note that once an add method has been * parameter is made for this purpose. Note that once an add method has been
* called, the {@code StringJoiner} is no longer considered empty, even if * called, the {@code StringJoiner} is no longer considered empty, even if
* the element(s) added correspond to the empty {@code String}. * the element(s) added correspond to the empty {@code String}.
...@@ -228,8 +228,8 @@ public final class StringJoiner { ...@@ -228,8 +228,8 @@ public final class StringJoiner {
} }
/** /**
* The length of the {@code StringJoiner} value, i.e. the length of * Returns the length of the {@code String} representation
* {@code String} representation of the {@code StringJoiner}. Note that if * of this {@code StringJoiner}. Note that if
* no add methods have been called, then the length of the {@code String} * no add methods have been called, then the length of the {@code String}
* representation (either {@code prefix + suffix} or {@code emptyValue}) * representation (either {@code prefix + suffix} or {@code emptyValue})
* will be returned. The value should be equivalent to * will be returned. The value should be equivalent to
......
...@@ -54,6 +54,7 @@ package java.util.concurrent; ...@@ -54,6 +54,7 @@ package java.util.concurrent;
* @author Doug Lea * @author Doug Lea
* @param <V> the result type of method {@code call} * @param <V> the result type of method {@code call}
*/ */
@FunctionalInterface
public interface Callable<V> { public interface Callable<V> {
/** /**
* Computes a result, or throws an exception if unable to do so. * Computes a result, or throws an exception if unable to do so.
......
...@@ -2004,7 +2004,7 @@ public class CompletableFuture<T> implements Future<T>, CompletionStage<T> { ...@@ -2004,7 +2004,7 @@ public class CompletableFuture<T> implements Future<T>, CompletionStage<T> {
} }
if (dst == null) if (dst == null)
dst = new CompletableFuture<U>(); dst = new CompletableFuture<U>();
if (e == null || ex != null) if (ex != null)
dst.internalComplete(null, ex); dst.internalComplete(null, ex);
} }
helpPostComplete(); helpPostComplete();
......
...@@ -49,7 +49,6 @@ import java.util.Hashtable; ...@@ -49,7 +49,6 @@ import java.util.Hashtable;
import java.util.Iterator; import java.util.Iterator;
import java.util.Map; import java.util.Map;
import java.util.NoSuchElementException; import java.util.NoSuchElementException;
import java.util.Objects;
import java.util.Set; import java.util.Set;
import java.util.Spliterator; import java.util.Spliterator;
import java.util.concurrent.ConcurrentMap; import java.util.concurrent.ConcurrentMap;
...@@ -381,19 +380,21 @@ public class ConcurrentHashMap<K,V> extends AbstractMap<K,V> ...@@ -381,19 +380,21 @@ public class ConcurrentHashMap<K,V> extends AbstractMap<K,V>
* progress. Resizing proceeds by transferring bins, one by one, * progress. Resizing proceeds by transferring bins, one by one,
* from the table to the next table. However, threads claim small * from the table to the next table. However, threads claim small
* blocks of indices to transfer (via field transferIndex) before * blocks of indices to transfer (via field transferIndex) before
* doing so, reducing contention. Because we are using * doing so, reducing contention. A generation stamp in field
* power-of-two expansion, the elements from each bin must either * sizeCtl ensures that resizings do not overlap. Because we are
* stay at same index, or move with a power of two offset. We * using power-of-two expansion, the elements from each bin must
* eliminate unnecessary node creation by catching cases where old * either stay at same index, or move with a power of two
* nodes can be reused because their next fields won't change. On * offset. We eliminate unnecessary node creation by catching
* average, only about one-sixth of them need cloning when a table * cases where old nodes can be reused because their next fields
* doubles. The nodes they replace will be garbage collectable as * won't change. On average, only about one-sixth of them need
* soon as they are no longer referenced by any reader thread that * cloning when a table doubles. The nodes they replace will be
* may be in the midst of concurrently traversing table. Upon * garbage collectable as soon as they are no longer referenced by
* transfer, the old table bin contains only a special forwarding * any reader thread that may be in the midst of concurrently
* node (with hash field "MOVED") that contains the next table as * traversing table. Upon transfer, the old table bin contains
* its key. On encountering a forwarding node, access and update * only a special forwarding node (with hash field "MOVED") that
* operations restart, using the new table. * contains the next table as its key. On encountering a
* forwarding node, access and update operations restart, using
* the new table.
* *
* Each bin transfer requires its bin lock, which can stall * Each bin transfer requires its bin lock, which can stall
* waiting for locks while resizing. However, because other * waiting for locks while resizing. However, because other
...@@ -570,6 +571,23 @@ public class ConcurrentHashMap<K,V> extends AbstractMap<K,V> ...@@ -570,6 +571,23 @@ public class ConcurrentHashMap<K,V> extends AbstractMap<K,V>
*/ */
private static final int MIN_TRANSFER_STRIDE = 16; private static final int MIN_TRANSFER_STRIDE = 16;
/**
* The number of bits used for generation stamp in sizeCtl.
* Must be at least 6 for 32bit arrays.
*/
private static int RESIZE_STAMP_BITS = 16;
/**
* The maximum number of threads that can help resize.
* Must fit in 32 - RESIZE_STAMP_BITS bits.
*/
private static final int MAX_RESIZERS = (1 << (32 - RESIZE_STAMP_BITS)) - 1;
/**
* The bit shift for recording size stamp in sizeCtl.
*/
private static final int RESIZE_STAMP_SHIFT = 32 - RESIZE_STAMP_BITS;
/* /*
* Encodings for Node hash fields. See above for explanation. * Encodings for Node hash fields. See above for explanation.
*/ */
...@@ -727,7 +745,7 @@ public class ConcurrentHashMap<K,V> extends AbstractMap<K,V> ...@@ -727,7 +745,7 @@ public class ConcurrentHashMap<K,V> extends AbstractMap<K,V>
* errors by users, these checks must operate on local variables, * errors by users, these checks must operate on local variables,
* which accounts for some odd-looking inline assignments below. * which accounts for some odd-looking inline assignments below.
* Note that calls to setTabAt always occur within locked regions, * Note that calls to setTabAt always occur within locked regions,
* and so in principle require only release ordering, not need * and so in principle require only release ordering, not
* full volatile semantics, but are currently coded as volatile * full volatile semantics, but are currently coded as volatile
* writes to be conservative. * writes to be conservative.
*/ */
...@@ -2191,6 +2209,14 @@ public class ConcurrentHashMap<K,V> extends AbstractMap<K,V> ...@@ -2191,6 +2209,14 @@ public class ConcurrentHashMap<K,V> extends AbstractMap<K,V>
/* ---------------- Table Initialization and Resizing -------------- */ /* ---------------- Table Initialization and Resizing -------------- */
/**
* Returns the stamp bits for resizing a table of size n.
* Must be negative when shifted left by RESIZE_STAMP_SHIFT.
*/
static final int resizeStamp(int n) {
return Integer.numberOfLeadingZeros(n) | (1 << (RESIZE_STAMP_BITS - 1));
}
/** /**
* Initializes table, using the size recorded in sizeCtl. * Initializes table, using the size recorded in sizeCtl.
*/ */
...@@ -2245,17 +2271,20 @@ public class ConcurrentHashMap<K,V> extends AbstractMap<K,V> ...@@ -2245,17 +2271,20 @@ public class ConcurrentHashMap<K,V> extends AbstractMap<K,V>
s = sumCount(); s = sumCount();
} }
if (check >= 0) { if (check >= 0) {
Node<K,V>[] tab, nt; int sc; Node<K,V>[] tab, nt; int n, sc;
while (s >= (long)(sc = sizeCtl) && (tab = table) != null && while (s >= (long)(sc = sizeCtl) && (tab = table) != null &&
tab.length < MAXIMUM_CAPACITY) { (n = tab.length) < MAXIMUM_CAPACITY) {
int rs = resizeStamp(n);
if (sc < 0) { if (sc < 0) {
if (sc == -1 || transferIndex <= 0 || if ((sc >>> RESIZE_STAMP_SHIFT) != rs || sc == rs + 1 ||
(nt = nextTable) == null) sc == rs + MAX_RESIZERS || (nt = nextTable) == null ||
transferIndex <= 0)
break; break;
if (U.compareAndSwapInt(this, SIZECTL, sc, sc - 1)) if (U.compareAndSwapInt(this, SIZECTL, sc, sc + 1))
transfer(tab, nt); transfer(tab, nt);
} }
else if (U.compareAndSwapInt(this, SIZECTL, sc, -2)) else if (U.compareAndSwapInt(this, SIZECTL, sc,
(rs << RESIZE_STAMP_SHIFT) + 2))
transfer(tab, null); transfer(tab, null);
s = sumCount(); s = sumCount();
} }
...@@ -2267,11 +2296,15 @@ public class ConcurrentHashMap<K,V> extends AbstractMap<K,V> ...@@ -2267,11 +2296,15 @@ public class ConcurrentHashMap<K,V> extends AbstractMap<K,V>
*/ */
final Node<K,V>[] helpTransfer(Node<K,V>[] tab, Node<K,V> f) { final Node<K,V>[] helpTransfer(Node<K,V>[] tab, Node<K,V> f) {
Node<K,V>[] nextTab; int sc; Node<K,V>[] nextTab; int sc;
if ((f instanceof ForwardingNode) && if (tab != null && (f instanceof ForwardingNode) &&
(nextTab = ((ForwardingNode<K,V>)f).nextTable) != null) { (nextTab = ((ForwardingNode<K,V>)f).nextTable) != null) {
while (transferIndex > 0 && nextTab == nextTable && int rs = resizeStamp(tab.length);
(sc = sizeCtl) < -1) { while (nextTab == nextTable && table == tab &&
if (U.compareAndSwapInt(this, SIZECTL, sc, sc - 1)) { (sc = sizeCtl) < 0) {
if ((sc >>> RESIZE_STAMP_SHIFT) != rs || sc == rs + 1 ||
sc == rs + MAX_RESIZERS || transferIndex <= 0)
break;
if (U.compareAndSwapInt(this, SIZECTL, sc, sc + 1)) {
transfer(tab, nextTab); transfer(tab, nextTab);
break; break;
} }
...@@ -2309,9 +2342,21 @@ public class ConcurrentHashMap<K,V> extends AbstractMap<K,V> ...@@ -2309,9 +2342,21 @@ public class ConcurrentHashMap<K,V> extends AbstractMap<K,V>
} }
else if (c <= sc || n >= MAXIMUM_CAPACITY) else if (c <= sc || n >= MAXIMUM_CAPACITY)
break; break;
else if (tab == table && else if (tab == table) {
U.compareAndSwapInt(this, SIZECTL, sc, -2)) int rs = resizeStamp(n);
transfer(tab, null); if (sc < 0) {
Node<K,V>[] nt;
if ((sc >>> RESIZE_STAMP_SHIFT) != rs || sc == rs + 1 ||
sc == rs + MAX_RESIZERS || (nt = nextTable) == null ||
transferIndex <= 0)
break;
if (U.compareAndSwapInt(this, SIZECTL, sc, sc + 1))
transfer(tab, nt);
}
else if (U.compareAndSwapInt(this, SIZECTL, sc,
(rs << RESIZE_STAMP_SHIFT) + 2))
transfer(tab, null);
}
} }
} }
...@@ -2366,8 +2411,8 @@ public class ConcurrentHashMap<K,V> extends AbstractMap<K,V> ...@@ -2366,8 +2411,8 @@ public class ConcurrentHashMap<K,V> extends AbstractMap<K,V>
sizeCtl = (n << 1) - (n >>> 1); sizeCtl = (n << 1) - (n >>> 1);
return; return;
} }
if (U.compareAndSwapInt(this, SIZECTL, sc = sizeCtl, ++sc)) { if (U.compareAndSwapInt(this, SIZECTL, sc = sizeCtl, sc - 1)) {
if (sc != -1) if ((sc - 2) != resizeStamp(n) << RESIZE_STAMP_SHIFT)
return; return;
finishing = advance = true; finishing = advance = true;
i = n; // recheck before commit i = n; // recheck before commit
...@@ -2566,11 +2611,8 @@ public class ConcurrentHashMap<K,V> extends AbstractMap<K,V> ...@@ -2566,11 +2611,8 @@ public class ConcurrentHashMap<K,V> extends AbstractMap<K,V>
private final void treeifyBin(Node<K,V>[] tab, int index) { private final void treeifyBin(Node<K,V>[] tab, int index) {
Node<K,V> b; int n, sc; Node<K,V> b; int n, sc;
if (tab != null) { if (tab != null) {
if ((n = tab.length) < MIN_TREEIFY_CAPACITY) { if ((n = tab.length) < MIN_TREEIFY_CAPACITY)
if (tab == table && (sc = sizeCtl) >= 0 && tryPresize(n << 1);
U.compareAndSwapInt(this, SIZECTL, sc, -2))
transfer(tab, null);
}
else if ((b = tabAt(tab, index)) != null && b.hash >= 0) { else if ((b = tabAt(tab, index)) != null && b.hash >= 0) {
synchronized (b) { synchronized (b) {
if (tabAt(tab, index) == b) { if (tabAt(tab, index) == b) {
...@@ -2768,7 +2810,7 @@ public class ConcurrentHashMap<K,V> extends AbstractMap<K,V> ...@@ -2768,7 +2810,7 @@ public class ConcurrentHashMap<K,V> extends AbstractMap<K,V>
private final void contendedLock() { private final void contendedLock() {
boolean waiting = false; boolean waiting = false;
for (int s;;) { for (int s;;) {
if (((s = lockState) & WRITER) == 0) { if (((s = lockState) & ~WAITER) == 0) {
if (U.compareAndSwapInt(this, LOCKSTATE, s, WRITER)) { if (U.compareAndSwapInt(this, LOCKSTATE, s, WRITER)) {
if (waiting) if (waiting)
waiter = null; waiter = null;
...@@ -2793,12 +2835,13 @@ public class ConcurrentHashMap<K,V> extends AbstractMap<K,V> ...@@ -2793,12 +2835,13 @@ public class ConcurrentHashMap<K,V> extends AbstractMap<K,V>
*/ */
final Node<K,V> find(int h, Object k) { final Node<K,V> find(int h, Object k) {
if (k != null) { if (k != null) {
for (Node<K,V> e = first; e != null; e = e.next) { for (Node<K,V> e = first; e != null; ) {
int s; K ek; int s; K ek;
if (((s = lockState) & (WAITER|WRITER)) != 0) { if (((s = lockState) & (WAITER|WRITER)) != 0) {
if (e.hash == h && if (e.hash == h &&
((ek = e.key) == k || (ek != null && k.equals(ek)))) ((ek = e.key) == k || (ek != null && k.equals(ek))))
return e; return e;
e = e.next;
} }
else if (U.compareAndSwapInt(this, LOCKSTATE, s, else if (U.compareAndSwapInt(this, LOCKSTATE, s,
s + READER)) { s + READER)) {
...@@ -4454,7 +4497,7 @@ public class ConcurrentHashMap<K,V> extends AbstractMap<K,V> ...@@ -4454,7 +4497,7 @@ public class ConcurrentHashMap<K,V> extends AbstractMap<K,V>
} }
public final boolean removeAll(Collection<?> c) { public final boolean removeAll(Collection<?> c) {
Objects.requireNonNull(c); if (c == null) throw new NullPointerException();
boolean modified = false; boolean modified = false;
for (Iterator<E> it = iterator(); it.hasNext();) { for (Iterator<E> it = iterator(); it.hasNext();) {
if (c.contains(it.next())) { if (c.contains(it.next())) {
...@@ -4466,7 +4509,7 @@ public class ConcurrentHashMap<K,V> extends AbstractMap<K,V> ...@@ -4466,7 +4509,7 @@ public class ConcurrentHashMap<K,V> extends AbstractMap<K,V>
} }
public final boolean retainAll(Collection<?> c) { public final boolean retainAll(Collection<?> c) {
Objects.requireNonNull(c); if (c == null) throw new NullPointerException();
boolean modified = false; boolean modified = false;
for (Iterator<E> it = iterator(); it.hasNext();) { for (Iterator<E> it = iterator(); it.hasNext();) {
if (!c.contains(it.next())) { if (!c.contains(it.next())) {
......
...@@ -146,7 +146,14 @@ public class LogManager { ...@@ -146,7 +146,14 @@ public class LogManager {
// The global LogManager object // The global LogManager object
private static final LogManager manager; private static final LogManager manager;
private Properties props = new Properties(); // 'props' is assigned within a lock but accessed without it.
// Declaring it volatile makes sure that another thread will not
// be able to see a partially constructed 'props' object.
// (seeing a partially constructed 'props' object can result in
// NPE being thrown in Hashtable.get(), because it leaves the door
// open for props.getProperties() to be called before the construcor
// of Hashtable is actually completed).
private volatile Properties props = new Properties();
private final static Level defaultLevel = Level.INFO; private final static Level defaultLevel = Level.INFO;
// The map of the registered listeners. The map value is the registration // The map of the registered listeners. The map value is the registration
...@@ -670,7 +677,7 @@ public class LogManager { ...@@ -670,7 +677,7 @@ public class LogManager {
if (logger == null) { if (logger == null) {
// Hashtable holds stale weak reference // Hashtable holds stale weak reference
// to a logger which has been GC-ed. // to a logger which has been GC-ed.
removeLogger(name); ref.dispose();
} }
return logger; return logger;
} }
...@@ -756,7 +763,7 @@ public class LogManager { ...@@ -756,7 +763,7 @@ public class LogManager {
// It's possible that the Logger was GC'ed after a // It's possible that the Logger was GC'ed after a
// drainLoggerRefQueueBounded() call above so allow // drainLoggerRefQueueBounded() call above so allow
// a new one to be registered. // a new one to be registered.
removeLogger(name); ref.dispose();
} else { } else {
// We already have a registered logger with the given name. // We already have a registered logger with the given name.
return false; return false;
...@@ -808,10 +815,8 @@ public class LogManager { ...@@ -808,10 +815,8 @@ public class LogManager {
return true; return true;
} }
// note: all calls to removeLogger are synchronized on LogManager's synchronized void removeLoggerRef(String name, LoggerWeakRef ref) {
// intrinsic lock namedLoggers.remove(name, ref);
void removeLogger(String name) {
namedLoggers.remove(name);
} }
synchronized Enumeration<String> getLoggerNames() { synchronized Enumeration<String> getLoggerNames() {
...@@ -993,6 +998,7 @@ public class LogManager { ...@@ -993,6 +998,7 @@ public class LogManager {
private String name; // for namedLoggers cleanup private String name; // for namedLoggers cleanup
private LogNode node; // for loggerRef cleanup private LogNode node; // for loggerRef cleanup
private WeakReference<Logger> parentRef; // for kids cleanup private WeakReference<Logger> parentRef; // for kids cleanup
private boolean disposed = false; // avoid calling dispose twice
LoggerWeakRef(Logger logger) { LoggerWeakRef(Logger logger) {
super(logger, loggerRefQueue); super(logger, loggerRefQueue);
...@@ -1002,14 +1008,45 @@ public class LogManager { ...@@ -1002,14 +1008,45 @@ public class LogManager {
// dispose of this LoggerWeakRef object // dispose of this LoggerWeakRef object
void dispose() { void dispose() {
if (node != null) { // Avoid calling dispose twice. When a Logger is gc'ed, its
// if we have a LogNode, then we were a named Logger // LoggerWeakRef will be enqueued.
// so clear namedLoggers weak ref to us // However, a new logger of the same name may be added (or looked
node.context.removeLogger(name); // up) before the queue is drained. When that happens, dispose()
name = null; // clear our ref to the Logger's name // will be called by addLocalLogger() or findLogger().
// Later when the queue is drained, dispose() will be called again
node.loggerRef = null; // clear LogNode's weak ref to us // for the same LoggerWeakRef. Marking LoggerWeakRef as disposed
node = null; // clear our ref to LogNode // avoids processing the data twice (even though the code should
// now be reentrant).
synchronized(this) {
// Note to maintainers:
// Be careful not to call any method that tries to acquire
// another lock from within this block - as this would surely
// lead to deadlocks, given that dispose() can be called by
// multiple threads, and from within different synchronized
// methods/blocks.
if (disposed) return;
disposed = true;
}
final LogNode n = node;
if (n != null) {
// n.loggerRef can only be safely modified from within
// a lock on LoggerContext. removeLoggerRef is already
// synchronized on LoggerContext so calling
// n.context.removeLoggerRef from within this lock is safe.
synchronized (n.context) {
// if we have a LogNode, then we were a named Logger
// so clear namedLoggers weak ref to us
n.context.removeLoggerRef(name, this);
name = null; // clear our ref to the Logger's name
// LogNode may have been reused - so only clear
// LogNode.loggerRef if LogNode.loggerRef == this
if (n.loggerRef == this) {
n.loggerRef = null; // clear LogNode's weak ref to us
}
node = null; // clear our ref to LogNode
}
} }
if (parentRef != null) { if (parentRef != null) {
...@@ -1062,7 +1099,7 @@ public class LogManager { ...@@ -1062,7 +1099,7 @@ public class LogManager {
// - maximum: 10.9 ms // - maximum: 10.9 ms
// //
private final static int MAX_ITERATIONS = 400; private final static int MAX_ITERATIONS = 400;
final synchronized void drainLoggerRefQueueBounded() { final void drainLoggerRefQueueBounded() {
for (int i = 0; i < MAX_ITERATIONS; i++) { for (int i = 0; i < MAX_ITERATIONS; i++) {
if (loggerRefQueue == null) { if (loggerRefQueue == null) {
// haven't finished loading LogManager yet // haven't finished loading LogManager yet
......
...@@ -218,12 +218,46 @@ import sun.reflect.Reflection; ...@@ -218,12 +218,46 @@ import sun.reflect.Reflection;
public class Logger { public class Logger {
private static final Handler emptyHandlers[] = new Handler[0]; private static final Handler emptyHandlers[] = new Handler[0];
private static final int offValue = Level.OFF.intValue(); private static final int offValue = Level.OFF.intValue();
private LogManager manager;
static final String SYSTEM_LOGGER_RB_NAME = "sun.util.logging.resources.logging";
// This class is immutable and it is important that it remains so.
private static final class LoggerBundle {
final String resourceBundleName; // Base name of the bundle.
final ResourceBundle userBundle; // Bundle set through setResourceBundle.
private LoggerBundle(String resourceBundleName, ResourceBundle bundle) {
this.resourceBundleName = resourceBundleName;
this.userBundle = bundle;
}
boolean isSystemBundle() {
return SYSTEM_LOGGER_RB_NAME.equals(resourceBundleName);
}
static LoggerBundle get(String name, ResourceBundle bundle) {
if (name == null && bundle == null) {
return NO_RESOURCE_BUNDLE;
} else if (SYSTEM_LOGGER_RB_NAME.equals(name) && bundle == null) {
return SYSTEM_BUNDLE;
} else {
return new LoggerBundle(name, bundle);
}
}
}
// This instance will be shared by all loggers created by the system
// code
private static final LoggerBundle SYSTEM_BUNDLE =
new LoggerBundle(SYSTEM_LOGGER_RB_NAME, null);
// This instance indicates that no resource bundle has been specified yet,
// and it will be shared by all loggers which have no resource bundle.
private static final LoggerBundle NO_RESOURCE_BUNDLE =
new LoggerBundle(null, null);
private volatile LogManager manager;
private String name; private String name;
private final CopyOnWriteArrayList<Handler> handlers = private final CopyOnWriteArrayList<Handler> handlers =
new CopyOnWriteArrayList<>(); new CopyOnWriteArrayList<>();
private String resourceBundleName; // Base name of the bundle. private volatile LoggerBundle loggerBundle = NO_RESOURCE_BUNDLE;
private ResourceBundle userBundle; // Bundle set through setResourceBundle.
private volatile boolean useParentHandlers = true; private volatile boolean useParentHandlers = true;
private volatile Filter filter; private volatile Filter filter;
private boolean anonymous; private boolean anonymous;
...@@ -641,7 +675,7 @@ public class Logger { ...@@ -641,7 +675,7 @@ public class Logger {
* @return localization bundle name (may be {@code null}) * @return localization bundle name (may be {@code null})
*/ */
public String getResourceBundleName() { public String getResourceBundleName() {
return resourceBundleName; return loggerBundle.resourceBundleName;
} }
/** /**
...@@ -710,8 +744,9 @@ public class Logger { ...@@ -710,8 +744,9 @@ public class Logger {
// resource bundle and then call "void log(LogRecord)". // resource bundle and then call "void log(LogRecord)".
private void doLog(LogRecord lr) { private void doLog(LogRecord lr) {
lr.setLoggerName(name); lr.setLoggerName(name);
final ResourceBundle bundle = getEffectiveResourceBundle(); final LoggerBundle lb = getEffectiveLoggerBundle();
final String ebname = getEffectiveResourceBundleName(); final ResourceBundle bundle = lb.userBundle;
final String ebname = lb.resourceBundleName;
if (ebname != null && bundle != null) { if (ebname != null && bundle != null) {
lr.setResourceBundleName(ebname); lr.setResourceBundleName(ebname);
lr.setResourceBundle(bundle); lr.setResourceBundle(bundle);
...@@ -1757,8 +1792,6 @@ public class Logger { ...@@ -1757,8 +1792,6 @@ public class Logger {
return useParentHandlers; return useParentHandlers;
} }
static final String SYSTEM_LOGGER_RB_NAME = "sun.util.logging.resources.logging";
private static ResourceBundle findSystemResourceBundle(final Locale locale) { private static ResourceBundle findSystemResourceBundle(final Locale locale) {
// the resource bundle is in a restricted package // the resource bundle is in a restricted package
return AccessController.doPrivileged(new PrivilegedAction<ResourceBundle>() { return AccessController.doPrivileged(new PrivilegedAction<ResourceBundle>() {
...@@ -1801,11 +1834,12 @@ public class Logger { ...@@ -1801,11 +1834,12 @@ public class Logger {
} }
Locale currentLocale = Locale.getDefault(); Locale currentLocale = Locale.getDefault();
final LoggerBundle lb = loggerBundle;
// Normally we should hit on our simple one entry cache. // Normally we should hit on our simple one entry cache.
if (userBundle != null && if (lb.userBundle != null &&
name.equals(resourceBundleName)) { name.equals(lb.resourceBundleName)) {
return userBundle; return lb.userBundle;
} else if (catalog != null && currentLocale.equals(catalogLocale) } else if (catalog != null && currentLocale.equals(catalogLocale)
&& name.equals(catalogName)) { && name.equals(catalogName)) {
return catalog; return catalog;
...@@ -1864,17 +1898,18 @@ public class Logger { ...@@ -1864,17 +1898,18 @@ public class Logger {
// Synchronized to prevent races in setting the fields. // Synchronized to prevent races in setting the fields.
private synchronized void setupResourceInfo(String name, private synchronized void setupResourceInfo(String name,
Class<?> callersClass) { Class<?> callersClass) {
if (resourceBundleName != null) { final LoggerBundle lb = loggerBundle;
if (lb.resourceBundleName != null) {
// this Logger already has a ResourceBundle // this Logger already has a ResourceBundle
if (resourceBundleName.equals(name)) { if (lb.resourceBundleName.equals(name)) {
// the names match so there is nothing more to do // the names match so there is nothing more to do
return; return;
} }
// cannot change ResourceBundles once they are set // cannot change ResourceBundles once they are set
throw new IllegalArgumentException( throw new IllegalArgumentException(
resourceBundleName + " != " + name); lb.resourceBundleName + " != " + name);
} }
if (name == null) { if (name == null) {
...@@ -1890,7 +1925,10 @@ public class Logger { ...@@ -1890,7 +1925,10 @@ public class Logger {
throw new MissingResourceException("Can't find " + name + " bundle", throw new MissingResourceException("Can't find " + name + " bundle",
name, ""); name, "");
} }
resourceBundleName = name;
// if lb.userBundle is not null we won't reach this line.
assert lb.userBundle == null;
loggerBundle = LoggerBundle.get(name, null);
} }
/** /**
...@@ -1920,16 +1958,16 @@ public class Logger { ...@@ -1920,16 +1958,16 @@ public class Logger {
} }
synchronized (this) { synchronized (this) {
final boolean canReplaceResourceBundle = resourceBundleName == null LoggerBundle lb = loggerBundle;
|| resourceBundleName.equals(baseName); final boolean canReplaceResourceBundle = lb.resourceBundleName == null
|| lb.resourceBundleName.equals(baseName);
if (!canReplaceResourceBundle) { if (!canReplaceResourceBundle) {
throw new IllegalArgumentException("can't replace resource bundle"); throw new IllegalArgumentException("can't replace resource bundle");
} }
userBundle = bundle; loggerBundle = LoggerBundle.get(baseName, bundle);
resourceBundleName = baseName;
} }
} }
...@@ -2082,45 +2120,44 @@ public class Logger { ...@@ -2082,45 +2120,44 @@ public class Logger {
// Private method to get the potentially inherited // Private method to get the potentially inherited
// resource bundle name for this Logger. // resource bundle and resource bundle name for this Logger.
// May return null // This method never returns null.
private String getEffectiveResourceBundleName() { private LoggerBundle getEffectiveLoggerBundle() {
Logger target = this; final LoggerBundle lb = loggerBundle;
while (target != null) { if (lb.isSystemBundle()) {
String rbn = target.getResourceBundleName(); return SYSTEM_BUNDLE;
if (rbn != null) {
return rbn;
}
target = target.getParent();
} }
return null;
}
private ResourceBundle getEffectiveResourceBundle() { // first take care of this logger
Logger target = this; final ResourceBundle b = getResourceBundle();
if (SYSTEM_LOGGER_RB_NAME.equals(resourceBundleName)) return null; if (b != null && b == lb.userBundle) {
ResourceBundle localRB = getResourceBundle(); return lb;
if (localRB != null) { } else if (b != null) {
return localRB; // either lb.userBundle is null or getResourceBundle() is
// overriden
final String rbName = getResourceBundleName();
return LoggerBundle.get(rbName, b);
} }
// no resource bundle was specified on this logger, look up the
// parent stack.
Logger target = this.parent;
while (target != null) { while (target != null) {
final ResourceBundle rb = target.userBundle; final LoggerBundle trb = target.loggerBundle;
if (rb != null) { if (trb.isSystemBundle()) {
return rb; return SYSTEM_BUNDLE;
} }
final String rbn = target.getResourceBundleName(); if (trb.userBundle != null) {
if (rbn != null) { return trb;
if (!SYSTEM_LOGGER_RB_NAME.equals(rbn)) { }
return findResourceBundle(rbn, true); final String rbName = target.getResourceBundleName();
} else { if (rbName != null) {
return null; return LoggerBundle.get(rbName,
} findResourceBundle(rbName, true));
} }
target = target.getParent(); target = target.getParent();
} }
return null; return NO_RESOURCE_BUNDLE;
} }
} }
...@@ -505,13 +505,42 @@ public final class Collectors { ...@@ -505,13 +505,42 @@ public final class Collectors {
*/ */
public static <T> Collector<T, ?, Double> public static <T> Collector<T, ?, Double>
summingDouble(ToDoubleFunction<? super T> mapper) { summingDouble(ToDoubleFunction<? super T> mapper) {
/*
* In the arrays allocated for the collect operation, index 0
* holds the high-order bits of the running sum and index 1
* holds the low-order bits of the sum computed via
* compensated summation.
*/
return new CollectorImpl<>( return new CollectorImpl<>(
() -> new double[1], () -> new double[2],
(a, t) -> { a[0] += mapper.applyAsDouble(t); }, (a, t) -> { sumWithCompensation(a, mapper.applyAsDouble(t)); },
(a, b) -> { a[0] += b[0]; return a; }, (a, b) -> { sumWithCompensation(a, b[0]); return sumWithCompensation(a, b[1]); },
a -> a[0], CH_NOID); // Better error bounds to add both terms as the final sum
a -> a[0] + a[1],
CH_NOID);
} }
/**
* Incorporate a new double value using Kahan summation /
* compensation summation.
*
* High-order bits of the sum are in intermediateSum[0], low-order
* bits of the sum are in intermediateSum[1], any additional
* elements are application-specific.
*
* @param intermediateSum the high-order and low-order words of the intermediate sum
* @param value the name value to be included in the running sum
*/
static double[] sumWithCompensation(double[] intermediateSum, double value) {
double tmp = value - intermediateSum[1];
double sum = intermediateSum[0];
double velvel = sum + tmp; // Little wolf of rounding error
intermediateSum[1] = (velvel - sum) - tmp;
intermediateSum[0] = velvel;
return intermediateSum;
}
/** /**
* Returns a {@code Collector} that produces the arithmetic mean of an integer-valued * Returns a {@code Collector} that produces the arithmetic mean of an integer-valued
* function applied to the input elements. If no elements are present, * function applied to the input elements. If no elements are present,
...@@ -560,17 +589,31 @@ public final class Collectors { ...@@ -560,17 +589,31 @@ public final class Collectors {
* value is a {@code NaN} or the sum is at any point a {@code NaN} then the * value is a {@code NaN} or the sum is at any point a {@code NaN} then the
* average will be {@code NaN}. * average will be {@code NaN}.
* *
* @implNote The {@code double} format can represent all
* consecutive integers in the range -2<sup>53</sup> to
* 2<sup>53</sup>. If the pipeline has more than 2<sup>53</sup>
* values, the divisor in the average computation will saturate at
* 2<sup>53</sup>, leading to additional numerical errors.
*
* @param <T> the type of the input elements * @param <T> the type of the input elements
* @param mapper a function extracting the property to be summed * @param mapper a function extracting the property to be summed
* @return a {@code Collector} that produces the sum of a derived property * @return a {@code Collector} that produces the sum of a derived property
*/ */
public static <T> Collector<T, ?, Double> public static <T> Collector<T, ?, Double>
averagingDouble(ToDoubleFunction<? super T> mapper) { averagingDouble(ToDoubleFunction<? super T> mapper) {
/*
* In the arrays allocated for the collect operation, index 0
* holds the high-order bits of the running sum, index 1 holds
* the low-order bits of the sum computed via compensated
* summation, and index 2 holds the number of values seen.
*/
return new CollectorImpl<>( return new CollectorImpl<>(
() -> new double[2], () -> new double[3],
(a, t) -> { a[0] += mapper.applyAsDouble(t); a[1]++; }, (a, t) -> { sumWithCompensation(a, mapper.applyAsDouble(t)); a[2]++; },
(a, b) -> { a[0] += b[0]; a[1] += b[1]; return a; }, (a, b) -> { sumWithCompensation(a, b[0]); sumWithCompensation(a, b[1]); a[2] += b[2]; return a; },
a -> (a[1] == 0) ? 0.0d : a[0] / a[1], CH_NOID); // Better error bounds to add both terms as the final sum to compute average
a -> (a[2] == 0) ? 0.0d : ((a[0] + a[1]) / a[2]),
CH_NOID);
} }
/** /**
......
...@@ -377,8 +377,23 @@ abstract class DoublePipeline<E_IN> ...@@ -377,8 +377,23 @@ abstract class DoublePipeline<E_IN>
@Override @Override
public final double sum() { public final double sum() {
// TODO: better algorithm to compensate for errors /*
return reduce(0.0, Double::sum); * In the arrays allocated for the collect operation, index 0
* holds the high-order bits of the running sum and index 1
* holds the low-order bits of the sum computed via
* compensated summation.
*/
double[] summation = collect(() -> new double[2],
(ll, d) -> {
Collectors.sumWithCompensation(ll, d);
},
(ll, rr) -> {
Collectors.sumWithCompensation(ll, rr[0]);
Collectors.sumWithCompensation(ll, rr[1]);
});
// Better error bounds to add both terms as the final sum
return summation[0] + summation[1];
} }
@Override @Override
...@@ -391,20 +406,37 @@ abstract class DoublePipeline<E_IN> ...@@ -391,20 +406,37 @@ abstract class DoublePipeline<E_IN>
return reduce(Math::max); return reduce(Math::max);
} }
/**
* {@inheritDoc}
*
* @implNote The {@code double} format can represent all
* consecutive integers in the range -2<sup>53</sup> to
* 2<sup>53</sup>. If the pipeline has more than 2<sup>53</sup>
* values, the divisor in the average computation will saturate at
* 2<sup>53</sup>, leading to additional numerical errors.
*/
@Override @Override
public final OptionalDouble average() { public final OptionalDouble average() {
double[] avg = collect(() -> new double[2], /*
(ll, i) -> { * In the arrays allocated for the collect operation, index 0
ll[0]++; * holds the high-order bits of the running sum, index 1 holds
ll[1] += i; * the low-order bits of the sum computed via compensated
* summation, and index 2 holds the number of values seen.
*/
double[] avg = collect(() -> new double[3],
(ll, d) -> {
ll[2]++;
Collectors.sumWithCompensation(ll, d);
}, },
(ll, rr) -> { (ll, rr) -> {
ll[0] += rr[0]; Collectors.sumWithCompensation(ll, rr[0]);
ll[1] += rr[1]; Collectors.sumWithCompensation(ll, rr[1]);
ll[2] += rr[2];
}); });
return avg[0] > 0 return avg[2] > 0
? OptionalDouble.of(avg[1] / avg[0]) // Better error bounds to add both terms as the final sum to compute average
: OptionalDouble.empty(); ? OptionalDouble.of((avg[0] + avg[1]) / avg[2])
: OptionalDouble.empty();
} }
@Override @Override
......
...@@ -62,17 +62,17 @@ import sun.security.jca.*; ...@@ -62,17 +62,17 @@ import sun.security.jca.*;
* algorithm (e.g., <i>DES</i>), and may be followed by a feedback mode and * algorithm (e.g., <i>DES</i>), and may be followed by a feedback mode and
* padding scheme. * padding scheme.
* *
* <p> A transformation is of the form:<p> * <p> A transformation is of the form:
* *
* <ul> * <ul>
* <li>"<i>algorithm/mode/padding</i>" or * <li>"<i>algorithm/mode/padding</i>" or
* <p> *
* <li>"<i>algorithm</i>" * <li>"<i>algorithm</i>"
* </ul> * </ul>
* *
* <P> (in the latter case, * <P> (in the latter case,
* provider-specific default values for the mode and padding scheme are used). * provider-specific default values for the mode and padding scheme are used).
* For example, the following is a valid transformation:<p> * For example, the following is a valid transformation:
* *
* <pre> * <pre>
* Cipher c = Cipher.getInstance("<i>DES/CBC/PKCS5Padding</i>"); * Cipher c = Cipher.getInstance("<i>DES/CBC/PKCS5Padding</i>");
......
...@@ -62,17 +62,17 @@ import java.nio.ByteBuffer; ...@@ -62,17 +62,17 @@ import java.nio.ByteBuffer;
* algorithm (e.g., <i>DES</i>), and may be followed by a feedback mode and * algorithm (e.g., <i>DES</i>), and may be followed by a feedback mode and
* padding scheme. * padding scheme.
* *
* <p> A transformation is of the form:<p> * <p> A transformation is of the form:
* *
* <ul> * <ul>
* <li>"<i>algorithm/mode/padding</i>" or * <li>"<i>algorithm/mode/padding</i>" or
* <p> *
* <li>"<i>algorithm</i>" * <li>"<i>algorithm</i>"
* </ul> * </ul>
* *
* <P> (in the latter case, * <P> (in the latter case,
* provider-specific default values for the mode and padding scheme are used). * provider-specific default values for the mode and padding scheme are used).
* For example, the following is a valid transformation:<p> * For example, the following is a valid transformation:
* *
* <pre> * <pre>
* Cipher c = Cipher.getInstance("<i>DES/CBC/PKCS5Padding</i>"); * Cipher c = Cipher.getInstance("<i>DES/CBC/PKCS5Padding</i>");
...@@ -129,7 +129,7 @@ import java.nio.ByteBuffer; ...@@ -129,7 +129,7 @@ import java.nio.ByteBuffer;
* <i>DES/CBC/PKCS5Padding</i>, one that implements * <i>DES/CBC/PKCS5Padding</i>, one that implements
* <i>DES/CFB/PKCS5Padding</i>, and yet another one that implements * <i>DES/CFB/PKCS5Padding</i>, and yet another one that implements
* <i>DES/OFB/PKCS5Padding</i>. That provider would have the following * <i>DES/OFB/PKCS5Padding</i>. That provider would have the following
* <code>Cipher</code> properties in its master class:<p> * <code>Cipher</code> properties in its master class:
* *
* <ul> * <ul>
* *
...@@ -160,7 +160,7 @@ import java.nio.ByteBuffer; ...@@ -160,7 +160,7 @@ import java.nio.ByteBuffer;
* and one for <i>OFB</i>), one class for <i>PKCS5Padding</i>, * and one for <i>OFB</i>), one class for <i>PKCS5Padding</i>,
* and a generic <i>DES</i> class that subclasses from <code>CipherSpi</code>. * and a generic <i>DES</i> class that subclasses from <code>CipherSpi</code>.
* That provider would have the following * That provider would have the following
* <code>Cipher</code> properties in its master class:<p> * <code>Cipher</code> properties in its master class:
* *
* <ul> * <ul>
* *
...@@ -197,20 +197,20 @@ import java.nio.ByteBuffer; ...@@ -197,20 +197,20 @@ import java.nio.ByteBuffer;
* Check if the provider has registered a subclass of <code>CipherSpi</code> * Check if the provider has registered a subclass of <code>CipherSpi</code>
* for the specified "<i>algorithm/mode/padding</i>" transformation. * for the specified "<i>algorithm/mode/padding</i>" transformation.
* <p>If the answer is YES, instantiate it. * <p>If the answer is YES, instantiate it.
* <p>If the answer is NO, go to the next step.<p> * <p>If the answer is NO, go to the next step.
* <li> * <li>
* Check if the provider has registered a subclass of <code>CipherSpi</code> * Check if the provider has registered a subclass of <code>CipherSpi</code>
* for the sub-transformation "<i>algorithm/mode</i>". * for the sub-transformation "<i>algorithm/mode</i>".
* <p>If the answer is YES, instantiate it, and call * <p>If the answer is YES, instantiate it, and call
* <code>engineSetPadding(<i>padding</i>)</code> on the new instance. * <code>engineSetPadding(<i>padding</i>)</code> on the new instance.
* <p>If the answer is NO, go to the next step.<p> * <p>If the answer is NO, go to the next step.
* <li> * <li>
* Check if the provider has registered a subclass of <code>CipherSpi</code> * Check if the provider has registered a subclass of <code>CipherSpi</code>
* for the sub-transformation "<i>algorithm//padding</i>" (note the double * for the sub-transformation "<i>algorithm//padding</i>" (note the double
* slashes). * slashes).
* <p>If the answer is YES, instantiate it, and call * <p>If the answer is YES, instantiate it, and call
* <code>engineSetMode(<i>mode</i>)</code> on the new instance. * <code>engineSetMode(<i>mode</i>)</code> on the new instance.
* <p>If the answer is NO, go to the next step.<p> * <p>If the answer is NO, go to the next step.
* <li> * <li>
* Check if the provider has registered a subclass of <code>CipherSpi</code> * Check if the provider has registered a subclass of <code>CipherSpi</code>
* for the sub-transformation "<i>algorithm</i>". * for the sub-transformation "<i>algorithm</i>".
......
...@@ -66,7 +66,6 @@ import sun.security.jca.GetInstance.Instance; ...@@ -66,7 +66,6 @@ import sun.security.jca.GetInstance.Instance;
* algorithm-independent <code>init</code> methods, it is up to the * algorithm-independent <code>init</code> methods, it is up to the
* provider what to do about the algorithm-specific parameters (if any) to be * provider what to do about the algorithm-specific parameters (if any) to be
* associated with each of the keys. * associated with each of the keys.
* <p>
* *
* <li><b>Algorithm-Specific Initialization</b> * <li><b>Algorithm-Specific Initialization</b>
* <p>For situations where a set of algorithm-specific parameters already * <p>For situations where a set of algorithm-specific parameters already
......
/* /*
* Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved. * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * This code is free software; you can redistribute it and/or modify it
...@@ -50,7 +50,7 @@ import java.security.NoSuchProviderException; ...@@ -50,7 +50,7 @@ import java.security.NoSuchProviderException;
* to a SealedObject. * to a SealedObject.
* *
* <p> The original object that was sealed can be recovered in two different * <p> The original object that was sealed can be recovered in two different
* ways: <p> * ways:
* *
* <ul> * <ul>
* *
...@@ -68,8 +68,6 @@ import java.security.NoSuchProviderException; ...@@ -68,8 +68,6 @@ import java.security.NoSuchProviderException;
* decryption key, it could hand over the cipher object to * decryption key, it could hand over the cipher object to
* another party who then unseals the sealed object. * another party who then unseals the sealed object.
* *
* <p>
*
* <li>by using one of the * <li>by using one of the
* {@link #getObject(java.security.Key) getObject} methods * {@link #getObject(java.security.Key) getObject} methods
* that take a <code>Key</code> object. * that take a <code>Key</code> object.
......
/* /*
* Copyright (c) 2003, 2012, Oracle and/or its affiliates. All rights reserved. * Copyright (c) 2003, 2013, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * This code is free software; you can redistribute it and/or modify it
...@@ -329,7 +329,7 @@ import java.nio.ReadOnlyBufferException; ...@@ -329,7 +329,7 @@ import java.nio.ReadOnlyBufferException;
* is saved. All future delegated tasks will be processed using this * is saved. All future delegated tasks will be processed using this
* context: that is, all access control decisions will be made using the * context: that is, all access control decisions will be made using the
* context captured at engine creation. * context captured at engine creation.
* <P> *
* <HR> * <HR>
* *
* <B>Concurrency Notes</B>: * <B>Concurrency Notes</B>:
...@@ -345,7 +345,7 @@ import java.nio.ReadOnlyBufferException; ...@@ -345,7 +345,7 @@ import java.nio.ReadOnlyBufferException;
* out-of-order, unexpected or fatal results may occur. * out-of-order, unexpected or fatal results may occur.
* <P> * <P>
* For example: * For example:
* <P> *
* <pre> * <pre>
* synchronized (outboundLock) { * synchronized (outboundLock) {
* sslEngine.wrap(src, dst); * sslEngine.wrap(src, dst);
......
/* /*
* Copyright (c) 2000, 2012, Oracle and/or its affiliates. All rights reserved. * Copyright (c) 2000, 2013, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * This code is free software; you can redistribute it and/or modify it
...@@ -43,7 +43,6 @@ import java.security.*; ...@@ -43,7 +43,6 @@ import java.security.*;
* The following table lists all the possible SSLPermission target names, * The following table lists all the possible SSLPermission target names,
* and for each provides a description of what the permission allows * and for each provides a description of what the permission allows
* and a discussion of the risks of granting code the permission. * and a discussion of the risks of granting code the permission.
* <P>
* *
* <table border=1 cellpadding=5 * <table border=1 cellpadding=5
* summary="permission name, what it allows, and associated risks"> * summary="permission name, what it allows, and associated risks">
......
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册