This commit is contained in:
Lana Steuck 2013-12-05 10:33:57 -08:00
commit 7383b43bc5
211 changed files with 3971 additions and 2840 deletions
jdk
make
src/share/classes
com/sun/security/auth/module
java
applet
awt
io
lang
math
security
sql
util
javax

@ -54,7 +54,7 @@ $(JCE_MANIFEST): $(MAINMANIFEST)
##########################################################################################
# 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
# 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.
#
# The source for the crypto jars is not available for all licensees. The BUILD_CRYPTO
@ -63,7 +63,7 @@ $(JCE_MANIFEST): $(MAINMANIFEST)
# other way to get the jars than to build them.
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, , \
SRCS := $(JDK_OUTPUTDIR)/classes_security, \
@ -78,19 +78,19 @@ $(SUNPKCS11_JAR_UNSIGNED): $(JCE_MANIFEST)
ifndef OPENJDK
SUNPKCS11_JAR_SRC := $(JDK_TOPDIR)/make/closed/tools/crypto/pkcs11/sunpkcs11.jar
$(SUNPKCS11_JAR_DST): $(SUNPKCS11_JAR_SRC)
@$(ECHO) $(LOG_INFO) "\n>>>Installing prebuilt SunPKCS11 provider..."
@$(ECHO) $(LOG_INFO) Copying prebuilt $(@F)
$(install-file)
else
$(SUNPKCS11_JAR_DST): $(SUNPKCS11_JAR_UNSIGNED)
$(install-file)
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_UNSIGNED := $(JDK_OUTPUTDIR)/unsigned/sunec.jar
SUNEC_JAR_UNSIGNED := $(JDK_OUTPUTDIR)/jce/unsigned/sunec.jar
$(eval $(call SetupArchive,BUILD_SUNEC_JAR, , \
SRCS := $(JDK_OUTPUTDIR)/classes_security, \
@ -105,19 +105,19 @@ $(SUNEC_JAR_UNSIGNED): $(JCE_MANIFEST)
ifndef OPENJDK
SUNEC_JAR_SRC := $(JDK_TOPDIR)/make/closed/tools/crypto/ec/sunec.jar
$(SUNEC_JAR_DST): $(SUNEC_JAR_SRC)
@$(ECHO) $(LOG_INFO) "\n>>>Installing prebuilt SunEC provider..."
@$(ECHO) $(LOG_INFO) Copying prebuilt $(@F)
$(install-file)
else
$(SUNEC_JAR_DST): $(SUNEC_JAR_UNSIGNED)
$(install-file)
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_UNSIGNED := $(JDK_OUTPUTDIR)/unsigned/sunjce_provider.jar
SUNJCE_PROVIDER_JAR_UNSIGNED := $(JDK_OUTPUTDIR)/jce/unsigned/sunjce_provider.jar
ifneq ($(BUILD_CRYPTO), no)
$(eval $(call SetupArchive,BUILD_SUNJCE_PROVIDER_JAR, , \
@ -130,25 +130,25 @@ ifneq ($(BUILD_CRYPTO), no)
$(SUNJCE_PROVIDER_JAR_UNSIGNED): $(JCE_MANIFEST)
JARS += $(SUNJCE_PROVIDER_JAR_UNSIGNED)
TARGETS += $(SUNJCE_PROVIDER_JAR_UNSIGNED)
endif
ifndef OPENJDK
SUNJCE_PROVIDER_JAR_SRC := $(JDK_TOPDIR)/make/closed/tools/crypto/jce/sunjce_provider.jar
$(SUNJCE_PROVIDER_JAR_DST): $(SUNJCE_PROVIDER_JAR_SRC)
@$(ECHO) $(LOG_INFO) "\n>>>Installing prebuilt SunJCE provider..."
@$(ECHO) $(LOG_INFO) Copying prebuilt $(@F)
$(install-file)
else
$(SUNJCE_PROVIDER_JAR_DST): $(SUNJCE_PROVIDER_JAR_UNSIGNED)
$(install-file)
endif
JARS += $(SUNJCE_PROVIDER_JAR_DST)
TARGETS += $(SUNJCE_PROVIDER_JAR_DST)
##########################################################################################
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)
$(eval $(call SetupArchive,BUILD_JCE_JAR, , \
@ -161,36 +161,43 @@ ifneq ($(BUILD_CRYPTO), no)
$(JCE_JAR_UNSIGNED): $(JCE_MANIFEST)
JARS += $(JCE_JAR_UNSIGNED)
TARGETS += $(JCE_JAR_UNSIGNED)
endif
ifndef OPENJDK
JCE_JAR_SRC := $(JDK_TOPDIR)/make/closed/tools/crypto/jce/jce.jar
$(JCE_JAR_DST): $(JCE_JAR_SRC)
@$(ECHO) $(LOG_INFO) "\n>>>Installing prebuilt jce.jar..."
@$(ECHO) $(LOG_INFO) Copying prebuilt $(@F)
$(install-file)
else
$(JCE_JAR_DST): $(JCE_JAR_UNSIGNED)
$(install-file)
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_UNSIGNED := $(JDK_OUTPUTDIR)/unsigned/US_export_policy.jar
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
# then we don't need this extra copying
#
# 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_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)/%
$(install-file)
@ -200,77 +207,113 @@ ifneq ($(BUILD_CRYPTO), no)
$(eval $(call SetupArchive,BUILD_US_EXPORT_POLICY_JAR, $(US_EXPORT_POLICY_JAR_DEPS), \
SRCS := $(US_EXPORT_POLICY_JAR_TMP), \
SUFFIXES := .policy, \
JAR := $(US_EXPORT_POLICY_JAR_UNSIGNED), \
JAR := $(US_EXPORT_POLICY_JAR_UNLIMITED_UNSIGNED), \
EXTRA_MANIFEST_ATTR := Crypto-Strength: unlimited, \
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
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
$(ECHO) $(LOG_INFO) Copying $(@F)
$(ECHO) $(LOG_INFO) Copying prebuilt $(@F)
$(install-file)
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)
else
$(US_EXPORT_POLICY_JAR_DST): $(US_EXPORT_POLICY_JAR_LIMITED_UNSIGNED)
$(install-file)
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_UNSIGNED := $(JDK_OUTPUTDIR)/unsigned/local_policy.jar
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
# 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_SRC_DIR := $(JDK_TOPDIR)/make/data/cryptopolicy/unlimited
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_LIMITED_TMP)/%: $(JDK_TOPDIR)/make/data/cryptopolicy/limited/%
$(install-file)
$(eval $(call SetupArchive,BUILD_LOCAL_POLICY_JAR, $(LOCAL_POLICY_JAR_DEPS), \
SRCS := $(LOCAL_POLICY_JAR_TMP), \
$(LOCAL_POLICY_JAR_UNLIMITED_TMP)/%: $(JDK_TOPDIR)/make/data/cryptopolicy/unlimited/%
$(install-file)
$(eval $(call SetupArchive,BUILD_LOCAL_POLICY_JAR_LIMITED, \
$(LOCAL_POLICY_JAR_LIMITED_TMP)/exempt_local.policy \
$(LOCAL_POLICY_JAR_LIMITED_TMP)/default_local.policy, \
SRCS := $(LOCAL_POLICY_JAR_LIMITED_TMP), \
SUFFIXES := .policy, \
JAR := $(LOCAL_POLICY_JAR_UNSIGNED), \
EXTRA_MANIFEST_ATTR := $(LOCAL_POLICY_JAR_ATTR), \
JAR := $(LOCAL_POLICY_JAR_LIMITED_UNSIGNED), \
EXTRA_MANIFEST_ATTR := Crypto-Strength: limited, \
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
ifndef OPENJDK
$(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)
else
$(LOCAL_POLICY_JAR_DST): $(LOCAL_POLICY_JAR_UNSIGNED)
ifeq ($(UNLIMITED_CRYPTO), true)
$(LOCAL_POLICY_JAR_DST): $(LOCAL_POLICY_JAR_UNLIMITED_UNSIGNED)
$(install-file)
else
$(LOCAL_POLICY_JAR_DST): $(LOCAL_POLICY_JAR_LIMITED_UNSIGNED)
$(install-file)
endif
endif
JARS += $(LOCAL_POLICY_JAR_DST)
TARGETS += $(LOCAL_POLICY_JAR_DST)
##########################################################################################
ifeq ($(OPENJDK_TARGET_OS), windows)
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, , \
SRCS := $(JDK_OUTPUTDIR)/classes_security, \
@ -285,14 +328,14 @@ ifeq ($(OPENJDK_TARGET_OS), windows)
ifndef OPENJDK
SUNMSCAPI_JAR_SRC := $(JDK_TOPDIR)/make/closed/tools/crypto/mscapi/sunmscapi.jar
$(SUNMSCAPI_JAR_DST): $(SUNMSCAPI_JAR_SRC)
@$(ECHO) $(LOG_INFO) "\n>>>Installing prebuilt SunMSCAPI provider..."
@$(ECHO) $(LOG_INFO) Copying prebuilt $(@F)
$(install-file)
else
$(SUNMSCAPI_JAR_DST): $(SUNMSCAPI_JAR_UNSIGNED)
$(install-file)
endif
JARS += $(SUNMSCAPI_JAR_UNSIGNED) $(SUNMSCAPI_JAR_DST)
TARGETS += $(SUNMSCAPI_JAR_UNSIGNED) $(SUNMSCAPI_JAR_DST)
endif
@ -302,7 +345,7 @@ ifeq ($(OPENJDK_TARGET_OS), solaris)
ifndef OPENJDK
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
$(eval $(call SetupArchive,BUILD_UCRYPTO_JAR, , \
@ -316,14 +359,14 @@ ifeq ($(OPENJDK_TARGET_OS), solaris)
$(UCRYPTO_JAR_UNSIGNED): $(JCE_MANIFEST)
$(UCRYPTO_JAR_DST): $(UCRYPTO_JAR_SRC)
@$(ECHO) $(LOG_INFO) "\n>>>Installing prebuilt OracleUcrypto provider..."
@$(ECHO) $(LOG_INFO) Copying prebuilt $(@F)
$(install-file)
JARS += $(UCRYPTO_JAR_UNSIGNED) $(UCRYPTO_JAR_DST)
TARGETS += $(UCRYPTO_JAR_UNSIGNED) $(UCRYPTO_JAR_DST)
endif
endif
all: $(JARS)
all: $(TARGETS)
.PHONY: default all

@ -80,7 +80,7 @@ check-keystore:
exit 2; \
fi
$(JCE_OUTPUTDIR)/%: $(JDK_OUTPUTDIR)/unsigned/%
$(JDK_OUTPUTDIR)/jce/signed/%: $(JDK_OUTPUTDIR)/jce/unsigned/%
$(call install-file)
$(JARSIGNER) -keystore $(SIGNING_KEYSTORE) \
$@ $(SIGNING_ALIAS) < $(SIGNING_PASSPHRASE)
@ -88,26 +88,33 @@ $(JCE_OUTPUTDIR)/%: $(JDK_OUTPUTDIR)/unsigned/%
JAR_LIST := \
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 \
sunjce_provider.jar \
sunpkcs11.jar \
US_export_policy.jar \
sunmscapi.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), )
$(error No jars found in $(JDK_OUTPUTDIR)/unsigned/)
$(error No jars found in $(JDK_OUTPUTDIR)/jce/unsigned/)
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
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*** builds only and *MUST NOT* be checked into the closed workspace. ***"
@$(PRINTF) "\n*** ***"

@ -1 +0,0 @@
Crypto-Strength: limited

@ -1 +0,0 @@
Crypto-Strength: unlimited

@ -916,8 +916,7 @@ public class Krb5LoginModule implements LoginModule {
char[] tmpPassword = ((PasswordCallback)
callbacks[0]).getPassword();
if (tmpPassword == null) {
// treat a NULL password as an empty password
tmpPassword = new char[0];
throw new LoginException("No password provided");
}
password = new char[tmpPassword.length];
System.arraycopy(tmpPassword, 0,

@ -392,7 +392,7 @@ public class Applet extends Panel {
* Each element of the array should be a set of three
* <code>Strings</code> containing the name, the type, and a
* description. For example:
* <p><blockquote><pre>
* <blockquote><pre>
* String pinfo[][] = {
* {"fps", "1-10", "frames per second"},
* {"repeat", "boolean", "repeat image loop"},

@ -107,7 +107,7 @@ public interface AppletContext {
* <code>target</code> argument indicates in which HTML frame the
* document is to be displayed.
* The target argument is interpreted as follows:
* <p>
*
* <center><table border="3" summary="Target arguments and their descriptions">
* <tr><th>Target Argument</th><th>Description</th></tr>
* <tr><td><code>"_self"</code> <td>Show in the window and frame that

@ -43,7 +43,6 @@ import java.security.BasicPermission;
* target names, and for each provides a description of what the
* permission allows and a discussion of the risks of granting code
* the permission.
* <P>
*
* <table border=1 cellpadding=5 summary="AWTPermission target names, descriptions, and associated risks.">
* <tr>

@ -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
* premultiplied components <em>A<sub>r</sub></em> and <em>C<sub>r</sub></em>.
*
* <p>
* <h3>Preparing Results</h3>
*
* <p>
@ -193,7 +192,6 @@ import sun.java2d.SunCompositeContext;
* by zero" and the color components are left as
* all zeros.
*
* <p>
* <h3>Performance Considerations</h3>
*
* <p>
@ -216,7 +214,6 @@ import sun.java2d.SunCompositeContext;
* for their pixels. Such sources supply an alpha of 1.0 for
* all of their pixels.
*
* <p>
* <li>
* Many destinations also have no place to store the alpha values
* that result from the blending calculations performed by this class.
@ -227,7 +224,6 @@ import sun.java2d.SunCompositeContext;
* values by the resulting alpha value before storing the color
* values and discarding the alpha value.
*
* <p>
* <li>
* The accuracy of the results depends on the manner in which pixels
* are stored in the destination.
@ -248,7 +244,6 @@ import sun.java2d.SunCompositeContext;
* the need to choose a pixel from a limited palette to match the
* results of the blending equations.
*
* <p>
* <li>
* Nearly all formats store pixels as discrete integers rather than
* the floating point values used in the reference equations above.
@ -268,7 +263,6 @@ import sun.java2d.SunCompositeContext;
* represents 0.0 and 0xff represents
* 1.0.
*
* <p>
* <li>
* The internal implementation can approximate some of the equations
* and it can also eliminate some steps to avoid unnecessary operations.
@ -332,7 +326,6 @@ import sun.java2d.SunCompositeContext;
* <p>
* and thus they would all match.
*
* <p>
* <li>
* Because of the technique of simplifying the equations for
* calculation efficiency, some implementations might perform

@ -39,7 +39,7 @@ import java.lang.annotation.Native;
* {@link Shape} and the decorations applied at the ends and joins of
* path segments of the <code>Shape</code>.
* These rendering attributes include:
* <dl compact>
* <dl>
* <dt><i>width</i>
* <dd>The pen width, measured perpendicularly to the pen trajectory.
* <dt><i>end caps</i>

@ -99,7 +99,7 @@ import java.util.Hashtable;
* style="float:center; margin: 7px 10px;">
* <p>
* The code for this applet is as follows:
* <p>
*
* <hr><blockquote><pre>
* import java.awt.*;
* import java.applet.Applet;

@ -388,7 +388,7 @@ public class Button extends Component implements Accessible {
* This method is not called unless action events are
* enabled for this button. Action events are enabled
* when one of the following occurs:
* <p><ul>
* <ul>
* <li>An <code>ActionListener</code> object is registered
* via <code>addActionListener</code>.
* <li>Action events are enabled via <code>enableEvents</code>.

@ -41,7 +41,7 @@ import javax.accessibility.*;
* <p>
* The following code example creates a set of check boxes in
* a grid layout:
* <p>
*
* <hr><blockquote><pre>
* setLayout(new GridLayout(3, 1));
* add(new Checkbox("one", null, true));
@ -558,7 +558,7 @@ public class Checkbox extends Component implements ItemSelectable, Accessible {
* This method is not called unless item events are
* enabled for this component. Item events are enabled
* when one of the following occurs:
* <p><ul>
* <ul>
* <li>An <code>ItemListener</code> object is registered
* via <code>addItemListener</code>.
* <li>Item events are enabled via <code>enableEvents</code>.

@ -35,7 +35,7 @@ package java.awt;
* <p>
* The following code example produces a new check box group,
* with three check boxes:
* <p>
*
* <hr><blockquote><pre>
* setLayout(new GridLayout(3, 1));
* CheckboxGroup cbg = new CheckboxGroup();

@ -367,7 +367,7 @@ public class CheckboxMenuItem extends MenuItem implements ItemSelectable, Access
* This method is not called unless item events are
* enabled for this menu item. Item events are enabled
* when one of the following occurs:
* <p><ul>
* <ul>
* <li>An <code>ItemListener</code> object is registered
* via <code>addItemListener</code>.
* <li>Item events are enabled via <code>enableEvents</code>.

@ -40,7 +40,7 @@ import javax.accessibility.*;
* The current choice is displayed as the title of the menu.
* <p>
* The following code example produces a pop-up menu:
* <p>
*
* <hr><blockquote><pre>
* Choice ColorChooser = new Choice();
* ColorChooser.add("Green");
@ -609,7 +609,7 @@ public class Choice extends Component implements ItemSelectable, Accessible {
* This method is not called unless item events are
* enabled for this component. Item events are enabled
* when one of the following occurs:
* <p><ul>
* <ul>
* <li>An <code>ItemListener</code> object is registered
* via <code>addItemListener</code>.
* <li>Item events are enabled via <code>enableEvents</code>.

@ -106,7 +106,7 @@ import sun.util.logging.PlatformLogger;
* adding/removing components to/from containers, the whole hierarchy must be
* validated afterwards by means of the {@link Container#validate()} method
* invoked on the top-most invalid container of the hierarchy.
* <p>
*
* <h3>Serialization</h3>
* It is important to note that only AWT listeners which conform
* to the <code>Serializable</code> protocol will be saved when
@ -3859,7 +3859,7 @@ public abstract class Component implements ImageObserver, MenuContainer,
* This is a proxy capabilities class used when a FlipBufferStrategy
* 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 BufferCapabilities orig;
@ -4515,7 +4515,7 @@ public abstract class Component implements ImageObserver, MenuContainer,
* Private class to perform sub-region blitting. Swing will use
* this subclass via the SubRegionShowable interface in order to
* copy only the area changed during a repaint.
* @see javax.swing.BufferStrategyPaintManager
* See javax.swing.BufferStrategyPaintManager.
*/
private class BltSubRegionBufferStrategy extends BltBufferStrategy
implements SubRegionShowable
@ -6328,7 +6328,7 @@ public abstract class Component implements ImageObserver, MenuContainer,
* This method is not called unless component events are
* enabled for this component. Component events are enabled
* when one of the following occurs:
* <p><ul>
* <ul>
* <li>A <code>ComponentListener</code> object is registered
* via <code>addComponentListener</code>.
* <li>Component events are enabled via <code>enableEvents</code>.
@ -6373,7 +6373,7 @@ public abstract class Component implements ImageObserver, MenuContainer,
* This method is not called unless focus events are
* enabled for this component. Focus events are enabled
* when one of the following occurs:
* <p><ul>
* <ul>
* <li>A <code>FocusListener</code> object is registered
* via <code>addFocusListener</code>.
* <li>Focus events are enabled via <code>enableEvents</code>.
@ -6393,7 +6393,7 @@ public abstract class Component implements ImageObserver, MenuContainer,
* with a <code>FocusEvent</code> as the argument will result in a
* call to the <code>Component</code>'s <code>processFocusEvent</code>
* method regardless of the current <code>KeyboardFocusManager</code>.
* <p>
*
* <p>Note that if the event parameter is <code>null</code>
* the behavior is unspecified and may result in an
* exception.
@ -6430,7 +6430,7 @@ public abstract class Component implements ImageObserver, MenuContainer,
* This method is not called unless key events are
* enabled for this component. Key events are enabled
* when one of the following occurs:
* <p><ul>
* <ul>
* <li>A <code>KeyListener</code> object is registered
* via <code>addKeyListener</code>.
* <li>Key events are enabled via <code>enableEvents</code>.
@ -6499,7 +6499,7 @@ public abstract class Component implements ImageObserver, MenuContainer,
* This method is not called unless mouse events are
* enabled for this component. Mouse events are enabled
* when one of the following occurs:
* <p><ul>
* <ul>
* <li>A <code>MouseListener</code> object is registered
* via <code>addMouseListener</code>.
* <li>Mouse events are enabled via <code>enableEvents</code>.
@ -6547,7 +6547,7 @@ public abstract class Component implements ImageObserver, MenuContainer,
* This method is not called unless mouse motion events are
* enabled for this component. Mouse motion events are enabled
* when one of the following occurs:
* <p><ul>
* <ul>
* <li>A <code>MouseMotionListener</code> object is registered
* via <code>addMouseMotionListener</code>.
* <li>Mouse motion events are enabled via <code>enableEvents</code>.
@ -6586,7 +6586,7 @@ public abstract class Component implements ImageObserver, MenuContainer,
* This method is not called unless mouse wheel events are
* enabled for this component. Mouse wheel events are enabled
* when one of the following occurs:
* <p><ul>
* <ul>
* <li>A <code>MouseWheelListener</code> object is registered
* via <code>addMouseWheelListener</code>.
* <li>Mouse wheel events are enabled via <code>enableEvents</code>.
@ -6630,7 +6630,7 @@ public abstract class Component implements ImageObserver, MenuContainer,
* This method is not called unless input method events
* are enabled for this component. Input method events are enabled
* when one of the following occurs:
* <p><ul>
* <ul>
* <li>An <code>InputMethodListener</code> object is registered
* via <code>addInputMethodListener</code>.
* <li>Input method events are enabled via <code>enableEvents</code>.
@ -6669,7 +6669,7 @@ public abstract class Component implements ImageObserver, MenuContainer,
* This method is not called unless hierarchy events
* are enabled for this component. Hierarchy events are enabled
* when one of the following occurs:
* <p><ul>
* <ul>
* <li>An <code>HierarchyListener</code> object is registered
* via <code>addHierarchyListener</code>.
* <li>Hierarchy events are enabled via <code>enableEvents</code>.
@ -6705,7 +6705,7 @@ public abstract class Component implements ImageObserver, MenuContainer,
* This method is not called unless hierarchy bounds events
* are enabled for this component. Hierarchy bounds events are enabled
* when one of the following occurs:
* <p><ul>
* <ul>
* <li>An <code>HierarchyBoundsListener</code> object is registered
* via <code>addHierarchyBoundsListener</code>.
* <li>Hierarchy bounds events are enabled via <code>enableEvents</code>.

@ -185,7 +185,7 @@ public class Container extends Component {
* 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.
*
* @see #getMouseEventTarget(int, int, boolean, boolean, boolean)
* @see #getMouseEventTarget(int, int, boolean)
*/
static final boolean INCLUDE_SELF = true;
@ -194,7 +194,7 @@ public class Container extends Component {
* of <code>getMouseEventTarget</code>. It is used to specify whether
* 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;
@ -1036,7 +1036,7 @@ public class Container extends Component {
* every add request to a container as all other add methods defer
* to this one. An overriding method should
* usually include a call to the superclass's version of the method:
* <p>
*
* <blockquote>
* <code>super.addImpl(comp, constraints, index)</code>
* </blockquote>

@ -28,20 +28,20 @@ interface EventFilter {
/**
* Enumeration for possible values for <code>acceptEvent(AWTEvent ev)</code> method.
* @see EventDispatchThread#pumpEventsForFilters(EventFilter)
* @see EventDispatchThread#pumpEventsForFilter
*/
static enum FilterAction {
/**
* 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
* is dispatched by the <code>EventDispatchThread</code>
* @see EventDispatchThread#pumpEventsForFilters(EventFilter)
* @see EventDispatchThread#pumpEventsForFilter
*/
ACCEPT,
/**
* REJECT means that this filter filter the event. No other filters are queried,
* and the event is not dispatched by the <code>EventDispatchedThread</code>
* @see EventDispatchThread#pumpEventsForFilters(EventFilter)
* @see EventDispatchThread#pumpEventsForFilter
*/
REJECT,
/**
@ -51,7 +51,7 @@ interface EventFilter {
* 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
* by modal filters.
* @see EventDispatchThread#pumpEventsForFilters(EventFilter)
* @see EventDispatchThread#pumpEventsForFilter
* @see ModalEventFilter
*/
ACCEPT_IMMEDIATELY

@ -652,7 +652,7 @@ public class EventQueue {
* Dispatches an event. The manner in which the event is
* dispatched depends upon the type of the event and the
* type of the event's source object:
* <p>
*
* <table border=1 summary="Event types, source types, and dispatch methods">
* <tr>
* <th>Event Type</th>

@ -439,7 +439,6 @@ public class FileDialog extends Dialog {
* Note that the method is private and it's intended to be used
* by the peers through the AWTAccessor API.
*
* @param directory the current directory
* @param files the array that contains the short names of
* all the files that the user selects.
*

@ -57,7 +57,7 @@ import java.io.IOException;
* style="float:center; margin: 7px 10px;">
* <p>
* Here is the code for this applet:
* <p>
*
* <hr><blockquote><pre>
* import java.awt.*;
* import java.applet.Applet;
@ -129,9 +129,9 @@ public class FlowLayout implements LayoutManager, java.io.Serializable {
* how each row distributes empty space.
* It can be one of the following values:
* <ul>
* <code>LEFT</code>
* <code>RIGHT</code>
* <code>CENTER</code>
* <li><code>LEFT</code>
* <li><code>RIGHT</code>
* <li><code>CENTER</code>
* </ul>
*
* @serial
@ -146,11 +146,11 @@ public class FlowLayout implements LayoutManager, java.io.Serializable {
* v1.2 and greater.
* It can be one of the following three values:
* <ul>
* <code>LEFT</code>
* <code>RIGHT</code>
* <code>CENTER</code>
* <code>LEADING</code>
* <code>TRAILING</code>
* <li><code>LEFT</code>
* <li><code>RIGHT</code>
* <li><code>CENTER</code>
* <li><code>LEADING</code>
* <li><code>TRAILING</code>
* </ul>
*
* @serial

@ -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 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>
* 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
* represents one character. In general, however, characters and glyphs do not
* 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-character string "fi" can be represented by a single glyph, an
* "fi" ligature. In complex writing systems, such as Arabic or the South
@ -93,7 +93,7 @@ import static sun.font.EAttribute.*;
* of characters as well as the tables needed to map sequences of characters to
* 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:
* <em>physical</em> fonts and <em>logical</em> fonts.
@ -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>
* document.
*
* <h4>Font Faces and Names</h4>
* <h3>Font Faces and Names</h3>
*
* A <code>Font</code>
* can have many faces, such as heavy, medium, oblique, gothic and
@ -160,7 +160,7 @@ import static sun.font.EAttribute.*;
* with varying sizes, styles, transforms and font features via the
* <code>deriveFont</code> methods in this class.
*
* <h4>Font and TextAttribute</h4>
* <h3>Font and TextAttribute</h3>
*
* <p><code>Font</code> supports most
* <code>TextAttribute</code>s. This makes some operations, such as
@ -197,7 +197,7 @@ import static sun.font.EAttribute.*;
* avoid this problem. Clients who use input method highlights can
* convert these to the platform-specific attributes for that
* 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
* <code>deriveFont</code> APIs ignore the FONT attribute, and it is
@ -1419,7 +1419,7 @@ public class Font implements java.io.Serializable
* To ensure that this method returns the desired Font,
* format the <code>str</code> parameter in
* one of these ways
* <p>
*
* <ul>
* <li><em>fontname-style-pointsize</em>
* <li><em>fontname-pointsize</em>

@ -39,7 +39,7 @@ import java.text.AttributedCharacterIterator;
* A <code>Graphics</code> object encapsulates state information needed
* for the basic rendering operations that Java supports. This
* state information includes the following properties:
* <p>
*
* <ul>
* <li>The <code>Component</code> object on which to draw.
* <li>A translation origin for rendering and clipping coordinates.
@ -63,7 +63,7 @@ import java.text.AttributedCharacterIterator;
* <p>
* The graphics pen hangs down and to the right from the path it traverses.
* This has the following implications:
* <p><ul>
* <ul>
* <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
* as compared to filling a figure that is bounded by that same rectangle.
@ -136,7 +136,7 @@ public abstract class Graphics {
* interpreted in the coordinate system of the original
* <code>Graphics</code> object. The new graphics context is
* identical to the original, except in two respects:
* <p>
*
* <ul>
* <li>
* 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 {
* resize the component, and if so, how.
* <p>
* The following values are valid for <code>fill</code>:
* <p>
*
* <ul>
* <li>
* <code>NONE</code>: Do not resize the component.

@ -55,7 +55,7 @@ import java.util.Arrays;
* of the <code>GridBagConstraints</code> objects that are associated
* with its components. You customize a <code>GridBagConstraints</code>
* object by setting one or more of its instance variables:
* <p>
*
* <dl>
* <dt>{@link GridBagConstraints#gridx},
* {@link GridBagConstraints#gridy}
@ -121,7 +121,7 @@ import java.util.Arrays;
* <code>ComponentOrientation</code> property while absolute values
* are not. Baseline relative values are calculated relative to the
* baseline. Valid values are:
* <p>
*
* <center><table BORDER=0 WIDTH=800
* SUMMARY="absolute, relative and baseline values as described above">
* <tr>
@ -251,7 +251,7 @@ import java.util.Arrays;
* 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,
* right-to-left container.
* <p>
*
* <center><table WIDTH=600 summary="layout">
* <tr ALIGN=CENTER>
* <td>
@ -270,7 +270,7 @@ import java.util.Arrays;
* of its associated <code>GridBagConstraints</code> object
* set to <code>GridBagConstraints.BOTH</code>.
* In addition, the components have the following non-default constraints:
* <p>
*
* <ul>
* <li>Button1, Button2, Button3: <code>weightx&nbsp;=&nbsp;1.0</code>
* <li>Button4: <code>weightx&nbsp;=&nbsp;1.0</code>,
@ -285,7 +285,7 @@ import java.util.Arrays;
* </ul>
* <p>
* Here is the code that implements the example shown above:
* <p>
*
* <hr><blockquote><pre>
* import java.awt.*;
* import java.util.*;

@ -32,7 +32,7 @@ package java.awt;
* and one component is placed in each rectangle.
* For example, the following is an applet that lays out six buttons
* into three rows and two columns:
* <p>
*
* <hr><blockquote>
* <pre>
* import java.awt.*;
@ -54,7 +54,7 @@ package java.awt;
* and left-to-right, the above example produces the output shown in Figure 1.
* If the container's <code>ComponentOrientation</code> property is horizontal
* and right-to-left, the example produces the output shown in Figure 2.
* <p>
*
* <table style="float:center" WIDTH=600 summary="layout">
* <tr ALIGN=CENTER>
* <td><img SRC="doc-files/GridLayout-1.gif"

@ -36,7 +36,7 @@ import javax.accessibility.*;
* directly.
* <p>
* For example, the code&nbsp;.&nbsp;.&nbsp;.
* <p>
*
* <hr><blockquote><pre>
* setLayout(new FlowLayout(FlowLayout.CENTER, 10, 10));
* add(new Label("Hi There!"));

@ -75,7 +75,6 @@ import java.beans.ConstructorProperties;
* <p>
* The following code demonstrates typical usage of
* {@code LinearGradientPaint}:
* <p>
* <pre>
* Point2D start = new Point2D.Float(0, 0);
* Point2D end = new Point2D.Float(50, 50);
@ -92,7 +91,6 @@ import java.beans.ConstructorProperties;
* <p>
* This image demonstrates the example code above for each
* of the three cycle methods:
* <p>
* <center>
* <img src = "doc-files/LinearGradientPaint.png"
* alt="image showing the output of the example code">

@ -66,8 +66,8 @@ final class LinearGradientPaintContext extends MultipleGradientPaintContext {
* concatenated with this)
* @param hints the hints that the context object uses to choose
* between rendering alternatives
* @param dStart gradient start point, in user space
* @param dEnd gradient end point, in user space
* @param start gradient start point, in user space
* @param end gradient end point, in user space
* @param fractions the fractions specifying the gradient distribution
* @param colors the gradient colors
* @param cycleMethod either NO_CYCLE, REFLECT, or REPEAT

@ -41,7 +41,7 @@ import javax.accessibility.*;
* the user can choose either one item or multiple items.
* <p>
* For example, the code&nbsp;.&nbsp;.&nbsp;.
* <p>
*
* <hr><blockquote><pre>
* List lst = new List(4, false);
* lst.add("Mercury");
@ -1082,7 +1082,7 @@ public class List extends Component implements ItemSelectable, Accessible {
* This method is not called unless item events are
* enabled for this component. Item events are enabled
* when one of the following occurs:
* <p><ul>
* <ul>
* <li>An <code>ItemListener</code> object is registered
* via <code>addItemListener</code>.
* <li>Item events are enabled via <code>enableEvents</code>.
@ -1113,7 +1113,7 @@ public class List extends Component implements ItemSelectable, Accessible {
* This method is not called unless action events are
* enabled for this component. Action events are enabled
* when one of the following occurs:
* <p><ul>
* <ul>
* <li>An <code>ActionListener</code> object is registered
* via <code>addActionListener</code>.
* <li>Action events are enabled via <code>enableEvents</code>.

@ -648,7 +648,7 @@ public class MenuItem extends MenuComponent implements Accessible {
* This method is not called unless action events are
* enabled for this component. Action events are enabled
* when one of the following occurs:
* <p><ul>
* <ul>
* <li>An <code>ActionListener</code> object is registered
* via <code>addActionListener</code>.
* <li>Action events are enabled via <code>enableEvents</code>.

@ -104,7 +104,6 @@ import java.beans.ConstructorProperties;
* The following code demonstrates typical usage of
* {@code RadialGradientPaint}, where the center and focus points are
* the same:
* <p>
* <pre>
* Point2D center = new Point2D.Float(50, 50);
* float radius = 25;
@ -117,7 +116,6 @@ import java.beans.ConstructorProperties;
* <p>
* This image demonstrates the example code above, with default
* (centered) focus for each of the three cycle methods:
* <p>
* <center>
* <img src = "doc-files/RadialGradientPaint-1.png" alt="image showing the
* output of the sameple code">
@ -126,7 +124,6 @@ import java.beans.ConstructorProperties;
* <p>
* It is also possible to specify a non-centered focus point, as
* in the following code:
* <p>
* <pre>
* Point2D center = new Point2D.Float(50, 50);
* float radius = 25;
@ -142,7 +139,6 @@ import java.beans.ConstructorProperties;
* <p>
* This image demonstrates the previous example code, with non-centered
* focus for each of the three cycle methods:
* <p>
* <center>
* <img src = "doc-files/RadialGradientPaint-2.png" alt="image showing the
* output of the sample code">

@ -46,7 +46,7 @@ import javax.accessibility.*;
* <p>
* Each scroll bar in this example could be created with
* code similar to the following:
* <p>
*
* <hr><blockquote><pre>
* redSlider=new Scrollbar(Scrollbar.VERTICAL, 0, 1, 0, 255);
* add(redSlider);
@ -65,7 +65,7 @@ import javax.accessibility.*;
* The value range represented by the bubble in this example
* is the <em>visible amount</em>. The horizontal scroll bar
* in this example could be created with code like the following:
* <p>
*
* <hr><blockquote><pre>
* ranger = new Scrollbar(Scrollbar.HORIZONTAL, 0, 60, 0, 300);
* add(ranger);
@ -103,7 +103,7 @@ import javax.accessibility.*;
* <p>
* The <code>AdjustmentEvent</code> class defines five types
* of adjustment event, listed here:
* <p>
*
* <ul>
* <li><code>AdjustmentEvent.TRACK</code> is sent out when the
* user drags the scroll bar's bubble.
@ -136,7 +136,7 @@ import javax.accessibility.*;
* that are associated with scroll bars in previous platform versions.
* The following list gives the adjustment event type,
* and the corresponding JDK&nbsp;1.0 event type it replaces.
* <p>
*
* <ul>
* <li><code>AdjustmentEvent.TRACK</code> replaces
* <code>Event.SCROLL_ABSOLUTE</code>
@ -295,7 +295,7 @@ public class Scrollbar extends Component implements Adjustable, Accessible {
* Constructs a new vertical scroll bar.
* The default properties of the scroll bar are listed in
* the following table:
* <p>
*
* <table border=1 summary="Scrollbar default properties">
* <tr>
* <th>Property</th>
@ -1104,11 +1104,11 @@ public class Scrollbar extends Component implements Adjustable, Accessible {
* This method is not called unless adjustment events are
* enabled for this component. Adjustment events are enabled
* when one of the following occurs:
* <p><ul>
* <ul>
* <li>An <code>AdjustmentListener</code> object is registered
* via <code>addAdjustmentListener</code>.
* <li>Adjustment events are enabled via <code>enableEvents</code>.
* </ul><p>
* </ul>
* <p>Note that if the event parameter is <code>null</code>
* the behavior is unspecified and may result in an
* exception.

@ -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() {
if (!GraphicsEnvironment.isHeadless()) {

@ -361,7 +361,7 @@ public class SystemTray {
/**
* Adds a {@code PropertyChangeListener} to the list of listeners for the
* specific property. The following properties are currently supported:
* <p>
*
* <table border=1 summary="SystemTray properties">
* <tr>
* <th>Property</th>

@ -45,7 +45,7 @@ import javax.accessibility.*;
* style="float:center; margin: 7px 10px;">
* <p>
* This text area could be created by the following line of code:
* <p>
*
* <hr><blockquote><pre>
* new TextArea("Hello", 5, 40);
* </pre></blockquote><hr>

@ -45,7 +45,7 @@ import javax.accessibility.*;
* style="float:center; margin: 7px 10px;">
* <p>
* Here is the code that produces these four text fields:
* <p>
*
* <hr><blockquote><pre>
* TextField tf1, tf2, tf3, tf4;
* // a blank text field
@ -596,7 +596,7 @@ public class TextField extends TextComponent {
* This method is not called unless action events are
* enabled for this component. Action events are enabled
* when one of the following occurs:
* <p><ul>
* <ul>
* <li>An <code>ActionListener</code> object is registered
* via <code>addActionListener</code>.
* <li>Action events are enabled via <code>enableEvents</code>.

@ -80,19 +80,19 @@ import sun.util.CoreResourceBundleControl;
* <br>For example, calling <code>ScrollPane.setScrollPosition</code>
* and then <code>getScrollPosition</code> may return an incorrect
* value if the original request has not yet been processed.
* <p>
*
* <li>Moving the focus from one component to another.
* <br>For more information, see
* <a href="http://docs.oracle.com/javase/tutorial/uiswing/misc/focus.html#transferTiming">Timing
* Focus Transfers</a>, a section in
* <a href="http://java.sun.com/docs/books/tutorial/uiswing/">The Swing
* Tutorial</a>.
* <p>
*
* <li>Making a top-level container visible.
* <br>Calling <code>setVisible(true)</code> on a <code>Window</code>,
* <code>Frame</code> or <code>Dialog</code> may occur
* asynchronously.
* <p>
*
* <li>Setting the size or location of a top-level container.
* <br>Calls to <code>setSize</code>, <code>setBounds</code> or
* <code>setLocation</code> on a <code>Window</code>,

@ -91,7 +91,7 @@ class WaitDispatchSupport implements SecondaryLoop {
*
* @param dispatchThread An event dispatch thread that
* 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
*
* @since 1.7
@ -161,7 +161,7 @@ class WaitDispatchSupport implements SecondaryLoop {
}
/**
* @inheritDoc
* {@inheritDoc}
*/
@Override
public boolean enter() {
@ -281,7 +281,7 @@ class WaitDispatchSupport implements SecondaryLoop {
}
/**
* @inheritDoc
* {@inheritDoc}
*/
public boolean exit() {
if (log.isLoggable(PlatformLogger.Level.FINE)) {

@ -212,7 +212,7 @@ public class Window extends Container implements Accessible {
*
* @serial
* @see #getIconImages
* @see #setIconImages(List<? extends Image>)
* @see #setIconImages
*/
transient java.util.List<Image> icons;

@ -27,7 +27,8 @@
*
*/
/**********************************************************************
/*
**********************************************************************
**********************************************************************
**********************************************************************
*** COPYRIGHT (c) Eastman Kodak Company, 1997 ***

@ -23,7 +23,8 @@
* questions.
*/
/**********************************************************************
/*
**********************************************************************
**********************************************************************
**********************************************************************
*** COPYRIGHT (c) Eastman Kodak Company, 1997 ***
@ -91,7 +92,6 @@ import sun.java2d.cmm.CMSManager;
</pre>
*
* <p>
* @see ICC_ColorSpace
*/

@ -23,7 +23,8 @@
* questions.
*/
/**********************************************************************
/*
**********************************************************************
**********************************************************************
**********************************************************************
*** COPYRIGHT (c) Eastman Kodak Company, 1997 ***
@ -77,7 +78,6 @@ import sun.java2d.cmm.PCMM;
* imported images with a known color space. At most, such applets
* would need to get one of the default color spaces via
* ColorSpace.getInstance().
* <p>
* @see ColorSpace
* @see ICC_Profile
*/
@ -481,7 +481,6 @@ public class ICC_ColorSpace extends ColorSpace {
* be the same as the media white point tag XYZ value in the ICC
* profile for an sRGB device.
* <p>
* <p>
* @param colorvalue a float array with length of at least 3.
* @return a float array with length equal to the number of
* components in this ColorSpace.

@ -23,7 +23,8 @@
* questions.
*/
/**********************************************************************
/*
**********************************************************************
**********************************************************************
**********************************************************************
*** COPYRIGHT (c) Eastman Kodak Company, 1997 ***
@ -86,7 +87,6 @@ import java.security.PrivilegedAction;
* ICC Profile Format Specification. Most profiles of interest
* either have invertible transformations or explicitly specify
* transformations going both directions.
* <p>
* @see ICC_ColorSpace
*/

@ -23,7 +23,8 @@
* questions.
*/
/**********************************************************************
/*
**********************************************************************
**********************************************************************
**********************************************************************
*** COPYRIGHT (c) Eastman Kodak Company, 1997 ***
@ -63,7 +64,6 @@ import sun.java2d.cmm.ProfileDeferralInfo;
</pre>
* The inverse transform is done by converting the PCS Y components to
* device Gray via the inverse of the grayTRC.
* <p>
*/

@ -23,7 +23,8 @@
* questions.
*/
/**********************************************************************
/*
**********************************************************************
**********************************************************************
**********************************************************************
*** COPYRIGHT (c) Eastman Kodak Company, 1997 ***
@ -82,7 +83,6 @@ import sun.java2d.cmm.ProfileDeferralInfo;
* 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
* linear RGB to device RGB through inverses of the TRCs.
* <p>
*/
@ -111,7 +111,7 @@ extends ICC_Profile {
/**
* 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) {

@ -71,7 +71,7 @@ class DnDEventMulticaster extends AWTEventMulticaster
* Handles the <code>DragSourceDragEvent</code> by invoking
* <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) {
((DragSourceListener)a).dragOver(dsde);

@ -37,7 +37,6 @@ package java.awt.dnd;
* to provide appropriate feedback to the end user
* when the operation completes.
* <P>
* <P>
* @since 1.2
*/

@ -197,7 +197,7 @@ public class DropTarget implements DropTargetListener, Serializable {
* <P>
* The Component will receive drops only if it is enabled.
* @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) {
@ -246,7 +246,6 @@ public class DropTarget implements DropTargetListener, Serializable {
* Sets the default acceptable actions for this <code>DropTarget</code>
* <P>
* @param ops the default actions
* <P>
* @see java.awt.dnd.DnDConstants
*/

@ -49,7 +49,7 @@ package java.awt.event;
* methods.
* The relevant method in the listener object is invoked and the {@code MouseEvent}
* 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 the mouse cursor enters or exits the component
* <li>when the mouse wheel rotated, or mouse moved or dragged

@ -57,7 +57,6 @@ import java.awt.geom.AffineTransform;
* <code>FontRenderContext</code> which is directly constructed will
* most likely not represent any actual graphics device, and may lead
* to unexpected or incorrect results.
* <p>
* @see java.awt.RenderingHints#KEY_TEXT_ANTIALIASING
* @see java.awt.RenderingHints#KEY_FRACTIONALMETRICS
* @see java.awt.Graphics2D#getFontRenderContext()

@ -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
* than index.
*/

@ -46,8 +46,7 @@ import java.beans.ConstructorProperties;
* [ y'] = [ m10 m11 m12 ] [ y ] = [ m10x + m11y + m12 ]
* [ 1 ] [ 0 0 1 ] [ 1 ] [ 1 ]
* </pre>
* <p>
* <h4><a name="quadrantapproximation">Handling 90-Degree Rotations</a></h4>
* <h3><a name="quadrantapproximation">Handling 90-Degree Rotations</a></h3>
* <p>
* In some variations of the <code>rotate</code> methods in the
* <code>AffineTransform</code> class, a double-precision argument

@ -1047,7 +1047,7 @@ public abstract class QuadCurve2D implements Shape, Cloneable {
/**
* Evaluate the t values in the first num slots of the vals[] array
* 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
* booleans are true. If an "inflection" equation is handed in,
* then any points which represent a point of inflection for that
@ -1081,7 +1081,7 @@ public abstract class QuadCurve2D implements Shape, Cloneable {
/**
* 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,
* or ABOVE.
*/

@ -54,7 +54,6 @@ import java.awt.Image;
* <p>
* Alternatively, the contents of the back buffer can be copied, or
* <i>blitted</i> forward in a chain instead of moving the video pointer.
* <p>
* <pre>{@code
* Double buffering:
*

@ -927,7 +927,6 @@ public class BufferedImage extends java.awt.Image
* each color component in the returned data when
* using this method. With a specified coordinate (x,&nbsp;y) in the
* image, the ARGB pixel can be accessed in this way:
* <p>
*
* <pre>
* pixel = rgbArray[offset + (y-startY)*scansize + (x-startX)]; </pre>

@ -23,7 +23,8 @@
* questions.
*/
/**********************************************************************
/*
**********************************************************************
**********************************************************************
**********************************************************************
*** COPYRIGHT (c) Eastman Kodak Company, 1997 ***
@ -64,7 +65,6 @@ import java.awt.RenderingHints;
* color conversion.
* <p>
* Note that Source and Destination may be the same object.
* <p>
* @see java.awt.RenderingHints#KEY_COLOR_RENDERING
* @see java.awt.RenderingHints#KEY_DITHERING
*/

@ -41,7 +41,7 @@ public interface CheckboxPeer extends ComponentPeer {
* Sets the state of the checkbox to be checked ({@code true}) or
* 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)
*/

@ -87,7 +87,7 @@ public interface DesktopPeer {
* filling the message fields including to, cc, etc, with the values
* 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
* <a href="http://www.ietf.org/rfc/rfc2368.txt">RFC2368: The mailto
* URL scheme</a>
@ -103,5 +103,5 @@ public interface DesktopPeer {
* @throws IOException If the user default browser is not found,
* 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 {
/**
* Returns a {@code Stream}, the elements of which are lines read from
* 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
* stream operation</a>.
*
@ -550,8 +550,8 @@ public class BufferedReader extends Reader {
* UncheckedIOException} which will be thrown from the {@code Stream}
* 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
* that stream requires reading from the BufferedReader after is it closed
* will cause an UncheckedIOException to be thrown.
* that stream that requires reading from the BufferedReader after it is
* closed, will cause an UncheckedIOException to be thrown.
*
* @return a {@code Stream<String>} providing the lines of text
* described by this {@code BufferedReader}
@ -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 {
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
* ends with the <code>char</code> value at index <tt>end - 1</tt>. The length
* (in <code>char</code>s) of the

@ -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
* contain a {@code Method} object for {@code clone()}.
*
* <p> If this {@code Class} object represents a class or interface with no
* public methods, then the returned array has length 0.
* <p> If this {@code Class} object represents an interface then the
* 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,
* then the returned array has length 0.
@ -1699,25 +1703,29 @@ public final class Class<T> implements java.io.Serializable,
* order. If {@code parameterTypes} is {@code null}, it is
* 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
* 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>
* <LI> C is searched for any <I>matching methods</I>. If no matching
* method is found, the algorithm of step 1 is invoked recursively on
* the superclass of C.</LI>
* <LI> If no method was found in step 1 above, the superinterfaces of C
* are searched for a matching method. If any such method is found, it
* is reflected.</LI>
* <LI> C is searched for a <I>matching method</I>, as defined below. If a
* matching method is found, it is reflected.</LI>
* <LI> If no matching method is found by step 1 then:
* <OL TYPE="a">
* <LI> If C is a class other than {@code Object}, then this algorithm is
* 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>
*
* To find a matching method in a class C:&nbsp; If C declares exactly one
* public method with the specified name and exactly the same formal
* parameter types, that is the method reflected. If more than one such
* method is found in C, and one of these methods has a return type that is
* more specific than any of the others, that method is reflected;
* otherwise one of the methods is chosen arbitrarily.
* <p> To find a matching method in a class or interface C:&nbsp; If C
* declares exactly one public method with the specified name and exactly
* the same formal parameter types, that is the method reflected. If more
* than one such method is found in C, and one of these methods has a
* return type that is more specific than any of the others, that method is
* reflected; otherwise one of the methods is chosen arbitrarily.
*
* <p>Note that there may be more than one matching method in a
* class because while the Java language forbids a class to

@ -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
*

@ -0,0 +1,42 @@
<!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> {
* Karatsuba multiplication will be used. This value is found
* 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.
@ -224,7 +224,7 @@ public class BigInteger extends Number implements Comparable<BigInteger> {
* the mag arrays is greater than this threshold, then Toom-Cook
* 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
@ -232,7 +232,7 @@ public class BigInteger extends Number implements Comparable<BigInteger> {
* Karatsuba squaring will be used. This value is found
* 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
@ -240,15 +240,23 @@ public class BigInteger extends Number implements Comparable<BigInteger> {
* Toom-Cook squaring will be used. This value is found
* 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
* of ints in the number are larger than this value,
* Burnikel-Ziegler division will be used. This value is found
* experimentally to work well.
* of ints in the divisor are larger than this value, Burnikel-Ziegler
* division may be used. This value is found experimentally to work well.
*/
static final int BURNIKEL_ZIEGLER_THRESHOLD = 50;
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_OFFSET = 40;
/**
* The threshold value for using Schoenhage recursive base conversion. If
@ -258,7 +266,7 @@ public class BigInteger extends Number implements Comparable<BigInteger> {
* relatively flat for thresholds between 2-25, so this choice may be
* 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
@ -1815,7 +1823,7 @@ public class BigInteger extends Number implements Comparable<BigInteger> {
int len = mag.length;
if (len <= n) {
return this;
return abs();
}
int lowerInts[] = new int[n];
@ -2017,8 +2025,8 @@ public class BigInteger extends Number implements Comparable<BigInteger> {
* @throws ArithmeticException if {@code val} is zero.
*/
public BigInteger divide(BigInteger val) {
if (mag.length < BURNIKEL_ZIEGLER_THRESHOLD ||
val.mag.length < BURNIKEL_ZIEGLER_THRESHOLD) {
if (val.mag.length < BURNIKEL_ZIEGLER_THRESHOLD ||
mag.length - val.mag.length < BURNIKEL_ZIEGLER_OFFSET) {
return divideKnuth(val);
} else {
return divideBurnikelZiegler(val);
@ -2054,8 +2062,8 @@ public class BigInteger extends Number implements Comparable<BigInteger> {
* @throws ArithmeticException if {@code val} is zero.
*/
public BigInteger[] divideAndRemainder(BigInteger val) {
if (mag.length < BURNIKEL_ZIEGLER_THRESHOLD ||
val.mag.length < BURNIKEL_ZIEGLER_THRESHOLD) {
if (val.mag.length < BURNIKEL_ZIEGLER_THRESHOLD ||
mag.length - val.mag.length < BURNIKEL_ZIEGLER_OFFSET) {
return divideAndRemainderKnuth(val);
} else {
return divideAndRemainderBurnikelZiegler(val);
@ -2083,8 +2091,8 @@ public class BigInteger extends Number implements Comparable<BigInteger> {
* @throws ArithmeticException if {@code val} is zero.
*/
public BigInteger remainder(BigInteger val) {
if (mag.length < BURNIKEL_ZIEGLER_THRESHOLD ||
val.mag.length < BURNIKEL_ZIEGLER_THRESHOLD) {
if (val.mag.length < BURNIKEL_ZIEGLER_THRESHOLD ||
mag.length - val.mag.length < BURNIKEL_ZIEGLER_OFFSET) {
return remainderKnuth(val);
} else {
return remainderBurnikelZiegler(val);

@ -1148,8 +1148,8 @@ class MutableBigInteger {
}
MutableBigInteger divide(MutableBigInteger b, MutableBigInteger quotient, boolean needRemainder) {
if (intLen < BigInteger.BURNIKEL_ZIEGLER_THRESHOLD ||
b.intLen < BigInteger.BURNIKEL_ZIEGLER_THRESHOLD) {
if (b.intLen < BigInteger.BURNIKEL_ZIEGLER_THRESHOLD ||
intLen - b.intLen < BigInteger.BURNIKEL_ZIEGLER_OFFSET) {
return divideKnuth(b, quotient, needRemainder);
} else {
return divideAndRemainderBurnikelZiegler(b, quotient);

@ -336,6 +336,8 @@ public abstract class Provider extends Properties {
* if a security manager exists and its {@link
* java.lang.SecurityManager#checkSecurityAccess} method
* denies access to set property values.
*
* @since 1.8
*/
@Override
public synchronized Object putIfAbsent(Object key, Object value) {
@ -385,6 +387,8 @@ public abstract class Provider extends Properties {
* if a security manager exists and its {@link
* java.lang.SecurityManager#checkSecurityAccess} method
* denies access to remove this provider's properties.
*
* @since 1.8
*/
@Override
public synchronized boolean remove(Object key, Object value) {
@ -408,6 +412,8 @@ public abstract class Provider extends Properties {
* if a security manager exists and its {@link
* java.lang.SecurityManager#checkSecurityAccess} method
* denies access to set property values.
*
* @since 1.8
*/
@Override
public synchronized boolean replace(Object key, Object oldValue,
@ -433,6 +439,8 @@ public abstract class Provider extends Properties {
* if a security manager exists and its {@link
* java.lang.SecurityManager#checkSecurityAccess} method
* denies access to set property values.
*
* @since 1.8
*/
@Override
public synchronized Object replace(Object key, Object value) {
@ -459,6 +467,8 @@ public abstract class Provider extends Properties {
* if a security manager exists and its {@link
* java.lang.SecurityManager#checkSecurityAccess} method
* denies access to set property values.
*
* @since 1.8
*/
@Override
public synchronized void replaceAll(BiFunction<? super Object, ? super Object, ? extends Object> function) {
@ -485,6 +495,8 @@ public abstract class Provider extends Properties {
* if a security manager exists and its {@link
* java.lang.SecurityManager#checkSecurityAccess} method
* denies access to set property values or remove properties.
*
* @since 1.8
*/
@Override
public synchronized Object compute(Object key,
@ -514,6 +526,8 @@ public abstract class Provider extends Properties {
* if a security manager exists and its {@link
* java.lang.SecurityManager#checkSecurityAccess} method
* denies access to set property values and remove properties.
*
* @since 1.8
*/
@Override
public synchronized Object computeIfAbsent(Object key, Function<? super Object, ? extends Object> mappingFunction) {
@ -541,6 +555,8 @@ public abstract class Provider extends Properties {
* if a security manager exists and its {@link
* java.lang.SecurityManager#checkSecurityAccess} method
* denies access to set property values or remove properties.
*
* @since 1.8
*/
@Override
public synchronized Object computeIfPresent(Object key, BiFunction<? super Object, ? super Object, ? extends Object> remappingFunction) {
@ -571,6 +587,8 @@ public abstract class Provider extends Properties {
* if a security manager exists and its {@link
* java.lang.SecurityManager#checkSecurityAccess} method
* denies access to set property values or remove properties.
*
* @since 1.8
*/
@Override
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 {
checkInitialized();
return super.get(key);
}
/**
* @since 1.8
*/
@Override
public synchronized Object getOrDefault(Object key, Object defaultValue) {
checkInitialized();
return super.getOrDefault(key, defaultValue);
}
/**
* @since 1.8
*/
@Override
public synchronized void forEach(BiConsumer<? super Object, ? super Object> action) {
checkInitialized();

@ -1108,7 +1108,7 @@ public interface CallableStatement extends PreparedStatement {
* parameter; if a database access error occurs or
* this method is called on a closed <code>CallableStatement</code>
* @exception SQLFeatureNotSupportedException if
* the JDBC driver does not support this data type
* the JDBC driver does not support the specified targetSqlType
* @see Types
* @see #getObject
* @since 1.4
@ -1131,7 +1131,7 @@ public interface CallableStatement extends PreparedStatement {
* parameter; if a database access error occurs or
* this method is called on a closed <code>CallableStatement</code>
* @exception SQLFeatureNotSupportedException if
* the JDBC driver does not support this data type
* the JDBC driver does not support the specified targetSqlType
* @see #getObject
* @since 1.4
*/
@ -2536,7 +2536,7 @@ public interface CallableStatement extends PreparedStatement {
* or Reader object and the value of the scale parameter is less
* than zero
* @exception SQLFeatureNotSupportedException if
* the JDBC driver does not support this data type
* the JDBC driver does not support the specified targetSqlType
* @see JDBCType
* @see SQLType
*
@ -2562,7 +2562,7 @@ public interface CallableStatement extends PreparedStatement {
* parameter; if a database access error occurs
* or this method is called on a closed {@code CallableStatement}
* @exception SQLFeatureNotSupportedException if
* the JDBC driver does not support this data type
* the JDBC driver does not support the specified targetSqlType
* @see JDBCType
* @see SQLType
* @since 1.8
@ -2603,7 +2603,7 @@ public interface CallableStatement extends PreparedStatement {
* if a database access error occurs or
* this method is called on a closed {@code CallableStatement}
* @exception SQLFeatureNotSupportedException if
* the JDBC driver does not support this data type
* the JDBC driver does not support the specified sqlType
* @see JDBCType
* @see SQLType
* @since 1.8
@ -2639,7 +2639,7 @@ public interface CallableStatement extends PreparedStatement {
* if a database access error occurs or
* this method is called on a closed {@code CallableStatement}
* @exception SQLFeatureNotSupportedException if
* the JDBC driver does not support this data type
* the JDBC driver does not support the specified sqlType
* @see JDBCType
* @see SQLType
* @since 1.8
@ -2686,7 +2686,7 @@ public interface CallableStatement extends PreparedStatement {
* if a database access error occurs or
* this method is called on a closed {@code CallableStatement}
* @exception SQLFeatureNotSupportedException if
* the JDBC driver does not support this data type
* the JDBC driver does not support the specified sqlType
* @see JDBCType
* @see SQLType
* @since 1.8
@ -2725,7 +2725,7 @@ public interface CallableStatement extends PreparedStatement {
* parameter; if a database access error occurs or
* this method is called on a closed {@code CallableStatement}
* @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
* @since 1.8
@ -2762,7 +2762,7 @@ public interface CallableStatement extends PreparedStatement {
* parameter; if a database access error occurs or
* this method is called on a closed {@code CallableStatement}
* @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
* @since 1.8
@ -2811,7 +2811,7 @@ public interface CallableStatement extends PreparedStatement {
* parameter; if a database access error occurs or
* this method is called on a closed {@code CallableStatement}
* @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
* @see JDBCType
* @see SQLType

@ -213,8 +213,8 @@ public class DriverManager {
* The <code>DriverManager</code> attempts to select an appropriate driver from
* the set of registered JDBC drivers.
*<p>
* <B>Note:</B> If a property is specified as part of the {@code url} and
* is also specified in the {@code Properties} object, it is
* <B>Note:</B> If the {@code user} or {@code password} property are
* also specified as part of the {@code url}, it is
* implementation-defined as to which value will take precedence.
* For maximum portability, an application should only specify a
* property once.
@ -320,7 +320,7 @@ public class DriverManager {
* Registers the given driver with the {@code DriverManager}.
* A newly-loaded driver class should call
* 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.
*
* @param driver the new JDBC Driver that is to be registered with the
@ -338,7 +338,7 @@ public class DriverManager {
* Registers the given driver with the {@code DriverManager}.
* A newly-loaded driver class should call
* 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.
*
* @param driver the new JDBC Driver that is to be registered with the
@ -347,6 +347,7 @@ public class DriverManager {
* {@code DriverManager#deregisterDriver} is called
* @exception SQLException if a database access error occurs
* @exception NullPointerException if {@code driver} is null
* @since 1.8
*/
public static synchronized void registerDriver(java.sql.Driver driver,
DriverAction da)

@ -218,8 +218,8 @@ public enum JDBCType implements SQLType {
}
/**
* Returns the name of the data type.
* @return The name of the data type.
*{@inheritDoc }
* @return The name of this {@code SQLType}.
*/
public String getName() {
return name();

@ -401,7 +401,7 @@ public interface PreparedStatement extends Statement {
* marker in the SQL statement; if a database access error occurs or this
* method is called on a closed PreparedStatement
* @exception SQLFeatureNotSupportedException if
* the JDBC driver does not support this data type
* the JDBC driver does not support the specified targetSqlType
* @see Types
*/
void setObject(int parameterIndex, Object x, int targetSqlType)
@ -951,7 +951,7 @@ public interface PreparedStatement extends Statement {
* or Reader object and the value of the scale parameter is less
* than zero
* @exception SQLFeatureNotSupportedException if
* the JDBC driver does not support this data type
* the JDBC driver does not support the specified targetSqlType
* @see Types
*
*/
@ -1255,7 +1255,7 @@ public interface PreparedStatement extends Statement {
* or Reader object and the value of the scale parameter is less
* than zero
* @exception SQLFeatureNotSupportedException if
* the JDBC driver does not support this data type
* the JDBC driver does not support the specified targetSqlType
* @see JDBCType
* @see SQLType
* @since 1.8
@ -1281,7 +1281,7 @@ public interface PreparedStatement extends Statement {
* parameter marker in the SQL statement; if a database access error occurs
* or this method is called on a closed {@code PreparedStatement}
* @exception SQLFeatureNotSupportedException if
* the JDBC driver does not support this data type
* the JDBC driver does not support the specified targetSqlType
* @see JDBCType
* @see SQLType
* @since 1.8

@ -4178,7 +4178,7 @@ public interface ResultSet extends Wrapper, AutoCloseable {
* the result set concurrency is {@code CONCUR_READ_ONLY}
* or this method is called on a closed result set
* @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 SQLType
* @since 1.8
@ -4221,7 +4221,7 @@ public interface ResultSet extends Wrapper, AutoCloseable {
* the result set concurrency is {@code CONCUR_READ_ONLY}
* or this method is called on a closed result set
* @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 SQLType
* @since 1.8
@ -4249,7 +4249,7 @@ public interface ResultSet extends Wrapper, AutoCloseable {
* the result set concurrency is {@code CONCUR_READ_ONLY}
* or this method is called on a closed result set
* @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 SQLType
* @since 1.8
@ -4279,7 +4279,7 @@ public interface ResultSet extends Wrapper, AutoCloseable {
* the result set concurrency is {@code CONCUR_READ_ONLY}
* or this method is called on a closed result set
* @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 SQLType
* @since 1.8

@ -122,7 +122,7 @@ public final class SQLPermission extends BasicPermission {
*
* @param name the name of this <code>SQLPermission</code> object, which must
* 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 IllegalArgumentException if <code>name</code> is empty.
@ -140,7 +140,7 @@ public final class SQLPermission extends BasicPermission {
*
* @param name the name of this <code>SQLPermission</code> object, which must
* be either {@code setLog}, {@code callAbort}, {@code setSyncFactory},
* or {@code setNetworkTimeout}
* {@code deregisterDriver}, or {@code setNetworkTimeout}
* @param actions should be <code>null</code>
* @throws NullPointerException if <code>name</code> is <code>null</code>.
* @throws IllegalArgumentException if <code>name</code> is empty.

@ -350,62 +350,6 @@ public class Base64 {
return ByteBuffer.wrap(dst);
}
/**
* Encodes as many bytes as possible from the input byte buffer
* using the {@link Base64} encoding scheme, writing the resulting
* bytes to the given output byte buffer.
*
* <p>The buffers are read from, and written to, starting at their
* current positions. Upon return, the input and output buffers'
* positions will be advanced to reflect the bytes read and written,
* but their limits will not be modified.
*
* <p>The encoding operation will stop and return if either all
* remaining bytes in the input buffer have been encoded and written
* to the output buffer, or the output buffer has insufficient space
* to encode any more input bytes. The encoding operation can be
* continued, if there is more bytes in input buffer to be encoded,
* by invoking this method again with an output buffer that has more
* {@linkplain java.nio.Buffer#remaining remaining} bytes. This is
* typically done by draining any encoded bytes from the output buffer.
* The value returned from last invocation needs to be passed in as the
* third parameter {@code bytesOut} if it is to continue an unfinished
* encoding, 0 otherwise.
*
* <p><b>Recommended Usage Example</b>
* <pre>
* ByteBuffer src = ...;
* ByteBuffer dst = ...;
* Base64.Encoder enc = Base64.getMimeDecoder();
*
* int bytesOut = 0;
* while (src.hasRemaining()) {
* // clear output buffer for decoding
* dst.clear();
* bytesOut = enc.encode(src, dst, bytesOut);
*
* // read encoded bytes out of "dst"
* dst.flip();
* ...
* }
* </pre>
*
* @param src
* the input byte buffer to encode
* @param dst
* the output byte buffer
* @param bytesOut
* the return value of last invocation if this is to continue
* an unfinished encoding operation, 0 otherwise
* @return The sum total of {@code bytesOut} and the number of bytes
* written to the output ByteBuffer during this invocation.
*/
public int encode(ByteBuffer src, ByteBuffer dst, int bytesOut) {
if (src.hasArray() && dst.hasArray())
return encodeArray(src, dst, bytesOut);
return encodeBuffer(src, dst, bytesOut);
}
/**
* Wraps an output stream for encoding byte data using the {@link Base64}
* encoding scheme.
@ -444,160 +388,6 @@ public class Base64 {
return new Encoder(isURL, newline, linemax, false);
}
private int encodeArray(ByteBuffer src, ByteBuffer dst, int bytesOut) {
char[] base64 = isURL? toBase64URL : toBase64;
byte[] sa = src.array();
int sp = src.arrayOffset() + src.position();
int sl = src.arrayOffset() + src.limit();
byte[] da = dst.array();
int dp = dst.arrayOffset() + dst.position();
int dl = dst.arrayOffset() + dst.limit();
int dp00 = dp;
int dpos = 0; // dp of each line
if (linemax > 0 && bytesOut > 0)
dpos = bytesOut % (linemax + newline.length);
try {
if (dpos == linemax && sp < src.limit()) {
if (dp + newline.length > dl)
return dp - dp00 + bytesOut;
for (byte b : newline){
dst.put(dp++, b);
}
dpos = 0;
}
sl = sp + (sl - sp) / 3 * 3;
while (sp < sl) {
int slen = (linemax > 0) ? (linemax - dpos) / 4 * 3
: sl - sp;
int sl0 = Math.min(sp + slen, sl);
for (int sp0 = sp, dp0 = dp ; sp0 < sl0; ) {
if (dp0 + 4 > dl) {
sp = sp0; dp = dp0;
return dp0 - dp00 + bytesOut;
}
int bits = (sa[sp0++] & 0xff) << 16 |
(sa[sp0++] & 0xff) << 8 |
(sa[sp0++] & 0xff);
da[dp0++] = (byte)base64[(bits >>> 18) & 0x3f];
da[dp0++] = (byte)base64[(bits >>> 12) & 0x3f];
da[dp0++] = (byte)base64[(bits >>> 6) & 0x3f];
da[dp0++] = (byte)base64[bits & 0x3f];
}
int n = (sl0 - sp) / 3 * 4;
dpos += n;
dp += n;
sp = sl0;
if (dpos == linemax && sp < src.limit()) {
if (dp + newline.length > dl)
return dp - dp00 + bytesOut;
for (byte b : newline){
da[dp++] = b;
}
dpos = 0;
}
}
sl = src.arrayOffset() + src.limit();
if (sp < sl && dl >= dp + 4) { // 1 or 2 leftover bytes
int b0 = sa[sp++] & 0xff;
da[dp++] = (byte)base64[b0 >> 2];
if (sp == sl) {
da[dp++] = (byte)base64[(b0 << 4) & 0x3f];
if (doPadding) {
da[dp++] = '=';
da[dp++] = '=';
}
} else {
int b1 = sa[sp++] & 0xff;
da[dp++] = (byte)base64[(b0 << 4) & 0x3f | (b1 >> 4)];
da[dp++] = (byte)base64[(b1 << 2) & 0x3f];
if (doPadding) {
da[dp++] = '=';
}
}
}
return dp - dp00 + bytesOut;
} finally {
src.position(sp - src.arrayOffset());
dst.position(dp - dst.arrayOffset());
}
}
private int encodeBuffer(ByteBuffer src, ByteBuffer dst, int bytesOut) {
char[] base64 = isURL? toBase64URL : toBase64;
int sp = src.position();
int sl = src.limit();
int dp = dst.position();
int dl = dst.limit();
int dp00 = dp;
int dpos = 0; // dp of each line
if (linemax > 0 && bytesOut > 0)
dpos = bytesOut % (linemax + newline.length);
try {
if (dpos == linemax && sp < src.limit()) {
if (dp + newline.length > dl)
return dp - dp00 + bytesOut;
for (byte b : newline){
dst.put(dp++, b);
}
dpos = 0;
}
sl = sp + (sl - sp) / 3 * 3;
while (sp < sl) {
int slen = (linemax > 0) ? (linemax - dpos) / 4 * 3
: sl - sp;
int sl0 = Math.min(sp + slen, sl);
for (int sp0 = sp, dp0 = dp ; sp0 < sl0; ) {
if (dp0 + 4 > dl) {
sp = sp0; dp = dp0;
return dp0 - dp00 + bytesOut;
}
int bits = (src.get(sp0++) & 0xff) << 16 |
(src.get(sp0++) & 0xff) << 8 |
(src.get(sp0++) & 0xff);
dst.put(dp0++, (byte)base64[(bits >>> 18) & 0x3f]);
dst.put(dp0++, (byte)base64[(bits >>> 12) & 0x3f]);
dst.put(dp0++, (byte)base64[(bits >>> 6) & 0x3f]);
dst.put(dp0++, (byte)base64[bits & 0x3f]);
}
int n = (sl0 - sp) / 3 * 4;
dpos += n;
dp += n;
sp = sl0;
if (dpos == linemax && sp < src.limit()) {
if (dp + newline.length > dl)
return dp - dp00 + bytesOut;
for (byte b : newline){
dst.put(dp++, b);
}
dpos = 0;
}
}
if (sp < src.limit() && dl >= dp + 4) { // 1 or 2 leftover bytes
int b0 = src.get(sp++) & 0xff;
dst.put(dp++, (byte)base64[b0 >> 2]);
if (sp == src.limit()) {
dst.put(dp++, (byte)base64[(b0 << 4) & 0x3f]);
if (doPadding) {
dst.put(dp++, (byte)'=');
dst.put(dp++, (byte)'=');
}
} else {
int b1 = src.get(sp++) & 0xff;
dst.put(dp++, (byte)base64[(b0 << 4) & 0x3f | (b1 >> 4)]);
dst.put(dp++, (byte)base64[(b1 << 2) & 0x3f]);
if (doPadding) {
dst.put(dp++, (byte)'=');
}
}
}
return dp - dp00 + bytesOut;
} finally {
src.position(sp);
dst.position(dp);
}
}
private int encode0(byte[] src, int off, int end, byte[] dst) {
char[] base64 = isURL ? toBase64URL : toBase64;
int sp = off;
@ -657,20 +447,11 @@ public class Base64 {
* required. So if the final unit of the encoded byte data only has
* two or three Base64 characters (without the corresponding padding
* character(s) padded), they are decoded as if followed by padding
* character(s).
* <p>
* For decoders that use the <a href="#basic">Basic</a> and
* <a href="#url">URL and Filename safe</a> type base64 scheme, and
* if there is padding character present in the final unit, the
* correct number of padding character(s) must be present, otherwise
* {@code IllegalArgumentException} ({@code IOException} when reading
* from a Base64 stream) is thrown during decoding.
* <p>
* Decoders that use the <a href="#mime">MIME</a> type base64 scheme
* are more lenient when decoding the padding character(s). If the
* padding character(s) is incorrectly encoded, the first padding
* character encountered is interpreted as the end of the encoded byte
* data, the decoding operation will then end and return normally.
* character(s). If there is a padding character present in the
* final unit, the correct number of padding character(s) must be
* present, otherwise {@code IllegalArgumentException} (
* {@code IOException} when reading from a Base64 stream) is thrown
* during decoding.
*
* <p> Instances of {@link Decoder} class are safe for use by
* multiple concurrent threads.
@ -810,6 +591,10 @@ public class Base64 {
* output buffer's position will be zero and its limit will be the
* number of resulting decoded bytes
*
* <p> {@code IllegalArgumentException} is thrown if the input buffer
* is not in valid Base64 encoding scheme. The position of the input
* buffer will not be advanced in this case.
*
* @param buffer
* the ByteBuffer to decode
*
@ -842,76 +627,6 @@ public class Base64 {
}
}
/**
* Decodes as many bytes as possible from the input byte buffer
* using the {@link Base64} encoding scheme, writing the resulting
* bytes to the given output byte buffer.
*
* <p>The buffers are read from, and written to, starting at their
* current positions. Upon return, the input and output buffers'
* positions will be advanced to reflect the bytes read and written,
* but their limits will not be modified.
*
* <p> If the input buffer is not in valid Base64 encoding scheme
* then some bytes may have been written to the output buffer
* before IllegalArgumentException is thrown. The positions of
* both input and output buffer will not be advanced in this case.
*
* <p>The decoding operation will end and return if all remaining
* bytes in the input buffer have been decoded and written to the
* output buffer.
*
* <p> The decoding operation will stop and return if the output
* buffer has insufficient space to decode any more input bytes.
* The decoding operation can be continued, if there is more bytes
* in input buffer to be decoded, by invoking this method again with
* an output buffer that has more {@linkplain java.nio.Buffer#remaining
* remaining} bytes. This is typically done by draining any decoded
* bytes from the output buffer.
*
* <p><b>Recommended Usage Example</b>
* <pre>
* ByteBuffer src = ...;
* ByteBuffer dst = ...;
* Base64.Decoder dec = Base64.getDecoder();
*
* while (src.hasRemaining()) {
*
* // prepare the output byte buffer
* dst.clear();
* dec.decode(src, dst);
*
* // read bytes from the output buffer
* dst.flip();
* ...
* }
* </pre>
*
* @param src
* the input byte buffer to decode
* @param dst
* the output byte buffer
*
* @return The number of bytes written to the output byte buffer during
* this decoding invocation
*
* @throws IllegalArgumentException
* if {@code src} is not in valid Base64 scheme.
*/
public int decode(ByteBuffer src, ByteBuffer dst) {
int sp0 = src.position();
int dp0 = dst.position();
try {
if (src.hasArray() && dst.hasArray())
return decodeArray(src, dst);
return decodeBuffer(src, dst);
} catch (IllegalArgumentException iae) {
src.position(sp0);
dst.position(dp0);
throw iae;
}
}
/**
* Returns an input stream for decoding {@link Base64} encoded byte stream.
*
@ -932,150 +647,6 @@ public class Base64 {
return new DecInputStream(is, isURL ? fromBase64URL : fromBase64, isMIME);
}
private int decodeArray(ByteBuffer src, ByteBuffer dst) {
int[] base64 = isURL ? fromBase64URL : fromBase64;
int bits = 0;
int shiftto = 18; // pos of first byte of 4-byte atom
byte[] sa = src.array();
int sp = src.arrayOffset() + src.position();
int sl = src.arrayOffset() + src.limit();
byte[] da = dst.array();
int dp = dst.arrayOffset() + dst.position();
int dl = dst.arrayOffset() + dst.limit();
int dp0 = dp;
int mark = sp;
try {
while (sp < sl) {
int b = sa[sp++] & 0xff;
if ((b = base64[b]) < 0) {
if (b == -2) { // padding byte
if (!isMIME &&
(shiftto == 6 && (sp == sl || sa[sp++] != '=') ||
shiftto == 18)) {
throw new IllegalArgumentException(
"Input byte array has wrong 4-byte ending unit");
}
break;
}
if (isMIME) // skip if for rfc2045
continue;
else
throw new IllegalArgumentException(
"Illegal base64 character " +
Integer.toString(sa[sp - 1], 16));
}
bits |= (b << shiftto);
shiftto -= 6;
if (shiftto < 0) {
if (dl < dp + 3)
return dp - dp0;
da[dp++] = (byte)(bits >> 16);
da[dp++] = (byte)(bits >> 8);
da[dp++] = (byte)(bits);
shiftto = 18;
bits = 0;
mark = sp;
}
}
if (shiftto == 6) {
if (dl - dp < 1)
return dp - dp0;
da[dp++] = (byte)(bits >> 16);
} else if (shiftto == 0) {
if (dl - dp < 2)
return dp - dp0;
da[dp++] = (byte)(bits >> 16);
da[dp++] = (byte)(bits >> 8);
} else if (shiftto == 12) {
throw new IllegalArgumentException(
"Last unit does not have enough valid bits");
}
if (sp < sl) {
if (isMIME)
sp = sl;
else
throw new IllegalArgumentException(
"Input byte array has incorrect ending byte at " + sp);
}
mark = sp;
return dp - dp0;
} finally {
src.position(mark);
dst.position(dp);
}
}
private int decodeBuffer(ByteBuffer src, ByteBuffer dst) {
int[] base64 = isURL ? fromBase64URL : fromBase64;
int bits = 0;
int shiftto = 18; // pos of first byte of 4-byte atom
int sp = src.position();
int sl = src.limit();
int dp = dst.position();
int dl = dst.limit();
int dp0 = dp;
int mark = sp;
try {
while (sp < sl) {
int b = src.get(sp++) & 0xff;
if ((b = base64[b]) < 0) {
if (b == -2) { // padding byte
if (!isMIME &&
(shiftto == 6 && (sp == sl || src.get(sp++) != '=') ||
shiftto == 18)) {
throw new IllegalArgumentException(
"Input byte array has wrong 4-byte ending unit");
}
break;
}
if (isMIME) // skip if for rfc2045
continue;
else
throw new IllegalArgumentException(
"Illegal base64 character " +
Integer.toString(src.get(sp - 1), 16));
}
bits |= (b << shiftto);
shiftto -= 6;
if (shiftto < 0) {
if (dl < dp + 3)
return dp - dp0;
dst.put(dp++, (byte)(bits >> 16));
dst.put(dp++, (byte)(bits >> 8));
dst.put(dp++, (byte)(bits));
shiftto = 18;
bits = 0;
mark = sp;
}
}
if (shiftto == 6) {
if (dl - dp < 1)
return dp - dp0;
dst.put(dp++, (byte)(bits >> 16));
} else if (shiftto == 0) {
if (dl - dp < 2)
return dp - dp0;
dst.put(dp++, (byte)(bits >> 16));
dst.put(dp++, (byte)(bits >> 8));
} else if (shiftto == 12) {
throw new IllegalArgumentException(
"Last unit does not have enough valid bits");
}
if (sp < sl) {
if (isMIME)
sp = sl;
else
throw new IllegalArgumentException(
"Input byte array has incorrect ending byte at " + sp);
}
mark = sp;
return dp - dp0;
} finally {
src.position(mark);
dst.position(dp);
}
}
private int outLength(byte[] src, int sp, int sl) {
int[] base64 = isURL ? fromBase64URL : fromBase64;
int paddings = 0;
@ -1123,14 +694,13 @@ public class Base64 {
int b = src[sp++] & 0xff;
if ((b = base64[b]) < 0) {
if (b == -2) { // padding byte '='
if (!isMIME && // be lenient for rfc2045
// = shiftto==18 unnecessary padding
// x= shiftto==12 a dangling single x
// x to be handled together with non-padding case
// xx= shiftto==6&&sp==sl missing last =
// xx=y shiftto==6 last is not =
(shiftto == 6 && (sp == sl || src[sp++] != '=') ||
shiftto == 18)) {
// = shiftto==18 unnecessary padding
// x= shiftto==12 a dangling single x
// x to be handled together with non-padding case
// xx= shiftto==6&&sp==sl missing last =
// xx=y shiftto==6 last is not =
if (shiftto == 6 && (sp == sl || src[sp++] != '=') ||
shiftto == 18) {
throw new IllegalArgumentException(
"Input byte array has wrong 4-byte ending unit");
}
@ -1160,14 +730,15 @@ public class Base64 {
dst[dp++] = (byte)(bits >> 16);
dst[dp++] = (byte)(bits >> 8);
} else if (shiftto == 12) {
// dangling single "x", throw exception even in lenient mode,
// it's incorrectly encoded.
// dangling single "x", incorrectly encoded.
throw new IllegalArgumentException(
"Last unit does not have enough valid bits");
}
// anything left is invalid, if is not MIME.
// if MIME (lenient), just ignore all leftover
if (sp < sl && !isMIME) {
// if MIME, ignore all non-base64 character
while (sp < sl) {
if (isMIME && base64[src[sp++]] < 0)
continue;
throw new IllegalArgumentException(
"Input byte array has incorrect ending byte at " + sp);
}
@ -1367,26 +938,16 @@ public class Base64 {
// xx=y or last is not '='
if (nextin == 18 || nextin == 12 ||
nextin == 6 && is.read() != '=') {
if (!isMIME || nextin == 12) {
throw new IOException("Illegal base64 ending sequence:" + nextin);
} else if (nextin != 18) {
// lenient mode for mime
// (1) handle the "unnecessary padding in "xxxx ="
// case as the eof (nextin == 18)
// (2) decode "xx=" and "xx=y" normally
b[off++] = (byte)(bits >> (16));
len--;
}
} else {
b[off++] = (byte)(bits >> (16));
len--;
if (nextin == 0) { // only one padding byte
if (len == 0) { // no enough output space
bits >>= 8; // shift to lowest byte
nextout = 0;
} else {
b[off++] = (byte) (bits >> 8);
}
throw new IOException("Illegal base64 ending sequence:" + nextin);
}
b[off++] = (byte)(bits >> (16));
len--;
if (nextin == 0) { // only one padding byte
if (len == 0) { // no enough output space
bits >>= 8; // shift to lowest byte
nextout = 0;
} else {
b[off++] = (byte) (bits >> 8);
}
}
eof = true;

@ -63,6 +63,7 @@ import java.util.stream.Collector;
public class DoubleSummaryStatistics implements DoubleConsumer {
private long count;
private double sum;
private double sumCompensation; // Low order bits of sum
private double min = Double.POSITIVE_INFINITY;
private double max = Double.NEGATIVE_INFINITY;
@ -81,7 +82,7 @@ public class DoubleSummaryStatistics implements DoubleConsumer {
@Override
public void accept(double value) {
++count;
sum += value;
sumWithCompensation(value);
min = Math.min(min, value);
max = Math.max(max, value);
}
@ -95,11 +96,23 @@ public class DoubleSummaryStatistics implements DoubleConsumer {
*/
public void combine(DoubleSummaryStatistics other) {
count += other.count;
sum += other.sum;
sumWithCompensation(other.sum);
sumWithCompensation(other.sumCompensation);
min = Math.min(min, other.min);
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.
*
@ -133,7 +146,8 @@ public class DoubleSummaryStatistics implements DoubleConsumer {
* @return the sum of values, or zero if none
*/
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;
* }
* </pre>
* </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 PropertyResourceBundle
* @since JDK1.1

@ -40,6 +40,11 @@ import java.util.function.Supplier;
* {@link #ifPresent(java.util.function.Consumer) ifPresent()} (execute a block
* 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
*/
public final class Optional<T> {

@ -31,7 +31,7 @@ import java.util.function.Supplier;
/**
* 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
* {@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
* value are provided, such as {@link #orElse(double) orElse()}
@ -39,6 +39,11 @@ import java.util.function.Supplier;
* {@link #ifPresent(java.util.function.DoubleConsumer) ifPresent()} (execute a block
* 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
*/
public final class OptionalDouble {

@ -31,7 +31,7 @@ import java.util.function.Supplier;
/**
* 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
* {@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
* value are provided, such as {@link #orElse(int) orElse()}
@ -39,6 +39,11 @@ import java.util.function.Supplier;
* {@link #ifPresent(java.util.function.IntConsumer) ifPresent()} (execute a block
* 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
*/
public final class OptionalInt {

@ -31,7 +31,7 @@ import java.util.function.Supplier;
/**
* 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
* {@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
* value are provided, such as {@link #orElse(long) orElse()}
@ -39,6 +39,11 @@ import java.util.function.Supplier;
* {@link #ifPresent(java.util.function.LongConsumer) ifPresent()} (execute a block
* 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
*/
public final class OptionalLong {

@ -100,6 +100,11 @@ import sun.util.ResourceBundleEnumeration;
* </blockquote>
*
* <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
* from an InputStream or a Reader, which represents a property file.
* Constructing a PropertyResourceBundle instance from an InputStream requires

@ -184,6 +184,13 @@ import sun.util.locale.LocaleObjectCache;
* subclass. Your subclasses must override two methods: <code>handleGetObject</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>
*
* The {@link ResourceBundle.Control} class provides information necessary

@ -131,7 +131,7 @@ public final class StringJoiner {
/**
* Sets the sequence of characters to be used when determining the string
* 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
* called, the {@code StringJoiner} is no longer considered empty, even if
* the element(s) added correspond to the empty {@code String}.
@ -228,8 +228,8 @@ public final class StringJoiner {
}
/**
* The length of the {@code StringJoiner} value, i.e. the length of
* {@code String} representation of the {@code StringJoiner}. Note that if
* Returns the length of the {@code String} representation
* of this {@code StringJoiner}. Note that if
* no add methods have been called, then the length of the {@code String}
* representation (either {@code prefix + suffix} or {@code emptyValue})
* will be returned. The value should be equivalent to

@ -54,6 +54,7 @@ package java.util.concurrent;
* @author Doug Lea
* @param <V> the result type of method {@code call}
*/
@FunctionalInterface
public interface Callable<V> {
/**
* 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> {
}
if (dst == null)
dst = new CompletableFuture<U>();
if (e == null || ex != null)
if (ex != null)
dst.internalComplete(null, ex);
}
helpPostComplete();

@ -49,7 +49,6 @@ import java.util.Hashtable;
import java.util.Iterator;
import java.util.Map;
import java.util.NoSuchElementException;
import java.util.Objects;
import java.util.Set;
import java.util.Spliterator;
import java.util.concurrent.ConcurrentMap;
@ -381,19 +380,21 @@ public class ConcurrentHashMap<K,V> extends AbstractMap<K,V>
* progress. Resizing proceeds by transferring bins, one by one,
* from the table to the next table. However, threads claim small
* blocks of indices to transfer (via field transferIndex) before
* doing so, reducing contention. Because we are using
* power-of-two expansion, the elements from each bin must either
* stay at same index, or move with a power of two offset. We
* eliminate unnecessary node creation by catching cases where old
* nodes can be reused because their next fields won't change. On
* average, only about one-sixth of them need cloning when a table
* doubles. The nodes they replace will be garbage collectable as
* soon as they are no longer referenced by any reader thread that
* may be in the midst of concurrently traversing table. Upon
* transfer, the old table bin contains only a special forwarding
* node (with hash field "MOVED") that contains the next table as
* its key. On encountering a forwarding node, access and update
* operations restart, using the new table.
* doing so, reducing contention. A generation stamp in field
* sizeCtl ensures that resizings do not overlap. Because we are
* using power-of-two expansion, the elements from each bin must
* either stay at same index, or move with a power of two
* offset. We eliminate unnecessary node creation by catching
* cases where old nodes can be reused because their next fields
* won't change. On average, only about one-sixth of them need
* cloning when a table doubles. The nodes they replace will be
* garbage collectable as soon as they are no longer referenced by
* any reader thread that may be in the midst of concurrently
* traversing table. Upon transfer, the old table bin contains
* only a special forwarding node (with hash field "MOVED") that
* 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
* waiting for locks while resizing. However, because other
@ -570,6 +571,23 @@ public class ConcurrentHashMap<K,V> extends AbstractMap<K,V>
*/
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.
*/
@ -727,7 +745,7 @@ public class ConcurrentHashMap<K,V> extends AbstractMap<K,V>
* errors by users, these checks must operate on local variables,
* which accounts for some odd-looking inline assignments below.
* 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
* writes to be conservative.
*/
@ -2191,6 +2209,14 @@ public class ConcurrentHashMap<K,V> extends AbstractMap<K,V>
/* ---------------- 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.
*/
@ -2245,17 +2271,20 @@ public class ConcurrentHashMap<K,V> extends AbstractMap<K,V>
s = sumCount();
}
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 &&
tab.length < MAXIMUM_CAPACITY) {
(n = tab.length) < MAXIMUM_CAPACITY) {
int rs = resizeStamp(n);
if (sc < 0) {
if (sc == -1 || transferIndex <= 0 ||
(nt = nextTable) == null)
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))
if (U.compareAndSwapInt(this, SIZECTL, sc, sc + 1))
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);
s = sumCount();
}
@ -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) {
Node<K,V>[] nextTab; int sc;
if ((f instanceof ForwardingNode) &&
if (tab != null && (f instanceof ForwardingNode) &&
(nextTab = ((ForwardingNode<K,V>)f).nextTable) != null) {
while (transferIndex > 0 && nextTab == nextTable &&
(sc = sizeCtl) < -1) {
if (U.compareAndSwapInt(this, SIZECTL, sc, sc - 1)) {
int rs = resizeStamp(tab.length);
while (nextTab == nextTable && table == tab &&
(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);
break;
}
@ -2309,9 +2342,21 @@ public class ConcurrentHashMap<K,V> extends AbstractMap<K,V>
}
else if (c <= sc || n >= MAXIMUM_CAPACITY)
break;
else if (tab == table &&
U.compareAndSwapInt(this, SIZECTL, sc, -2))
transfer(tab, null);
else if (tab == table) {
int rs = resizeStamp(n);
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>
sizeCtl = (n << 1) - (n >>> 1);
return;
}
if (U.compareAndSwapInt(this, SIZECTL, sc = sizeCtl, ++sc)) {
if (sc != -1)
if (U.compareAndSwapInt(this, SIZECTL, sc = sizeCtl, sc - 1)) {
if ((sc - 2) != resizeStamp(n) << RESIZE_STAMP_SHIFT)
return;
finishing = advance = true;
i = n; // recheck before commit
@ -2566,11 +2611,8 @@ public class ConcurrentHashMap<K,V> extends AbstractMap<K,V>
private final void treeifyBin(Node<K,V>[] tab, int index) {
Node<K,V> b; int n, sc;
if (tab != null) {
if ((n = tab.length) < MIN_TREEIFY_CAPACITY) {
if (tab == table && (sc = sizeCtl) >= 0 &&
U.compareAndSwapInt(this, SIZECTL, sc, -2))
transfer(tab, null);
}
if ((n = tab.length) < MIN_TREEIFY_CAPACITY)
tryPresize(n << 1);
else if ((b = tabAt(tab, index)) != null && b.hash >= 0) {
synchronized (b) {
if (tabAt(tab, index) == b) {
@ -2768,7 +2810,7 @@ public class ConcurrentHashMap<K,V> extends AbstractMap<K,V>
private final void contendedLock() {
boolean waiting = false;
for (int s;;) {
if (((s = lockState) & WRITER) == 0) {
if (((s = lockState) & ~WAITER) == 0) {
if (U.compareAndSwapInt(this, LOCKSTATE, s, WRITER)) {
if (waiting)
waiter = null;
@ -2793,12 +2835,13 @@ public class ConcurrentHashMap<K,V> extends AbstractMap<K,V>
*/
final Node<K,V> find(int h, Object k) {
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;
if (((s = lockState) & (WAITER|WRITER)) != 0) {
if (e.hash == h &&
((ek = e.key) == k || (ek != null && k.equals(ek))))
return e;
e = e.next;
}
else if (U.compareAndSwapInt(this, LOCKSTATE, s,
s + READER)) {
@ -4454,7 +4497,7 @@ public class ConcurrentHashMap<K,V> extends AbstractMap<K,V>
}
public final boolean removeAll(Collection<?> c) {
Objects.requireNonNull(c);
if (c == null) throw new NullPointerException();
boolean modified = false;
for (Iterator<E> it = iterator(); it.hasNext();) {
if (c.contains(it.next())) {
@ -4466,7 +4509,7 @@ public class ConcurrentHashMap<K,V> extends AbstractMap<K,V>
}
public final boolean retainAll(Collection<?> c) {
Objects.requireNonNull(c);
if (c == null) throw new NullPointerException();
boolean modified = false;
for (Iterator<E> it = iterator(); it.hasNext();) {
if (!c.contains(it.next())) {

@ -146,7 +146,14 @@ public class LogManager {
// The global LogManager object
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;
// The map of the registered listeners. The map value is the registration
@ -670,7 +677,7 @@ public class LogManager {
if (logger == null) {
// Hashtable holds stale weak reference
// to a logger which has been GC-ed.
removeLogger(name);
ref.dispose();
}
return logger;
}
@ -756,7 +763,7 @@ public class LogManager {
// It's possible that the Logger was GC'ed after a
// drainLoggerRefQueueBounded() call above so allow
// a new one to be registered.
removeLogger(name);
ref.dispose();
} else {
// We already have a registered logger with the given name.
return false;
@ -808,10 +815,8 @@ public class LogManager {
return true;
}
// note: all calls to removeLogger are synchronized on LogManager's
// intrinsic lock
void removeLogger(String name) {
namedLoggers.remove(name);
synchronized void removeLoggerRef(String name, LoggerWeakRef ref) {
namedLoggers.remove(name, ref);
}
synchronized Enumeration<String> getLoggerNames() {
@ -993,6 +998,7 @@ public class LogManager {
private String name; // for namedLoggers cleanup
private LogNode node; // for loggerRef cleanup
private WeakReference<Logger> parentRef; // for kids cleanup
private boolean disposed = false; // avoid calling dispose twice
LoggerWeakRef(Logger logger) {
super(logger, loggerRefQueue);
@ -1002,14 +1008,45 @@ public class LogManager {
// dispose of this LoggerWeakRef object
void dispose() {
if (node != null) {
// if we have a LogNode, then we were a named Logger
// so clear namedLoggers weak ref to us
node.context.removeLogger(name);
name = null; // clear our ref to the Logger's name
// Avoid calling dispose twice. When a Logger is gc'ed, its
// LoggerWeakRef will be enqueued.
// However, a new logger of the same name may be added (or looked
// up) before the queue is drained. When that happens, dispose()
// will be called by addLocalLogger() or findLogger().
// Later when the queue is drained, dispose() will be called again
// for the same LoggerWeakRef. Marking LoggerWeakRef as disposed
// 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;
}
node.loggerRef = null; // clear LogNode's weak ref to us
node = null; // clear our ref to LogNode
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) {
@ -1062,7 +1099,7 @@ public class LogManager {
// - maximum: 10.9 ms
//
private final static int MAX_ITERATIONS = 400;
final synchronized void drainLoggerRefQueueBounded() {
final void drainLoggerRefQueueBounded() {
for (int i = 0; i < MAX_ITERATIONS; i++) {
if (loggerRefQueue == null) {
// haven't finished loading LogManager yet

@ -218,12 +218,46 @@ import sun.reflect.Reflection;
public class Logger {
private static final Handler emptyHandlers[] = new Handler[0];
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 final CopyOnWriteArrayList<Handler> handlers =
new CopyOnWriteArrayList<>();
private String resourceBundleName; // Base name of the bundle.
private ResourceBundle userBundle; // Bundle set through setResourceBundle.
private volatile LoggerBundle loggerBundle = NO_RESOURCE_BUNDLE;
private volatile boolean useParentHandlers = true;
private volatile Filter filter;
private boolean anonymous;
@ -641,7 +675,7 @@ public class Logger {
* @return localization bundle name (may be {@code null})
*/
public String getResourceBundleName() {
return resourceBundleName;
return loggerBundle.resourceBundleName;
}
/**
@ -710,8 +744,9 @@ public class Logger {
// resource bundle and then call "void log(LogRecord)".
private void doLog(LogRecord lr) {
lr.setLoggerName(name);
final ResourceBundle bundle = getEffectiveResourceBundle();
final String ebname = getEffectiveResourceBundleName();
final LoggerBundle lb = getEffectiveLoggerBundle();
final ResourceBundle bundle = lb.userBundle;
final String ebname = lb.resourceBundleName;
if (ebname != null && bundle != null) {
lr.setResourceBundleName(ebname);
lr.setResourceBundle(bundle);
@ -1757,8 +1792,6 @@ public class Logger {
return useParentHandlers;
}
static final String SYSTEM_LOGGER_RB_NAME = "sun.util.logging.resources.logging";
private static ResourceBundle findSystemResourceBundle(final Locale locale) {
// the resource bundle is in a restricted package
return AccessController.doPrivileged(new PrivilegedAction<ResourceBundle>() {
@ -1801,11 +1834,12 @@ public class Logger {
}
Locale currentLocale = Locale.getDefault();
final LoggerBundle lb = loggerBundle;
// Normally we should hit on our simple one entry cache.
if (userBundle != null &&
name.equals(resourceBundleName)) {
return userBundle;
if (lb.userBundle != null &&
name.equals(lb.resourceBundleName)) {
return lb.userBundle;
} else if (catalog != null && currentLocale.equals(catalogLocale)
&& name.equals(catalogName)) {
return catalog;
@ -1864,17 +1898,18 @@ public class Logger {
// Synchronized to prevent races in setting the fields.
private synchronized void setupResourceInfo(String name,
Class<?> callersClass) {
if (resourceBundleName != null) {
final LoggerBundle lb = loggerBundle;
if (lb.resourceBundleName != null) {
// 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
return;
}
// cannot change ResourceBundles once they are set
throw new IllegalArgumentException(
resourceBundleName + " != " + name);
lb.resourceBundleName + " != " + name);
}
if (name == null) {
@ -1890,7 +1925,10 @@ public class Logger {
throw new MissingResourceException("Can't find " + name + " bundle",
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 {
}
synchronized (this) {
final boolean canReplaceResourceBundle = resourceBundleName == null
|| resourceBundleName.equals(baseName);
LoggerBundle lb = loggerBundle;
final boolean canReplaceResourceBundle = lb.resourceBundleName == null
|| lb.resourceBundleName.equals(baseName);
if (!canReplaceResourceBundle) {
throw new IllegalArgumentException("can't replace resource bundle");
}
userBundle = bundle;
resourceBundleName = baseName;
loggerBundle = LoggerBundle.get(baseName, bundle);
}
}
@ -2082,45 +2120,44 @@ public class Logger {
// Private method to get the potentially inherited
// resource bundle name for this Logger.
// May return null
private String getEffectiveResourceBundleName() {
Logger target = this;
// resource bundle and resource bundle name for this Logger.
// This method never returns null.
private LoggerBundle getEffectiveLoggerBundle() {
final LoggerBundle lb = loggerBundle;
if (lb.isSystemBundle()) {
return SYSTEM_BUNDLE;
}
// first take care of this logger
final ResourceBundle b = getResourceBundle();
if (b != null && b == lb.userBundle) {
return lb;
} else if (b != null) {
// 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) {
String rbn = target.getResourceBundleName();
if (rbn != null) {
return rbn;
final LoggerBundle trb = target.loggerBundle;
if (trb.isSystemBundle()) {
return SYSTEM_BUNDLE;
}
if (trb.userBundle != null) {
return trb;
}
final String rbName = target.getResourceBundleName();
if (rbName != null) {
return LoggerBundle.get(rbName,
findResourceBundle(rbName, true));
}
target = target.getParent();
}
return null;
}
private ResourceBundle getEffectiveResourceBundle() {
Logger target = this;
if (SYSTEM_LOGGER_RB_NAME.equals(resourceBundleName)) return null;
ResourceBundle localRB = getResourceBundle();
if (localRB != null) {
return localRB;
}
while (target != null) {
final ResourceBundle rb = target.userBundle;
if (rb != null) {
return rb;
}
final String rbn = target.getResourceBundleName();
if (rbn != null) {
if (!SYSTEM_LOGGER_RB_NAME.equals(rbn)) {
return findResourceBundle(rbn, true);
} else {
return null;
}
}
target = target.getParent();
}
return null;
return NO_RESOURCE_BUNDLE;
}
}

@ -505,13 +505,42 @@ public final class Collectors {
*/
public static <T> Collector<T, ?, Double>
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<>(
() -> new double[1],
(a, t) -> { a[0] += mapper.applyAsDouble(t); },
(a, b) -> { a[0] += b[0]; return a; },
a -> a[0], CH_NOID);
() -> new double[2],
(a, t) -> { sumWithCompensation(a, mapper.applyAsDouble(t)); },
(a, b) -> { sumWithCompensation(a, b[0]); return sumWithCompensation(a, b[1]); },
// 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
* function applied to the input elements. If no elements are present,
@ -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
* 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 mapper a function extracting the property to be summed
* @return a {@code Collector} that produces the sum of a derived property
*/
public static <T> Collector<T, ?, Double>
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<>(
() -> new double[2],
(a, t) -> { a[0] += mapper.applyAsDouble(t); a[1]++; },
(a, b) -> { a[0] += b[0]; a[1] += b[1]; return a; },
a -> (a[1] == 0) ? 0.0d : a[0] / a[1], CH_NOID);
() -> new double[3],
(a, t) -> { sumWithCompensation(a, mapper.applyAsDouble(t)); a[2]++; },
(a, b) -> { sumWithCompensation(a, b[0]); sumWithCompensation(a, b[1]); a[2] += b[2]; return a; },
// 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>
@Override
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
@ -391,20 +406,37 @@ abstract class DoublePipeline<E_IN>
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
public final OptionalDouble average() {
double[] avg = collect(() -> new double[2],
(ll, i) -> {
ll[0]++;
ll[1] += i;
/*
* 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.
*/
double[] avg = collect(() -> new double[3],
(ll, d) -> {
ll[2]++;
Collectors.sumWithCompensation(ll, d);
},
(ll, rr) -> {
ll[0] += rr[0];
ll[1] += rr[1];
Collectors.sumWithCompensation(ll, rr[0]);
Collectors.sumWithCompensation(ll, rr[1]);
ll[2] += rr[2];
});
return avg[0] > 0
? OptionalDouble.of(avg[1] / avg[0])
: OptionalDouble.empty();
return avg[2] > 0
// Better error bounds to add both terms as the final sum to compute average
? OptionalDouble.of((avg[0] + avg[1]) / avg[2])
: OptionalDouble.empty();
}
@Override

@ -62,17 +62,17 @@ import sun.security.jca.*;
* algorithm (e.g., <i>DES</i>), and may be followed by a feedback mode and
* padding scheme.
*
* <p> A transformation is of the form:<p>
* <p> A transformation is of the form:
*
* <ul>
* <li>"<i>algorithm/mode/padding</i>" or
* <p>
*
* <li>"<i>algorithm</i>"
* </ul>
*
* <P> (in the latter case,
* 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>
* Cipher c = Cipher.getInstance("<i>DES/CBC/PKCS5Padding</i>");

@ -62,17 +62,17 @@ import java.nio.ByteBuffer;
* algorithm (e.g., <i>DES</i>), and may be followed by a feedback mode and
* padding scheme.
*
* <p> A transformation is of the form:<p>
* <p> A transformation is of the form:
*
* <ul>
* <li>"<i>algorithm/mode/padding</i>" or
* <p>
*
* <li>"<i>algorithm</i>"
* </ul>
*
* <P> (in the latter case,
* 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>
* Cipher c = Cipher.getInstance("<i>DES/CBC/PKCS5Padding</i>");
@ -129,7 +129,7 @@ import java.nio.ByteBuffer;
* <i>DES/CBC/PKCS5Padding</i>, 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
* <code>Cipher</code> properties in its master class:<p>
* <code>Cipher</code> properties in its master class:
*
* <ul>
*
@ -160,7 +160,7 @@ import java.nio.ByteBuffer;
* 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>.
* That provider would have the following
* <code>Cipher</code> properties in its master class:<p>
* <code>Cipher</code> properties in its master class:
*
* <ul>
*
@ -197,20 +197,20 @@ import java.nio.ByteBuffer;
* Check if the provider has registered a subclass of <code>CipherSpi</code>
* for the specified "<i>algorithm/mode/padding</i>" transformation.
* <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>
* Check if the provider has registered a subclass of <code>CipherSpi</code>
* for the sub-transformation "<i>algorithm/mode</i>".
* <p>If the answer is YES, instantiate it, and call
* <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>
* Check if the provider has registered a subclass of <code>CipherSpi</code>
* for the sub-transformation "<i>algorithm//padding</i>" (note the double
* slashes).
* <p>If the answer is YES, instantiate it, and call
* <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>
* Check if the provider has registered a subclass of <code>CipherSpi</code>
* for the sub-transformation "<i>algorithm</i>".

@ -66,7 +66,6 @@ import sun.security.jca.GetInstance.Instance;
* algorithm-independent <code>init</code> methods, it is up to the
* provider what to do about the algorithm-specific parameters (if any) to be
* associated with each of the keys.
* <p>
*
* <li><b>Algorithm-Specific Initialization</b>
* <p>For situations where a set of algorithm-specific parameters already

@ -1,5 +1,5 @@
/*
* 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.
*
* This code is free software; you can redistribute it and/or modify it
@ -50,7 +50,7 @@ import java.security.NoSuchProviderException;
* to a SealedObject.
*
* <p> The original object that was sealed can be recovered in two different
* ways: <p>
* ways:
*
* <ul>
*
@ -68,8 +68,6 @@ import java.security.NoSuchProviderException;
* decryption key, it could hand over the cipher object to
* another party who then unseals the sealed object.
*
* <p>
*
* <li>by using one of the
* {@link #getObject(java.security.Key) getObject} methods
* that take a <code>Key</code> object.

@ -1,5 +1,5 @@
/*
* 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.
*
* This code is free software; you can redistribute it and/or modify it
@ -329,7 +329,7 @@ import java.nio.ReadOnlyBufferException;
* is saved. All future delegated tasks will be processed using this
* context: that is, all access control decisions will be made using the
* context captured at engine creation.
* <P>
*
* <HR>
*
* <B>Concurrency Notes</B>:
@ -345,7 +345,7 @@ import java.nio.ReadOnlyBufferException;
* out-of-order, unexpected or fatal results may occur.
* <P>
* For example:
* <P>
*
* <pre>
* synchronized (outboundLock) {
* sslEngine.wrap(src, dst);

@ -1,5 +1,5 @@
/*
* 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.
*
* This code is free software; you can redistribute it and/or modify it
@ -43,7 +43,6 @@ import java.security.*;
* The following table lists all the possible SSLPermission target names,
* and for each provides a description of what the permission allows
* and a discussion of the risks of granting code the permission.
* <P>
*
* <table border=1 cellpadding=5
* summary="permission name, what it allows, and associated risks">

@ -144,7 +144,7 @@ public interface ScriptEngineFactory {
* Returns a String which can be used to invoke a method of a Java object using the syntax
* of the supported scripting language. For instance, an implementation for a Javascript
* engine might be;
* <p>
*
* <pre>{@code
* public String getMethodCallSyntax(String obj,
* String m, String... args) {
@ -180,7 +180,7 @@ public interface ScriptEngineFactory {
* Returns a String that can be used as a statement to display the specified String using
* the syntax of the supported scripting language. For instance, the implementation for a Perl
* engine might be;
* <p>
*
* <pre><code>
* public String getOutputStatement(String toDisplay) {
* return "print(" + toDisplay + ")";
@ -198,7 +198,7 @@ public interface ScriptEngineFactory {
/**
* Returns a valid scripting language executable program with given statements.
* For instance an implementation for a PHP engine might be:
* <p>
*
* <pre>{@code
* public String getProgram(String... statements) {
* String retval = "<?\n";

@ -228,8 +228,8 @@ public final class PrivateCredentialPermission extends Permission {
* <p>
*
* This method returns true if:
* <p><ul>
* <li> <i>p</i> is an instanceof PrivateCredentialPermission and <p>
* <ul>
* <li> <i>p</i> is an instanceof PrivateCredentialPermission and
* <li> the target name for <i>p</i> is implied by this object's
* target name. For example:
* <pre>

@ -48,14 +48,14 @@ import java.io.IOException;
* <p>
* For example, to specify the "host" service use of a forwardable TGT the
* target permission is specified as follows:
* <p>
*
* <pre>
* DelegationPermission("\"host/foo.example.com@EXAMPLE.COM\" \"krbtgt/EXAMPLE.COM@EXAMPLE.COM\"");
* </pre>
* <p>
* To give the "backup" service a proxiable nfs service ticket the target permission
* might be specified:
* <p>
*
* <pre>
* DelegationPermission("\"backup/bar.example.com@EXAMPLE.COM\" \"nfs/home.EXAMPLE.COM@EXAMPLE.COM\"");
* </pre>

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