diff --git a/.hgtags b/.hgtags
index 7a1ef94c809..d1af44ccacc 100644
--- a/.hgtags
+++ b/.hgtags
@@ -287,3 +287,4 @@ b409bc51bc23cfd51f2bd04ea919ec83535af9d0 jdk9-b37
3107be2ba9c6e208a0b86bc7100a141abbc5b5fb jdk9-b42
6494b13f88a867026ee316b444d9a4fa589dd6bd jdk9-b43
abbfccd659b91a7bb815d5e36fed635dcdd40f31 jdk9-b44
+bfc24ae2b900187585079bb11e66e459d1e525fe jdk9-b45
diff --git a/.hgtags-top-repo b/.hgtags-top-repo
index 1c8881b0d18..0ad3d644f11 100644
--- a/.hgtags-top-repo
+++ b/.hgtags-top-repo
@@ -287,3 +287,4 @@ cf136458ee747e151a27aa9ea0c1492ea55ef3e7 jdk9-b40
f7c11da0b0481d49cc7a65a453336c108191e821 jdk9-b42
02ee8c65622e8bd97496d584e22fc7dcf0edc4ae jdk9-b43
8994f5d87b3bb5e8d317d4e8ccb326da1a73684a jdk9-b44
+3dd628fde2086218d548841022ee8436b6b88185 jdk9-b45
diff --git a/Makefile b/Makefile
index 1eff79b2194..0814d3867c6 100644
--- a/Makefile
+++ b/Makefile
@@ -54,8 +54,11 @@ ifneq ($(findstring qp,$(MAKEFLAGS)),)
# Duplication of global targets, needed before ParseConfAndSpec in case we have
# no configurations.
help:
- # If CONF is not set, look for all available configurations
- CONF?=
+ # If both CONF and SPEC are unset, look for all available configurations by
+ # setting CONF to the empty string.
+ ifeq ($(SPEC), )
+ CONF?=
+ endif
endif
# ... and then we can include our helper functions
diff --git a/common/autoconf/generated-configure.sh b/common/autoconf/generated-configure.sh
index 59c1a8ae9e8..21ab1f47ecd 100644
--- a/common/autoconf/generated-configure.sh
+++ b/common/autoconf/generated-configure.sh
@@ -4329,7 +4329,7 @@ TOOLCHAIN_DESCRIPTION_xlc="IBM XL C/C++"
#CUSTOM_AUTOCONF_INCLUDE
# Do not change or remove the following line, it is needed for consistency checks:
-DATE_WHEN_GENERATED=1418395009
+DATE_WHEN_GENERATED=1420811523
###############################################################################
#
@@ -27408,8 +27408,8 @@ $as_echo "$as_me: Trying to extract Visual Studio environment variables" >&6;}
# The trailing space for everyone except PATH is no typo, but is needed due
# to trailing \ in the Windows paths. These will be stripped later.
$ECHO "$WINPATH_BASH -c 'echo VS_PATH="'\"$PATH\" > set-vs-env.sh' >> $EXTRACT_VC_ENV_BAT_FILE
- $ECHO "$WINPATH_BASH -c 'echo VS_INCLUDE="'\"$INCLUDE \" >> set-vs-env.sh' >> $EXTRACT_VC_ENV_BAT_FILE
- $ECHO "$WINPATH_BASH -c 'echo VS_LIB="'\"$LIB \" >> set-vs-env.sh' >> $EXTRACT_VC_ENV_BAT_FILE
+ $ECHO "$WINPATH_BASH -c 'echo VS_INCLUDE="'\"$INCLUDE\;$include \" >> set-vs-env.sh' >> $EXTRACT_VC_ENV_BAT_FILE
+ $ECHO "$WINPATH_BASH -c 'echo VS_LIB="'\"$LIB\;$lib \" >> set-vs-env.sh' >> $EXTRACT_VC_ENV_BAT_FILE
$ECHO "$WINPATH_BASH -c 'echo VCINSTALLDIR="'\"$VCINSTALLDIR \" >> set-vs-env.sh' >> $EXTRACT_VC_ENV_BAT_FILE
$ECHO "$WINPATH_BASH -c 'echo WindowsSdkDir="'\"$WindowsSdkDir \" >> set-vs-env.sh' >> $EXTRACT_VC_ENV_BAT_FILE
$ECHO "$WINPATH_BASH -c 'echo WINDOWSSDKDIR="'\"$WINDOWSSDKDIR \" >> set-vs-env.sh' >> $EXTRACT_VC_ENV_BAT_FILE
diff --git a/common/autoconf/spec.gmk.in b/common/autoconf/spec.gmk.in
index 60d70886925..1c6c1c40132 100644
--- a/common/autoconf/spec.gmk.in
+++ b/common/autoconf/spec.gmk.in
@@ -690,10 +690,15 @@ OS_VERSION_MICRO:=@OS_VERSION_MICRO@
# Images directory definitions
JDK_IMAGE_SUBDIR:=jdk
JRE_IMAGE_SUBDIR:=jre
+
# Colon left out to be able to override output dir for bootcycle-images
JDK_IMAGE_DIR=$(IMAGES_OUTPUTDIR)/$(JDK_IMAGE_SUBDIR)
JRE_IMAGE_DIR=$(IMAGES_OUTPUTDIR)/$(JRE_IMAGE_SUBDIR)
+# Test image, as above
+TEST_IMAGE_SUBDIR:=test
+TEST_IMAGE_DIR=$(IMAGES_OUTPUTDIR)/$(TEST_IMAGE_SUBDIR)
+
# Macosx bundles directory definitions
JDK_BUNDLE_SUBDIR=jdk-bundle/jdk$(JDK_VERSION).jdk/Contents
JRE_BUNDLE_SUBDIR=jre-bundle/jre$(JDK_VERSION).jre/Contents
diff --git a/common/autoconf/toolchain_windows.m4 b/common/autoconf/toolchain_windows.m4
index 231d2e837f2..e1ec6f3db5b 100644
--- a/common/autoconf/toolchain_windows.m4
+++ b/common/autoconf/toolchain_windows.m4
@@ -173,8 +173,8 @@ AC_DEFUN([TOOLCHAIN_SETUP_VISUAL_STUDIO_ENV],
# The trailing space for everyone except PATH is no typo, but is needed due
# to trailing \ in the Windows paths. These will be stripped later.
$ECHO "$WINPATH_BASH -c 'echo VS_PATH="'\"$PATH\" > set-vs-env.sh' >> $EXTRACT_VC_ENV_BAT_FILE
- $ECHO "$WINPATH_BASH -c 'echo VS_INCLUDE="'\"$INCLUDE \" >> set-vs-env.sh' >> $EXTRACT_VC_ENV_BAT_FILE
- $ECHO "$WINPATH_BASH -c 'echo VS_LIB="'\"$LIB \" >> set-vs-env.sh' >> $EXTRACT_VC_ENV_BAT_FILE
+ $ECHO "$WINPATH_BASH -c 'echo VS_INCLUDE="'\"$INCLUDE\;$include \" >> set-vs-env.sh' >> $EXTRACT_VC_ENV_BAT_FILE
+ $ECHO "$WINPATH_BASH -c 'echo VS_LIB="'\"$LIB\;$lib \" >> set-vs-env.sh' >> $EXTRACT_VC_ENV_BAT_FILE
$ECHO "$WINPATH_BASH -c 'echo VCINSTALLDIR="'\"$VCINSTALLDIR \" >> set-vs-env.sh' >> $EXTRACT_VC_ENV_BAT_FILE
$ECHO "$WINPATH_BASH -c 'echo WindowsSdkDir="'\"$WindowsSdkDir \" >> set-vs-env.sh' >> $EXTRACT_VC_ENV_BAT_FILE
$ECHO "$WINPATH_BASH -c 'echo WINDOWSSDKDIR="'\"$WINDOWSSDKDIR \" >> set-vs-env.sh' >> $EXTRACT_VC_ENV_BAT_FILE
diff --git a/common/bin/unshuffle_list.txt b/common/bin/unshuffle_list.txt
index cd0749c7aa8..0219bd7b005 100644
--- a/common/bin/unshuffle_list.txt
+++ b/common/bin/unshuffle_list.txt
@@ -26,10 +26,8 @@ corba/src/java.corba/share/classes/com/sun/org/omg : corba/src/share/classes/com
corba/src/java.corba/share/classes/com/sun/tools/corba/se/idl : corba/src/share/classes/com/sun/tools/corba/se/idl
corba/src/java.corba/share/classes/javax/activity : corba/src/share/classes/javax/activity
corba/src/java.corba/share/classes/javax/rmi : corba/src/share/classes/javax/rmi
-corba/src/java.corba/share/classes/javax/transaction : corba/src/share/classes/javax/transaction
corba/src/java.corba/share/classes/org/omg : corba/src/share/classes/org/omg
corba/src/java.corba/share/classes/sun/corba : corba/src/share/classes/sun/corba
-corba/src/java.sql/share/classes/javax/transaction/xa : corba/src/share/classes/javax/transaction/xa
corba/src/jdk.rmic/share/classes/sun/rmi/rmic/iiop : corba/src/share/classes/sun/rmi/rmic/iiop
jaxp/src/java.xml/share/classes/com/sun/java_cup/internal/runtime : jaxp/src/com/sun/java_cup/internal/runtime
jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal : jaxp/src/com/sun/org/apache/bcel/internal
@@ -66,8 +64,8 @@ jaxws/src/java.xml.bind/share/classes/com/sun/xml/internal/fastinfoset : jaxws/s
jaxws/src/java.xml.bind/share/classes/com/sun/xml/internal/org : jaxws/src/share/jaxws_classes/com/sun/xml/internal/org
jaxws/src/java.xml.bind/share/classes/com/sun/xml/internal/txw2 : jaxws/src/share/jaxws_classes/com/sun/xml/internal/txw2
jaxws/src/java.xml.bind/share/classes/javax/xml/bind : jaxws/src/share/jaxws_classes/javax/xml/bind
-jaxws/src/java.xml.soap/share/classes/com/sun/xml/internal/messaging : jaxws/src/share/jaxws_classes/com/sun/xml/internal/messaging
-jaxws/src/java.xml.soap/share/classes/javax/xml/soap : jaxws/src/share/jaxws_classes/javax/xml/soap
+jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging : jaxws/src/share/jaxws_classes/com/sun/xml/internal/messaging
+jaxws/src/java.xml.ws/share/classes/javax/xml/soap : jaxws/src/share/jaxws_classes/javax/xml/soap
jaxws/src/java.xml.ws/share/classes/com/oracle/webservices/internal : jaxws/src/share/jaxws_classes/com/oracle/webservices/internal
jaxws/src/java.xml.ws/share/classes/com/oracle/xmlns/internal : jaxws/src/share/jaxws_classes/com/oracle/xmlns/internal
jaxws/src/java.xml.ws/share/classes/com/sun/org/glassfish : jaxws/src/share/jaxws_classes/com/sun/org/glassfish
@@ -1245,6 +1243,8 @@ jdk/src/java.sql.rowset/share/classes/com/sun/rowset : jdk/src/share/classes/com
jdk/src/java.sql.rowset/share/classes/javax/sql/rowset : jdk/src/share/classes/javax/sql/rowset
jdk/src/java.sql/share/classes/java/sql : jdk/src/share/classes/java/sql
jdk/src/java.sql/share/classes/javax/sql : jdk/src/share/classes/javax/sql
+jdk/src/java.sql/share/classes/javax/transaction/xa : corba/src/share/classes/javax/transaction/xa
+jdk/src/java.transaction/share/classes/javax/transaction : corba/src/share/classes/javax/transaction
jdk/src/java.xml.crypto/share/classes/com/sun/org/apache/xml/internal/security : jdk/src/share/classes/com/sun/org/apache/xml/internal/security
jdk/src/java.xml.crypto/share/classes/javax/xml/crypto : jdk/src/share/classes/javax/xml/crypto
jdk/src/java.xml.crypto/share/classes/org/jcp/xml/dsig/internal : jdk/src/share/classes/org/jcp/xml/dsig/internal
diff --git a/corba/.hgtags b/corba/.hgtags
index 3c3ea198849..859c412f8a7 100644
--- a/corba/.hgtags
+++ b/corba/.hgtags
@@ -287,3 +287,4 @@ e27c725d6c9d155667b35255f442d4ceb8c3c084 jdk9-b40
078bb11af876fe528d4b516f33ad4dd9bb60549e jdk9-b42
9645e35616b60c5c07b4fdf11a132afc8081dfa8 jdk9-b43
1f57bd728c9e6865ccb9d43ccd80a1c11230a32f jdk9-b44
+9e3f2bed80c0e5a84a256ce41f1d10c5ade48466 jdk9-b45
diff --git a/corba/src/java.sql/share/classes/javax/transaction/xa/XAResource.java b/corba/src/java.sql/share/classes/javax/transaction/xa/XAResource.java
deleted file mode 100644
index ffb7226a446..00000000000
--- a/corba/src/java.sql/share/classes/javax/transaction/xa/XAResource.java
+++ /dev/null
@@ -1,314 +0,0 @@
-/*
- * Copyright (c) 2000, 2001, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-package javax.transaction.xa;
-
-/**
The XAResource interface is a Java mapping of the industry standard
- * XA interface based on the X/Open CAE Specification (Distributed
- * Transaction Processing: The XA Specification).
- *
- *
The XA interface defines the contract between a Resource Manager
- * and a Transaction Manager in a distributed transaction processing
- * (DTP) environment. A JDBC driver or a JMS provider implements
- * this interface to support the association between a global transaction
- * and a database or message service connection.
- *
- *
The XAResource interface can be supported by any transactional
- * resource that is intended to be used by application programs in an
- * environment where transactions are controlled by an external
- * transaction manager. An example of such a resource is a database
- * management system. An application may access data through multiple
- * database connections. Each database connection is enlisted with
- * the transaction manager as a transactional resource. The transaction
- * manager obtains an XAResource for each connection participating
- * in a global transaction. The transaction manager uses the
- * start method
- * to associate the global transaction with the resource, and it uses the
- * end method to disassociate the transaction from
- * the resource. The resource
- * manager is responsible for associating the global transaction to all
- * work performed on its data between the start and end method invocations.
- *
- *
At transaction commit time, the resource managers are informed by
- * the transaction manager to prepare, commit, or rollback a transaction
- * according to the two-phase commit protocol.
- *
- */
-
-public interface XAResource
-{
- /** Commits the global transaction specified by xid.
- *
- * @param xid A global transaction identifier
- *
- * @param onePhase If true, the resource manager should use a one-phase
- * commit protocol to commit the work done on behalf of xid.
- *
- * @exception XAException An error has occurred. Possible XAExceptions
- * are XA_HEURHAZ, XA_HEURCOM, XA_HEURRB, XA_HEURMIX, XAER_RMERR,
- * XAER_RMFAIL, XAER_NOTA, XAER_INVAL, or XAER_PROTO.
- *
- *
If the resource manager did not commit the transaction and the
- * paramether onePhase is set to true, the resource manager may throw
- * one of the XA_RB* exceptions. Upon return, the resource manager has
- * rolled back the branch's work and has released all held resources.
- */
-
- void commit(Xid xid, boolean onePhase) throws XAException;
-
-
- /** Ends the work performed on behalf of a transaction branch.
- * The resource manager disassociates the XA resource from the
- * transaction branch specified and lets the transaction
- * complete.
- *
- *
If TMSUSPEND is specified in the flags, the transaction branch
- * is temporarily suspended in an incomplete state. The transaction
- * context is in a suspended state and must be resumed via the
- * start method with TMRESUME specified.
- *
- *
If TMFAIL is specified, the portion of work has failed.
- * The resource manager may mark the transaction as rollback-only
- *
- *
If TMSUCCESS is specified, the portion of work has completed
- * successfully.
- *
- * @param xid A global transaction identifier that is the same as
- * the identifier used previously in the start method.
- *
- * @param flags One of TMSUCCESS, TMFAIL, or TMSUSPEND.
- *
- * @exception XAException An error has occurred. Possible XAException
- * values are XAER_RMERR, XAER_RMFAILED, XAER_NOTA, XAER_INVAL,
- * XAER_PROTO, or XA_RB*.
- */
-
- void end(Xid xid, int flags) throws XAException;
-
-
- /** Tells the resource manager to forget about a heuristically
- * completed transaction branch.
- *
- * @param xid A global transaction identifier.
- *
- * @exception XAException An error has occurred. Possible exception
- * values are XAER_RMERR, XAER_RMFAIL, XAER_NOTA, XAER_INVAL, or
- * XAER_PROTO.
- */
-
- void forget(Xid xid) throws XAException;
-
- /** Obtains the current transaction timeout value set for this
- * XAResource instance. If XAResource.setTransactionTimeout
- * was not used prior to invoking this method, the return value
- * is the default timeout set for the resource manager; otherwise,
- * the value used in the previous setTransactionTimeout
- * call is returned.
- *
- * @return the transaction timeout value in seconds.
- *
- * @exception XAException An error has occurred. Possible exception
- * values are XAER_RMERR and XAER_RMFAIL.
- */
- int getTransactionTimeout() throws XAException;
-
- /** This method is called to determine if the resource manager
- * instance represented by the target object is the same as the
- * resouce manager instance represented by the parameter xares.
- *
- * @param xares An XAResource object whose resource manager instance
- * is to be compared with the resource manager instance of the
- * target object.
- *
- * @return true if it's the same RM instance; otherwise
- * false.
- *
- * @exception XAException An error has occurred. Possible exception
- * values are XAER_RMERR and XAER_RMFAIL.
- *
- */
- boolean isSameRM(XAResource xares) throws XAException;
-
- /** Ask the resource manager to prepare for a transaction commit
- * of the transaction specified in xid.
- *
- * @param xid A global transaction identifier.
- *
- * @exception XAException An error has occurred. Possible exception
- * values are: XA_RB*, XAER_RMERR, XAER_RMFAIL, XAER_NOTA, XAER_INVAL,
- * or XAER_PROTO.
- *
- * @return A value indicating the resource manager's vote on the
- * outcome of the transaction. The possible values are: XA_RDONLY
- * or XA_OK. If the resource manager wants to roll back the
- * transaction, it should do so by raising an appropriate XAException
- * in the prepare method.
- */
-
- int prepare(Xid xid) throws XAException;
-
-
- /** Obtains a list of prepared transaction branches from a resource
- * manager. The transaction manager calls this method during recovery
- * to obtain the list of transaction branches that are currently in
- * prepared or heuristically completed states.
- *
- * @param flag One of TMSTARTRSCAN, TMENDRSCAN, TMNOFLAGS. TMNOFLAGS
- * must be used when no other flags are set in the parameter.
- *
- * @exception XAException An error has occurred. Possible values are
- * XAER_RMERR, XAER_RMFAIL, XAER_INVAL, and XAER_PROTO.
- *
- * @return The resource manager returns zero or more XIDs of the
- * transaction branches that are currently in a prepared or
- * heuristically completed state. If an error occurs during the
- * operation, the resource manager should throw the appropriate
- * XAException.
- *
- */
-
- Xid[] recover(int flag) throws XAException;
-
-
- /** Informs the resource manager to roll back work done on behalf
- * of a transaction branch.
- *
- * @param xid A global transaction identifier.
- *
- * @exception XAException An error has occurred.
- */
-
- void rollback(Xid xid) throws XAException;
-
-
- /**
Sets the current transaction timeout value for this XAResource
- * instance. Once set, this timeout value is effective until
- * setTransactionTimeout is invoked again with a different
- * value. To reset the timeout value to the default value used by the resource
- * manager, set the value to zero.
- *
- * If the timeout operation is performed successfully, the method returns
- * true; otherwise false. If a resource manager does not
- * support explicitly setting the transaction timeout value, this method
- * returns false.
- *
- * @param seconds The transaction timeout value in seconds.
- *
- * @return true if the transaction timeout value is set successfully;
- * otherwise false.
- *
- * @exception XAException An error has occurred. Possible exception values
- * are XAER_RMERR, XAER_RMFAIL, or XAER_INVAL.
- */
- boolean setTransactionTimeout(int seconds) throws XAException;
-
-
- /** Starts work on behalf of a transaction branch specified in
- * xid.
- *
- * If TMJOIN is specified, the start applies to joining a transaction
- * previously seen by the resource manager. If TMRESUME is specified,
- * the start applies to resuming a suspended transaction specified in the
- * parameter xid.
- *
- * If neither TMJOIN nor TMRESUME is specified and the transaction
- * specified by xid has previously been seen by the resource
- * manager, the resource manager throws the XAException exception with
- * XAER_DUPID error code.
- *
- * @param xid A global transaction identifier to be associated
- * with the resource.
- *
- * @param flags One of TMNOFLAGS, TMJOIN, or TMRESUME.
- *
- * @exception XAException An error has occurred. Possible exceptions
- * are XA_RB*, XAER_RMERR, XAER_RMFAIL, XAER_DUPID, XAER_OUTSIDE,
- * XAER_NOTA, XAER_INVAL, or XAER_PROTO.
- *
- */
- void start(Xid xid, int flags) throws XAException;
-
-
- /**
- * Ends a recovery scan.
- */
- public final static int TMENDRSCAN = 0x00800000;
-
- /**
- * Disassociates the caller and marks the transaction branch
- * rollback-only.
- */
- public final static int TMFAIL = 0x20000000;
-
- /**
- * Caller is joining existing transaction branch.
- */
- public final static int TMJOIN = 0x00200000;
-
- /**
- * Use TMNOFLAGS to indicate no flags value is selected.
- */
- public final static int TMNOFLAGS = 0x00000000;
-
- /**
- * Caller is using one-phase optimization.
- */
- public final static int TMONEPHASE = 0x40000000;
-
- /**
- * Caller is resuming association with a suspended
- * transaction branch.
- */
- public final static int TMRESUME = 0x08000000;
-
- /**
- * Starts a recovery scan.
- */
- public final static int TMSTARTRSCAN = 0x01000000;
-
-
- /**
- * Disassociates caller from a transaction branch.
- */
- public final static int TMSUCCESS = 0x04000000;
-
-
- /**
- * Caller is suspending (not ending) its association with
- * a transaction branch.
- */
- public final static int TMSUSPEND = 0x02000000;
-
- /**
- * The transaction branch has been read-only and has been committed.
- */
- public final static int XA_RDONLY = 0x00000003;
-
- /**
- * The transaction work has been prepared normally.
- */
- public final static int XA_OK = 0;
-
-}
diff --git a/hotspot/.hgtags b/hotspot/.hgtags
index ed88a27ff49..b4e518b36eb 100644
--- a/hotspot/.hgtags
+++ b/hotspot/.hgtags
@@ -447,3 +447,4 @@ c363a8b87e477ee45d6d3cb2a36cb365141bc596 jdk9-b38
38cb4fbd47e3472bd1b5ebac83bda96fe4869c4f jdk9-b42
65a9747147b8090037541040ba67156ec914db6a jdk9-b43
43a44b56dca61a4d766a20f0528fdd8b5ceff873 jdk9-b44
+5dc8184af1e2bb30b0103113d1f1a58a21a80c37 jdk9-b45
diff --git a/hotspot/src/cpu/ppc/vm/templateInterpreter_ppc.cpp b/hotspot/src/cpu/ppc/vm/templateInterpreter_ppc.cpp
index 2a58b36d420..432a96d8268 100644
--- a/hotspot/src/cpu/ppc/vm/templateInterpreter_ppc.cpp
+++ b/hotspot/src/cpu/ppc/vm/templateInterpreter_ppc.cpp
@@ -264,11 +264,11 @@ void TemplateInterpreterGenerator::generate_counter_incr(Label* overflow, Label*
__ cmpdi(CCR0, Rmdo, 0);
__ beq(CCR0, no_mdo);
- // Increment backedge counter in the MDO.
- const int mdo_bc_offs = in_bytes(MethodData::backedge_counter_offset()) + in_bytes(InvocationCounter::counter_offset());
- __ lwz(Rscratch2, mdo_bc_offs, Rmdo);
+ // Increment invocation counter in the MDO.
+ const int mdo_ic_offs = in_bytes(MethodData::invocation_counter_offset()) + in_bytes(InvocationCounter::counter_offset());
+ __ lwz(Rscratch2, mdo_ic_offs, Rmdo);
__ addi(Rscratch2, Rscratch2, increment);
- __ stw(Rscratch2, mdo_bc_offs, Rmdo);
+ __ stw(Rscratch2, mdo_ic_offs, Rmdo);
__ load_const_optimized(Rscratch1, mask, R0);
__ and_(Rscratch1, Rscratch2, Rscratch1);
__ bne(CCR0, done);
@@ -276,12 +276,12 @@ void TemplateInterpreterGenerator::generate_counter_incr(Label* overflow, Label*
}
// Increment counter in MethodCounters*.
- const int mo_bc_offs = in_bytes(MethodCounters::backedge_counter_offset()) + in_bytes(InvocationCounter::counter_offset());
+ const int mo_ic_offs = in_bytes(MethodCounters::invocation_counter_offset()) + in_bytes(InvocationCounter::counter_offset());
__ bind(no_mdo);
__ get_method_counters(R19_method, R3_counters, done);
- __ lwz(Rscratch2, mo_bc_offs, R3_counters);
+ __ lwz(Rscratch2, mo_ic_offs, R3_counters);
__ addi(Rscratch2, Rscratch2, increment);
- __ stw(Rscratch2, mo_bc_offs, R3_counters);
+ __ stw(Rscratch2, mo_ic_offs, R3_counters);
__ load_const_optimized(Rscratch1, mask, R0);
__ and_(Rscratch1, Rscratch2, Rscratch1);
__ beq(CCR0, *overflow);
diff --git a/hotspot/src/os_cpu/bsd_zero/vm/atomic_bsd_zero.inline.hpp b/hotspot/src/os_cpu/bsd_zero/vm/atomic_bsd_zero.inline.hpp
index 60969caa962..4e7e702ad66 100644
--- a/hotspot/src/os_cpu/bsd_zero/vm/atomic_bsd_zero.inline.hpp
+++ b/hotspot/src/os_cpu/bsd_zero/vm/atomic_bsd_zero.inline.hpp
@@ -1,6 +1,6 @@
/*
* Copyright (c) 2003, 2014, Oracle and/or its affiliates. All rights reserved.
- * Copyright 2007, 2008, 2011 Red Hat, Inc.
+ * Copyright 2007, 2008, 2011, 2015, Red Hat, Inc.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -237,7 +237,13 @@ inline jint Atomic::xchg(jint exchange_value, volatile jint* dest) {
// operation. Note that some platforms only support this with the
// limitation that the only valid value to store is the immediate
// constant 1. There is a test for this in JNI_CreateJavaVM().
- return __sync_lock_test_and_set (dest, exchange_value);
+ jint result = __sync_lock_test_and_set (dest, exchange_value);
+ // All atomic operations are expected to be full memory barriers
+ // (see atomic.hpp). However, __sync_lock_test_and_set is not
+ // a full memory barrier, but an acquire barrier. Hence, this added
+ // barrier.
+ __sync_synchronize();
+ return result;
#endif // M68K
#endif // ARM
}
@@ -250,7 +256,9 @@ inline intptr_t Atomic::xchg_ptr(intptr_t exchange_value,
#ifdef M68K
return m68k_lock_test_and_set(dest, exchange_value);
#else
- return __sync_lock_test_and_set (dest, exchange_value);
+ intptr_t result = __sync_lock_test_and_set (dest, exchange_value);
+ __sync_synchronize();
+ return result;
#endif // M68K
#endif // ARM
}
diff --git a/hotspot/src/os_cpu/linux_zero/vm/atomic_linux_zero.inline.hpp b/hotspot/src/os_cpu/linux_zero/vm/atomic_linux_zero.inline.hpp
index d9df41034d4..266c950422b 100644
--- a/hotspot/src/os_cpu/linux_zero/vm/atomic_linux_zero.inline.hpp
+++ b/hotspot/src/os_cpu/linux_zero/vm/atomic_linux_zero.inline.hpp
@@ -1,6 +1,6 @@
/*
* Copyright (c) 2003, 2014, Oracle and/or its affiliates. All rights reserved.
- * Copyright 2007, 2008, 2011 Red Hat, Inc.
+ * Copyright 2007, 2008, 2011, 2015, Red Hat, Inc.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -231,7 +231,13 @@ inline jint Atomic::xchg(jint exchange_value, volatile jint* dest) {
// operation. Note that some platforms only support this with the
// limitation that the only valid value to store is the immediate
// constant 1. There is a test for this in JNI_CreateJavaVM().
- return __sync_lock_test_and_set (dest, exchange_value);
+ jint result = __sync_lock_test_and_set (dest, exchange_value);
+ // All atomic operations are expected to be full memory barriers
+ // (see atomic.hpp). However, __sync_lock_test_and_set is not
+ // a full memory barrier, but an acquire barrier. Hence, this added
+ // barrier.
+ __sync_synchronize();
+ return result;
#endif // M68K
#endif // ARM
}
@@ -244,7 +250,9 @@ inline intptr_t Atomic::xchg_ptr(intptr_t exchange_value,
#ifdef M68K
return m68k_lock_test_and_set(dest, exchange_value);
#else
- return __sync_lock_test_and_set (dest, exchange_value);
+ intptr_t result = __sync_lock_test_and_set (dest, exchange_value);
+ __sync_synchronize();
+ return result;
#endif // M68K
#endif // ARM
}
diff --git a/hotspot/src/share/vm/gc_implementation/g1/concurrentMark.cpp b/hotspot/src/share/vm/gc_implementation/g1/concurrentMark.cpp
index 6bb8b5de63c..0119858fe5b 100644
--- a/hotspot/src/share/vm/gc_implementation/g1/concurrentMark.cpp
+++ b/hotspot/src/share/vm/gc_implementation/g1/concurrentMark.cpp
@@ -1910,7 +1910,6 @@ public:
}
void work(uint worker_id) {
- double start = os::elapsedTime();
FreeRegionList local_cleanup_list("Local Cleanup List");
HRRSCleanupTask hrrs_cleanup_task;
G1NoteEndOfConcMarkClosure g1_note_end(_g1h, &local_cleanup_list,
diff --git a/hotspot/src/share/vm/gc_implementation/g1/g1CollectedHeap.cpp b/hotspot/src/share/vm/gc_implementation/g1/g1CollectedHeap.cpp
index 335ba2265d5..0d81bbfec83 100644
--- a/hotspot/src/share/vm/gc_implementation/g1/g1CollectedHeap.cpp
+++ b/hotspot/src/share/vm/gc_implementation/g1/g1CollectedHeap.cpp
@@ -1229,7 +1229,6 @@ bool G1CollectedHeap::do_collection(bool explicit_gc,
TraceCollectorStats tcs(g1mm()->full_collection_counters());
TraceMemoryManagerStats tms(true /* fullGC */, gc_cause());
- double start = os::elapsedTime();
g1_policy()->record_full_collection_start();
// Note: When we have a more flexible GC logging framework that
@@ -1436,7 +1435,6 @@ bool G1CollectedHeap::do_collection(bool explicit_gc,
_allocator->init_mutator_alloc_region();
- double end = os::elapsedTime();
g1_policy()->record_full_collection_end();
if (G1Log::fine()) {
diff --git a/hotspot/src/share/vm/gc_implementation/g1/g1CollectedHeap.hpp b/hotspot/src/share/vm/gc_implementation/g1/g1CollectedHeap.hpp
index ab79bcd05ad..3286453095c 100644
--- a/hotspot/src/share/vm/gc_implementation/g1/g1CollectedHeap.hpp
+++ b/hotspot/src/share/vm/gc_implementation/g1/g1CollectedHeap.hpp
@@ -56,7 +56,6 @@ class HRRSCleanupTask;
class GenerationSpec;
class OopsInHeapRegionClosure;
class G1KlassScanClosure;
-class G1ScanHeapEvacClosure;
class ObjectClosure;
class SpaceClosure;
class CompactibleSpaceClosure;
diff --git a/hotspot/src/share/vm/gc_implementation/g1/g1CollectorPolicy.cpp b/hotspot/src/share/vm/gc_implementation/g1/g1CollectorPolicy.cpp
index 5cc47a24964..175c5eb9448 100644
--- a/hotspot/src/share/vm/gc_implementation/g1/g1CollectorPolicy.cpp
+++ b/hotspot/src/share/vm/gc_implementation/g1/g1CollectorPolicy.cpp
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2001, 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2001, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -153,14 +153,6 @@ G1CollectorPolicy::G1CollectorPolicy() :
_inc_cset_predicted_elapsed_time_ms(0.0),
_inc_cset_predicted_elapsed_time_ms_diffs(0.0),
-#ifdef _MSC_VER // the use of 'this' below gets a warning, make it go away
-#pragma warning( disable:4355 ) // 'this' : used in base member initializer list
-#endif // _MSC_VER
-
- _short_lived_surv_rate_group(new SurvRateGroup(this, "Short Lived",
- G1YoungSurvRateNumRegionsSummary)),
- _survivor_surv_rate_group(new SurvRateGroup(this, "Survivor",
- G1YoungSurvRateNumRegionsSummary)),
// add here any more surv rate groups
_recorded_survivor_regions(0),
_recorded_survivor_head(NULL),
@@ -169,6 +161,22 @@ G1CollectorPolicy::G1CollectorPolicy() :
_gc_overhead_perc(0.0) {
+ uintx confidence_perc = G1ConfidencePercent;
+ // Put an artificial ceiling on this so that it's not set to a silly value.
+ if (confidence_perc > 100) {
+ confidence_perc = 100;
+ warning("G1ConfidencePercent is set to a value that is too large, "
+ "it's been updated to %u", confidence_perc);
+ }
+ // '_sigma' must be initialized before the SurvRateGroups below because they
+ // indirecty access '_sigma' trough the 'this' pointer in their constructor.
+ _sigma = (double) confidence_perc / 100.0;
+
+ _short_lived_surv_rate_group =
+ new SurvRateGroup(this, "Short Lived", G1YoungSurvRateNumRegionsSummary);
+ _survivor_surv_rate_group =
+ new SurvRateGroup(this, "Survivor", G1YoungSurvRateNumRegionsSummary);
+
// Set up the region size and associated fields. Given that the
// policy is created before the heap, we have to set this up here,
// so it's done as soon as possible.
@@ -283,15 +291,6 @@ G1CollectorPolicy::G1CollectorPolicy() :
double time_slice = (double) GCPauseIntervalMillis / 1000.0;
_mmu_tracker = new G1MMUTrackerQueue(time_slice, max_gc_time);
- uintx confidence_perc = G1ConfidencePercent;
- // Put an artificial ceiling on this so that it's not set to a silly value.
- if (confidence_perc > 100) {
- confidence_perc = 100;
- warning("G1ConfidencePercent is set to a value that is too large, "
- "it's been updated to %u", confidence_perc);
- }
- _sigma = (double) confidence_perc / 100.0;
-
// start conservatively (around 50ms is about right)
_concurrent_mark_remark_times_ms->add(0.05);
_concurrent_mark_cleanup_times_ms->add(0.20);
diff --git a/hotspot/src/share/vm/gc_implementation/g1/g1MarkSweep.hpp b/hotspot/src/share/vm/gc_implementation/g1/g1MarkSweep.hpp
index cdde980d306..e8d8c307676 100644
--- a/hotspot/src/share/vm/gc_implementation/g1/g1MarkSweep.hpp
+++ b/hotspot/src/share/vm/gc_implementation/g1/g1MarkSweep.hpp
@@ -46,9 +46,6 @@ class ReferenceProcessor;
class G1PrepareCompactClosure;
class G1MarkSweep : AllStatic {
- friend class VM_G1MarkSweep;
- friend class Scavenge;
-
public:
static void invoke_at_safepoint(ReferenceProcessor* rp,
diff --git a/hotspot/src/share/vm/gc_implementation/g1/g1PageBasedVirtualSpace.cpp b/hotspot/src/share/vm/gc_implementation/g1/g1PageBasedVirtualSpace.cpp
index d972b5cc71c..008002566da 100644
--- a/hotspot/src/share/vm/gc_implementation/g1/g1PageBasedVirtualSpace.cpp
+++ b/hotspot/src/share/vm/gc_implementation/g1/g1PageBasedVirtualSpace.cpp
@@ -45,7 +45,8 @@
#include "utilities/bitMap.inline.hpp"
G1PageBasedVirtualSpace::G1PageBasedVirtualSpace() : _low_boundary(NULL),
- _high_boundary(NULL), _committed(), _page_size(0), _special(false), _executable(false) {
+ _high_boundary(NULL), _committed(), _page_size(0), _special(false),
+ _dirty(), _executable(false) {
}
bool G1PageBasedVirtualSpace::initialize_with_granularity(ReservedSpace rs, size_t page_size) {
@@ -66,6 +67,9 @@ bool G1PageBasedVirtualSpace::initialize_with_granularity(ReservedSpace rs, size
assert(_committed.size() == 0, "virtual space initialized more than once");
uintx size_in_bits = rs.size() / page_size;
_committed.resize(size_in_bits, /* in_resource_area */ false);
+ if (_special) {
+ _dirty.resize(size_in_bits, /* in_resource_area */ false);
+ }
return true;
}
@@ -84,6 +88,7 @@ void G1PageBasedVirtualSpace::release() {
_executable = false;
_page_size = 0;
_committed.resize(0, false);
+ _dirty.resize(0, false);
}
size_t G1PageBasedVirtualSpace::committed_size() const {
@@ -120,34 +125,43 @@ size_t G1PageBasedVirtualSpace::byte_size_for_pages(size_t num) {
return num * _page_size;
}
-MemRegion G1PageBasedVirtualSpace::commit(uintptr_t start, size_t size_in_pages) {
+bool G1PageBasedVirtualSpace::commit(uintptr_t start, size_t size_in_pages) {
// We need to make sure to commit all pages covered by the given area.
guarantee(is_area_uncommitted(start, size_in_pages), "Specified area is not uncommitted");
- if (!_special) {
+ bool zero_filled = true;
+ uintptr_t end = start + size_in_pages;
+
+ if (_special) {
+ // Check for dirty pages and update zero_filled if any found.
+ if (_dirty.get_next_one_offset(start,end) < end) {
+ zero_filled = false;
+ _dirty.clear_range(start, end);
+ }
+ } else {
os::commit_memory_or_exit(page_start(start), byte_size_for_pages(size_in_pages), _executable,
err_msg("Failed to commit pages from "SIZE_FORMAT" of length "SIZE_FORMAT, start, size_in_pages));
}
- _committed.set_range(start, start + size_in_pages);
+ _committed.set_range(start, end);
- MemRegion result((HeapWord*)page_start(start), byte_size_for_pages(size_in_pages) / HeapWordSize);
if (AlwaysPreTouch) {
- os::pretouch_memory((char*)result.start(), (char*)result.end());
+ os::pretouch_memory(page_start(start), page_start(end));
}
- return result;
+ return zero_filled;
}
-MemRegion G1PageBasedVirtualSpace::uncommit(uintptr_t start, size_t size_in_pages) {
+void G1PageBasedVirtualSpace::uncommit(uintptr_t start, size_t size_in_pages) {
guarantee(is_area_committed(start, size_in_pages), "checking");
- if (!_special) {
+ if (_special) {
+ // Mark that memory is dirty. If committed again the memory might
+ // need to be cleared explicitly.
+ _dirty.set_range(start, start + size_in_pages);
+ } else {
os::uncommit_memory(page_start(start), byte_size_for_pages(size_in_pages));
}
_committed.clear_range(start, start + size_in_pages);
-
- MemRegion result((HeapWord*)page_start(start), byte_size_for_pages(size_in_pages) / HeapWordSize);
- return result;
}
bool G1PageBasedVirtualSpace::contains(const void* p) const {
@@ -157,7 +171,7 @@ bool G1PageBasedVirtualSpace::contains(const void* p) const {
#ifndef PRODUCT
void G1PageBasedVirtualSpace::print_on(outputStream* out) {
out->print ("Virtual space:");
- if (special()) out->print(" (pinned in memory)");
+ if (_special) out->print(" (pinned in memory)");
out->cr();
out->print_cr(" - committed: " SIZE_FORMAT, committed_size());
out->print_cr(" - reserved: " SIZE_FORMAT, reserved_size());
diff --git a/hotspot/src/share/vm/gc_implementation/g1/g1PageBasedVirtualSpace.hpp b/hotspot/src/share/vm/gc_implementation/g1/g1PageBasedVirtualSpace.hpp
index 972a69b2e8f..fb2c78415f9 100644
--- a/hotspot/src/share/vm/gc_implementation/g1/g1PageBasedVirtualSpace.hpp
+++ b/hotspot/src/share/vm/gc_implementation/g1/g1PageBasedVirtualSpace.hpp
@@ -49,6 +49,12 @@ class G1PageBasedVirtualSpace VALUE_OBJ_CLASS_SPEC {
// Bitmap used for verification of commit/uncommit operations.
BitMap _committed;
+ // Bitmap used to keep track of which pages are dirty or not for _special
+ // spaces. This is needed because for those spaces the underlying memory
+ // will only be zero filled the first time it is committed. Calls to commit
+ // will use this bitmap and return whether or not the memory is zero filled.
+ BitMap _dirty;
+
// Indicates that the entire space has been committed and pinned in memory,
// os::commit_memory() or os::uncommit_memory() have no function.
bool _special;
@@ -71,12 +77,11 @@ class G1PageBasedVirtualSpace VALUE_OBJ_CLASS_SPEC {
public:
// Commit the given area of pages starting at start being size_in_pages large.
- MemRegion commit(uintptr_t start, size_t size_in_pages);
+ // Returns true if the given area is zero filled upon completion.
+ bool commit(uintptr_t start, size_t size_in_pages);
// Uncommit the given area of pages starting at start being size_in_pages large.
- MemRegion uncommit(uintptr_t start, size_t size_in_pages);
-
- bool special() const { return _special; }
+ void uncommit(uintptr_t start, size_t size_in_pages);
// Initialization
G1PageBasedVirtualSpace();
diff --git a/hotspot/src/share/vm/gc_implementation/g1/g1RegionToSpaceMapper.cpp b/hotspot/src/share/vm/gc_implementation/g1/g1RegionToSpaceMapper.cpp
index 41eb0265dbf..68d967c764a 100644
--- a/hotspot/src/share/vm/gc_implementation/g1/g1RegionToSpaceMapper.cpp
+++ b/hotspot/src/share/vm/gc_implementation/g1/g1RegionToSpaceMapper.cpp
@@ -67,9 +67,9 @@ class G1RegionsLargerThanCommitSizeMapper : public G1RegionToSpaceMapper {
}
virtual void commit_regions(uintptr_t start_idx, size_t num_regions) {
- _storage.commit(start_idx * _pages_per_region, num_regions * _pages_per_region);
+ bool zero_filled = _storage.commit(start_idx * _pages_per_region, num_regions * _pages_per_region);
_commit_map.set_range(start_idx, start_idx + num_regions);
- fire_on_commit(start_idx, num_regions, true);
+ fire_on_commit(start_idx, num_regions, zero_filled);
}
virtual void uncommit_regions(uintptr_t start_idx, size_t num_regions) {
@@ -117,8 +117,7 @@ class G1RegionsSmallerThanCommitSizeMapper : public G1RegionToSpaceMapper {
uint old_refcount = _refcounts.get_by_index(idx);
bool zero_filled = false;
if (old_refcount == 0) {
- _storage.commit(idx, 1);
- zero_filled = true;
+ zero_filled = _storage.commit(idx, 1);
}
_refcounts.set_by_index(idx, old_refcount + 1);
_commit_map.set_bit(i);
diff --git a/hotspot/src/share/vm/gc_implementation/g1/g1RemSet.hpp b/hotspot/src/share/vm/gc_implementation/g1/g1RemSet.hpp
index 468d109803b..fb9d348789e 100644
--- a/hotspot/src/share/vm/gc_implementation/g1/g1RemSet.hpp
+++ b/hotspot/src/share/vm/gc_implementation/g1/g1RemSet.hpp
@@ -31,7 +31,6 @@
// collection set.
class G1CollectedHeap;
-class CardTableModRefBarrierSet;
class ConcurrentG1Refine;
class G1ParPushHeapRSClosure;
diff --git a/hotspot/src/share/vm/memory/metaspace.cpp b/hotspot/src/share/vm/memory/metaspace.cpp
index fd802d92671..7ef45f4bb25 100644
--- a/hotspot/src/share/vm/memory/metaspace.cpp
+++ b/hotspot/src/share/vm/memory/metaspace.cpp
@@ -3170,7 +3170,9 @@ void Metaspace::global_initialize() {
}
// the min_misc_data_size and min_misc_code_size estimates are based on
- // MetaspaceShared::generate_vtable_methods()
+ // MetaspaceShared::generate_vtable_methods().
+ // The minimum size only accounts for the vtable methods. Any size less than the
+ // minimum required size would cause vm crash when allocating the vtable methods.
uint min_misc_data_size = align_size_up(
MetaspaceShared::num_virtuals * MetaspaceShared::vtbl_list_size * sizeof(void*), max_alignment);
@@ -3336,6 +3338,10 @@ void Metaspace::initialize(Mutex* lock, MetaspaceType type) {
Metachunk* new_chunk = get_initialization_chunk(NonClassType,
word_size,
vsm()->medium_chunk_bunch());
+ // For dumping shared archive, report error if allocation has failed.
+ if (DumpSharedSpaces && new_chunk == NULL) {
+ report_insufficient_metaspace(MetaspaceAux::committed_bytes() + word_size * BytesPerWord);
+ }
assert(!DumpSharedSpaces || new_chunk != NULL, "should have enough space for both chunks");
if (new_chunk != NULL) {
// Add to this manager's list of chunks in use and current_chunk().
@@ -3349,6 +3355,11 @@ void Metaspace::initialize(Mutex* lock, MetaspaceType type) {
class_vsm()->medium_chunk_bunch());
if (class_chunk != NULL) {
class_vsm()->add_chunk(class_chunk, true);
+ } else {
+ // For dumping shared archive, report error if allocation has failed.
+ if (DumpSharedSpaces) {
+ report_insufficient_metaspace(MetaspaceAux::committed_bytes() + class_word_size * BytesPerWord);
+ }
}
}
diff --git a/hotspot/src/share/vm/runtime/globals.hpp b/hotspot/src/share/vm/runtime/globals.hpp
index 7e29670fb18..6d56c2f93d6 100644
--- a/hotspot/src/share/vm/runtime/globals.hpp
+++ b/hotspot/src/share/vm/runtime/globals.hpp
@@ -2951,10 +2951,6 @@ class CommandLineFlags {
develop(intx, MallocCatchPtr, -1, \
"Hit breakpoint when mallocing/freeing this pointer") \
\
- notproduct(intx, AssertRepeat, 1, \
- "number of times to evaluate expression in assert " \
- "(to estimate overhead); only works with -DUSE_REPEATED_ASSERTS") \
- \
notproduct(ccstrlist, SuppressErrorAt, "", \
"List of assertions (file:line) to muzzle") \
\
diff --git a/hotspot/src/share/vm/runtime/os.cpp b/hotspot/src/share/vm/runtime/os.cpp
index 665688b6808..31cffe27467 100644
--- a/hotspot/src/share/vm/runtime/os.cpp
+++ b/hotspot/src/share/vm/runtime/os.cpp
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1997, 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -547,20 +547,16 @@ static void verify_memory(void* ptr) {
// This function supports testing of the malloc out of memory
// condition without really running the system out of memory.
//
-static u_char* testMalloc(size_t alloc_size) {
- assert(MallocMaxTestWords > 0, "sanity check");
+static bool has_reached_max_malloc_test_peak(size_t alloc_size) {
+ if (MallocMaxTestWords > 0) {
+ jint words = (jint)(alloc_size / BytesPerWord);
- if ((cur_malloc_words + (alloc_size / BytesPerWord)) > MallocMaxTestWords) {
- return NULL;
+ if ((cur_malloc_words + words) > MallocMaxTestWords) {
+ return true;
+ }
+ Atomic::add(words, (volatile jint *)&cur_malloc_words);
}
-
- u_char* ptr = (u_char*)::malloc(alloc_size);
-
- if (ptr != NULL) {
- Atomic::add(((jint) (alloc_size / BytesPerWord)),
- (volatile jint *) &cur_malloc_words);
- }
- return ptr;
+ return false;
}
void* os::malloc(size_t size, MEMFLAGS flags) {
@@ -608,13 +604,14 @@ void* os::malloc(size_t size, MEMFLAGS memflags, const NativeCallStack& stack) {
NOT_PRODUCT(if (MallocVerifyInterval > 0) check_heap());
- u_char* ptr;
- if (MallocMaxTestWords > 0) {
- ptr = testMalloc(alloc_size);
- } else {
- ptr = (u_char*)::malloc(alloc_size);
+ // For the test flag -XX:MallocMaxTestWords
+ if (has_reached_max_malloc_test_peak(size)) {
+ return NULL;
}
+ u_char* ptr;
+ ptr = (u_char*)::malloc(alloc_size);
+
#ifdef ASSERT
if (ptr == NULL) {
return NULL;
@@ -642,6 +639,11 @@ void* os::realloc(void *memblock, size_t size, MEMFLAGS flags) {
void* os::realloc(void *memblock, size_t size, MEMFLAGS memflags, const NativeCallStack& stack) {
+ // For the test flag -XX:MallocMaxTestWords
+ if (has_reached_max_malloc_test_peak(size)) {
+ return NULL;
+ }
+
#ifndef ASSERT
NOT_PRODUCT(inc_stat_counter(&num_mallocs, 1));
NOT_PRODUCT(inc_stat_counter(&alloc_bytes, size));
diff --git a/hotspot/src/share/vm/shark/llvmHeaders.hpp b/hotspot/src/share/vm/shark/llvmHeaders.hpp
index 05ef7fea1d3..b4bd45b8f52 100644
--- a/hotspot/src/share/vm/shark/llvmHeaders.hpp
+++ b/hotspot/src/share/vm/shark/llvmHeaders.hpp
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1999, 2011, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1999, 2015, Oracle and/or its affiliates. All rights reserved.
* Copyright 2008, 2009, 2010 Red Hat, Inc.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
@@ -87,30 +87,7 @@
#undef assert
#endif
-// from hotspot/src/share/vm/utilities/debug.hpp
-#ifdef ASSERT
-#ifndef USE_REPEATED_ASSERTS
-#define assert(p, msg) \
-do { \
- if (!(p)) { \
- report_vm_error(__FILE__, __LINE__, "assert(" #p ") failed", msg); \
- BREAKPOINT; \
- } \
-} while (0)
-#else // #ifndef USE_REPEATED_ASSERTS
-#define assert(p, msg)
-do { \
- for (int __i = 0; __i < AssertRepeat; __i++) { \
- if (!(p)) { \
- report_vm_error(__FILE__, __LINE__, "assert(" #p ") failed", msg); \
- BREAKPOINT; \
- } \
- } \
-} while (0)
-#endif // #ifndef USE_REPEATED_ASSERTS
-#else
- #define assert(p, msg)
-#endif
+#define assert(p, msg) vmassert(p, msg)
#ifdef DEBUG
#undef DEBUG
diff --git a/hotspot/src/share/vm/utilities/debug.cpp b/hotspot/src/share/vm/utilities/debug.cpp
index adacdc4233f..260aadfb7b2 100644
--- a/hotspot/src/share/vm/utilities/debug.cpp
+++ b/hotspot/src/share/vm/utilities/debug.cpp
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1997, 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -273,6 +273,14 @@ void report_out_of_shared_space(SharedSpaceType shared_space) {
exit(2);
}
+void report_insufficient_metaspace(size_t required_size) {
+ warning("\nThe MaxMetaspaceSize of " UINTX_FORMAT " bytes is not large enough.\n"
+ "Either don't specify the -XX:MaxMetaspaceSize=\n"
+ "or increase the size to at least " SIZE_FORMAT ".\n",
+ MaxMetaspaceSize, required_size);
+ exit(2);
+}
+
void report_java_out_of_memory(const char* message) {
static jint out_of_memory_reported = 0;
@@ -326,9 +334,9 @@ void test_error_handler() {
// Keep this in sync with test/runtime/6888954/vmerrors.sh.
switch (n) {
- case 1: assert(str == NULL, "expected null");
- case 2: assert(num == 1023 && *str == 'X',
- err_msg("num=" SIZE_FORMAT " str=\"%s\"", num, str));
+ case 1: vmassert(str == NULL, "expected null");
+ case 2: vmassert(num == 1023 && *str == 'X',
+ err_msg("num=" SIZE_FORMAT " str=\"%s\"", num, str));
case 3: guarantee(str == NULL, "expected null");
case 4: guarantee(num == 1023 && *str == 'X',
err_msg("num=" SIZE_FORMAT " str=\"%s\"", num, str));
diff --git a/hotspot/src/share/vm/utilities/debug.hpp b/hotspot/src/share/vm/utilities/debug.hpp
index 7995e6c085d..85fae1733a5 100644
--- a/hotspot/src/share/vm/utilities/debug.hpp
+++ b/hotspot/src/share/vm/utilities/debug.hpp
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1997, 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -105,58 +105,42 @@ void FormatBuffer::append(const char* format, ...) {
va_end(argp);
}
-// Used to format messages for assert(), guarantee(), fatal(), etc.
+// Used to format messages for vmassert(), guarantee(), fatal(), etc.
typedef FormatBuffer<> err_msg;
typedef FormatBufferResource err_msg_res;
// assertions
-#ifdef ASSERT
-#ifndef USE_REPEATED_ASSERTS
-#define assert(p, msg) \
+#ifndef ASSERT
+#define vmassert(p, msg)
+#else
+// Note: message says "assert" rather than "vmassert" for backward
+// compatibility with tools that parse/match the message text.
+#define vmassert(p, msg) \
do { \
if (!(p)) { \
report_vm_error(__FILE__, __LINE__, "assert(" #p ") failed", msg); \
BREAKPOINT; \
} \
} while (0)
-#else // #ifndef USE_REPEATED_ASSERTS
-#define assert(p, msg)
-do { \
- for (int __i = 0; __i < AssertRepeat; __i++) { \
- if (!(p)) { \
- report_vm_error(__FILE__, __LINE__, "assert(" #p ") failed", msg); \
- BREAKPOINT; \
- } \
- } \
-} while (0)
-#endif // #ifndef USE_REPEATED_ASSERTS
+#endif
-// This version of assert is for use with checking return status from
+// For backward compatibility.
+#define assert(p, msg) vmassert(p, msg)
+
+// This version of vmassert is for use with checking return status from
// library calls that return actual error values eg. EINVAL,
// ENOMEM etc, rather than returning -1 and setting errno.
// When the status is not what is expected it is very useful to know
// what status was actually returned, so we pass the status variable as
// an extra arg and use strerror to convert it to a meaningful string
// like "Invalid argument", "out of memory" etc
-#define assert_status(p, status, msg) \
-do { \
- if (!(p)) { \
- report_vm_error(__FILE__, __LINE__, "assert(" #p ") failed", \
- err_msg("error %s(%d) %s", strerror(status), \
- status, msg)); \
- BREAKPOINT; \
- } \
-} while (0)
+#define vmassert_status(p, status, msg) \
+ vmassert(p, err_msg("error %s(%d), %s", strerror(status), status, msg))
-// Do not assert this condition if there's already another error reported.
-#define assert_if_no_error(cond,msg) assert((cond) || is_error_reported(), msg)
-#else // #ifdef ASSERT
- #define assert(p,msg)
- #define assert_status(p,status,msg)
- #define assert_if_no_error(cond,msg)
-#endif // #ifdef ASSERT
+// For backward compatibility.
+#define assert_status(p, status, msg) vmassert_status(p, status, msg)
-// guarantee is like assert except it's always executed -- use it for
+// guarantee is like vmassert except it's always executed -- use it for
// cheap tests that catch errors that would otherwise be hard to find.
// guarantee is also used for Verify options.
#define guarantee(p, msg) \
@@ -225,21 +209,22 @@ void report_untested(const char* file, int line, const char* message);
void warning(const char* format, ...) ATTRIBUTE_PRINTF(1, 2);
-#ifdef ASSERT
-// Compile-time asserts.
-template struct StaticAssert;
-template <> struct StaticAssert {};
+// Compile-time asserts. Cond must be a compile-time constant expression that
+// is convertible to bool. STATIC_ASSERT() can be used anywhere a declaration
+// may appear.
+//
+// Implementation Note: STATIC_ASSERT_FAILURE provides a value member
+// rather than type member that could be used directly in the typedef, because
+// a type member would require conditional use of "typename", depending on
+// whether Cond is dependent or not. The use of a value member leads to the
+// use of an array type.
-// Only StaticAssert is defined, so if cond evaluates to false we get
-// a compile time exception when trying to use StaticAssert.
-#define STATIC_ASSERT(cond) \
- do { \
- StaticAssert<(cond)> DUMMY_STATIC_ASSERT; \
- (void)DUMMY_STATIC_ASSERT; /* ignore */ \
- } while (false)
-#else
-#define STATIC_ASSERT(cond)
-#endif
+template struct STATIC_ASSERT_FAILURE;
+template<> struct STATIC_ASSERT_FAILURE { enum { value = 1 }; };
+
+#define STATIC_ASSERT(Cond) \
+ typedef char STATIC_ASSERT_FAILURE_ ## __LINE__ [ \
+ STATIC_ASSERT_FAILURE< (Cond) >::value ]
// out of shared space reporting
enum SharedSpaceType {
@@ -251,6 +236,8 @@ enum SharedSpaceType {
void report_out_of_shared_space(SharedSpaceType space_type);
+void report_insufficient_metaspace(size_t required_size);
+
// out of memory reporting
void report_java_out_of_memory(const char* message);
@@ -258,7 +245,7 @@ void report_java_out_of_memory(const char* message);
bool is_error_reported();
void set_error_reported();
-/* Test assert(), fatal(), guarantee(), etc. */
+/* Test vmassert(), fatal(), guarantee(), etc. */
NOT_PRODUCT(void test_error_handler();)
void pd_ps(frame f);
diff --git a/hotspot/src/share/vm/utilities/xmlstream.cpp b/hotspot/src/share/vm/utilities/xmlstream.cpp
index dc1fd1e599a..394c063e8b4 100644
--- a/hotspot/src/share/vm/utilities/xmlstream.cpp
+++ b/hotspot/src/share/vm/utilities/xmlstream.cpp
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2002, 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2002, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -33,6 +33,10 @@
#include "runtime/vmThread.hpp"
#include "utilities/xmlstream.hpp"
+// Do not assert this condition if there's already another error reported.
+#define assert_if_no_error(cond, msg) \
+ vmassert((cond) || is_error_reported(), msg)
+
void xmlStream::initialize(outputStream* out) {
_out = out;
_last_flush = 0;
diff --git a/hotspot/test/TEST.groups b/hotspot/test/TEST.groups
index 7ece82fabe5..8c52e3ac175 100644
--- a/hotspot/test/TEST.groups
+++ b/hotspot/test/TEST.groups
@@ -1,5 +1,5 @@
#
-# Copyright (c) 2013, 2014, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2013, 2015, Oracle and/or its affiliates. All rights reserved.
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
#
# This code is free software; you can redistribute it and/or modify it
@@ -69,7 +69,6 @@ needs_jdk = \
gc/metaspace/TestPerfCountersAndMemoryPools.java \
runtime/6819213/TestBootNativeLibraryPath.java \
runtime/7158988/FieldMonitor.java \
- runtime/7194254/Test7194254.java \
runtime/Metaspace/FragmentMetaspace.java \
runtime/NMT/BaselineWithParameter.java \
runtime/NMT/JcmdBaselineDetail.java \
@@ -94,6 +93,7 @@ needs_jdk = \
runtime/NMT/VirtualAllocTestType.java \
runtime/RedefineObject/TestRedefineObject.java \
runtime/Thread/TestThreadDumpMonitorContention.java \
+ runtime/Thread/ThreadPriorities.java \
runtime/XCheckJniJsig/XCheckJSig.java \
serviceability/attach/AttachWithStalePidFile.java \
serviceability/sa/jmap-hprof/JMapHProfLargeHeapTest.java \
@@ -232,7 +232,8 @@ needs_g1gc = \
gc/g1/ \
gc/metaspace/G1AddMetaspaceDependency.java \
gc/metaspace/TestMetaspacePerfCounters.java \
- gc/startup_warnings/TestG1.java
+ gc/startup_warnings/TestG1.java \
+ gc/whitebox/TestConcMarkCycleWB.java
# All tests that explicitly set the serial GC
#
diff --git a/hotspot/test/compiler/jsr292/RedefineMethodUsedByMultipleMethodHandles.java b/hotspot/test/compiler/jsr292/RedefineMethodUsedByMultipleMethodHandles.java
index 1695c35558a..920431525a8 100644
--- a/hotspot/test/compiler/jsr292/RedefineMethodUsedByMultipleMethodHandles.java
+++ b/hotspot/test/compiler/jsr292/RedefineMethodUsedByMultipleMethodHandles.java
@@ -26,6 +26,7 @@
* @bug 8042235
* @summary redefining method used by multiple MethodHandles crashes VM
* @compile -XDignore.symbol.file RedefineMethodUsedByMultipleMethodHandles.java
+ * @ignore 7076820
* @run main RedefineMethodUsedByMultipleMethodHandles
*/
diff --git a/hotspot/test/compiler/profiling/spectrapredefineclass/Launcher.java b/hotspot/test/compiler/profiling/spectrapredefineclass/Launcher.java
index 7a645ab0b8f..3c4f6b92bb4 100644
--- a/hotspot/test/compiler/profiling/spectrapredefineclass/Launcher.java
+++ b/hotspot/test/compiler/profiling/spectrapredefineclass/Launcher.java
@@ -28,6 +28,7 @@ import com.oracle.java.testlibrary.*;
* @bug 8038636
* @library /testlibrary
* @build Agent
+ * @ignore 7076820
* @run main ClassFileInstaller Agent
* @run main Launcher
* @run main/othervm -XX:-TieredCompilation -XX:-BackgroundCompilation -XX:-UseOnStackReplacement -XX:TypeProfileLevel=222 -XX:ReservedCodeCacheSize=3M Agent
diff --git a/hotspot/test/compiler/profiling/spectrapredefineclass_classloaders/Launcher.java b/hotspot/test/compiler/profiling/spectrapredefineclass_classloaders/Launcher.java
index 3c49cd58ea7..443f11e6c16 100644
--- a/hotspot/test/compiler/profiling/spectrapredefineclass_classloaders/Launcher.java
+++ b/hotspot/test/compiler/profiling/spectrapredefineclass_classloaders/Launcher.java
@@ -28,6 +28,7 @@ import com.oracle.java.testlibrary.*;
* @bug 8040237
* @library /testlibrary
* @build Agent Test A B
+ * @ignore 7076820
* @run main ClassFileInstaller Agent
* @run main Launcher
* @run main/othervm -XX:-TieredCompilation -XX:-BackgroundCompilation -XX:-UseOnStackReplacement -XX:TypeProfileLevel=222 -XX:ReservedCodeCacheSize=3M Agent
diff --git a/hotspot/test/gc/TestSmallHeap.java b/hotspot/test/gc/TestSmallHeap.java
index 321e33bf3b6..170b5397740 100644
--- a/hotspot/test/gc/TestSmallHeap.java
+++ b/hotspot/test/gc/TestSmallHeap.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2014, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -26,34 +26,46 @@
* @bug 8067438
* @requires vm.gc=="null"
* @summary Verify that starting the VM with a small heap works
- * @library /testlibrary
- * @run main/othervm -Xmx4m -XX:+UseParallelGC TestSmallHeap
- * @run main/othervm -Xmx4m -XX:+UseSerialGC TestSmallHeap
- * @run main/othervm -Xmx4m -XX:+UseG1GC TestSmallHeap
- * @run main/othervm -Xmx4m -XX:+UseConcMarkSweepGC -XX:CMSMarkStackSizeMax=1032 TestSmallHeap
+ * @library /testlibrary /../../test/lib
+ * @build TestSmallHeap
+ * @run main ClassFileInstaller sun.hotspot.WhiteBox
+ * @run main/othervm -Xbootclasspath/a:. -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI -Xmx2m -XX:+UseParallelGC TestSmallHeap
+ * @run main/othervm -Xbootclasspath/a:. -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI -Xmx2m -XX:+UseSerialGC TestSmallHeap
+ * @run main/othervm -Xbootclasspath/a:. -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI -Xmx2m -XX:+UseG1GC TestSmallHeap
+ * @run main/othervm -Xbootclasspath/a:. -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI -Xmx2m -XX:+UseConcMarkSweepGC TestSmallHeap
+ *
+ * Note: It would be nice to verify the minimal supported heap size (2m) here,
+ * but we align the heap size based on the card table size. And the card table
+ * size is aligned based on the minimal pages size provided by the os. This
+ * means that on most platforms, where the minimal page size is 4k, we get a
+ * minimal heap size of 2m but on Solaris/Sparc we have a page size of 8k and
+ * get a minimal heap size of 4m. And on platforms where the page size is 64k
+ * we get a minimal heap size of 32m. We never use large pages for the card table.
*
- * Note: It would be nice to verify the minimal supported heap size here,
- * but that turns out to be quite tricky since we align the heap size based
- * on the card table size. And the card table size is aligned based on the
- * minimal pages size provided by the os. This means that on most platforms,
- * where the minimal page size is 4k, we get a minimal heap size of 2m but
- * on Solaris/Sparc we have a page size of 8k and get a minimal heap size
- * of 8m.
* There is also no check in the VM for verifying that the maximum heap size
* is larger than the supported minimal heap size. This means that specifying
- * -Xmx1m on the command line is fine but will give a heap of 2m (or 4m).
- * To work around these rather strange behaviors this test uses 4m for all
- * platforms.
+ * -Xmx1m on the command line is fine but will give a heap of 2m (or 4m or 32m).
+ *
+ * To work around these rather strange behaviors this test uses -Xmx2m but then
+ * calculates what the expected heap size should be. The calculation is a
+ * simplified version of the code in the VM. We assume that the card table will
+ * use one page. Each byte in the card table corresponds to 512 bytes on the heap.
+ * So, the expected heap size is page_size * 512.
*/
-import sun.management.ManagementFactoryHelper;
+import com.oracle.java.testlibrary.*;
import static com.oracle.java.testlibrary.Asserts.*;
+import sun.hotspot.WhiteBox;
+import sun.management.ManagementFactoryHelper;
public class TestSmallHeap {
public static void main(String[] args) {
+ WhiteBox wb = WhiteBox.getWhiteBox();
+ int pageSize = wb.getVMPageSize();
+ int heapBytesPerCard = 512;
+ long expectedMaxHeap = pageSize * heapBytesPerCard;
String maxHeap = ManagementFactoryHelper.getDiagnosticMXBean().getVMOption("MaxHeapSize").getValue();
- String expectedMaxHeap = "4194304";
- assertEQ(maxHeap, expectedMaxHeap);
+ assertEQ(Long.parseLong(maxHeap), expectedMaxHeap);
}
}
diff --git a/hotspot/test/runtime/NMT/ChangeTrackingLevel.java b/hotspot/test/runtime/NMT/ChangeTrackingLevel.java
index 2794b05a833..d0df079cb66 100644
--- a/hotspot/test/runtime/NMT/ChangeTrackingLevel.java
+++ b/hotspot/test/runtime/NMT/ChangeTrackingLevel.java
@@ -27,6 +27,7 @@
* @summary Test that you can decrease NMT tracking level but not increase it.
* @key nmt
* @library /testlibrary /../../test/lib
+ * @ignore 8067167
* @build ChangeTrackingLevel
* @run main ClassFileInstaller sun.hotspot.WhiteBox
* sun.hotspot.WhiteBox$WhiteBoxPermission
diff --git a/hotspot/test/runtime/NMT/PrintNMTStatistics.java b/hotspot/test/runtime/NMT/PrintNMTStatistics.java
index 4b77303e026..ba46c20ec6f 100644
--- a/hotspot/test/runtime/NMT/PrintNMTStatistics.java
+++ b/hotspot/test/runtime/NMT/PrintNMTStatistics.java
@@ -27,6 +27,7 @@
* @bug 8005936 8058606
* @summary Verify PrintNMTStatistics on normal JVM exit for detail and summary tracking level
* @library /testlibrary
+ * @ignore 8067167
*/
import com.oracle.java.testlibrary.*;
diff --git a/hotspot/test/runtime/SharedArchiveFile/MaxMetaspaceSize.java b/hotspot/test/runtime/SharedArchiveFile/MaxMetaspaceSize.java
new file mode 100644
index 00000000000..9d8c4984377
--- /dev/null
+++ b/hotspot/test/runtime/SharedArchiveFile/MaxMetaspaceSize.java
@@ -0,0 +1,41 @@
+/*
+ * Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+/*
+ * @test
+ * @bug 8067187
+ * @summary Testing CDS dumping with the -XX:MaxMetaspaceSize= option
+ * @library /testlibrary
+ */
+
+import com.oracle.java.testlibrary.*;
+
+public class MaxMetaspaceSize {
+ public static void main(String[] args) throws Exception {
+ ProcessBuilder pb = ProcessTools.createJavaProcessBuilder(
+ "-XX:MaxMetaspaceSize=20m", "-Xshare:dump");
+ OutputAnalyzer output = new OutputAnalyzer(pb.start());
+ output.shouldContain("is not large enough.\nEither don't specify the -XX:MaxMetaspaceSize=\nor increase the size to at least");
+ output.shouldHaveExitValue(2);
+ }
+}
diff --git a/hotspot/test/runtime/7194254/Test7194254.java b/hotspot/test/runtime/Thread/ThreadPriorities.java
similarity index 50%
rename from hotspot/test/runtime/7194254/Test7194254.java
rename to hotspot/test/runtime/Thread/ThreadPriorities.java
index 08f55e55b22..18a75c1d35e 100644
--- a/hotspot/test/runtime/7194254/Test7194254.java
+++ b/hotspot/test/runtime/Thread/ThreadPriorities.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2012, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2012, 2015 Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -27,23 +27,21 @@
* @summary Creates several threads with different java priorities and checks
* whether jstack reports correct priorities for them.
*
- * @ignore 8060219
- * @run main Test7194254
+ * @library /testlibrary
+ * @run main ThreadPriorities
*/
-import java.io.BufferedReader;
-import java.io.InputStreamReader;
-import java.lang.management.ManagementFactory;
-import java.lang.management.RuntimeMXBean;
import java.util.ArrayList;
-import java.util.List;
import java.util.concurrent.CyclicBarrier;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
-public class Test7194254 {
+import com.oracle.java.testlibrary.*;
+import static com.oracle.java.testlibrary.Asserts.*;
- public static void main(String[] args) throws Exception {
+public class ThreadPriorities {
+
+ public static void main(String[] args) throws Throwable {
final int NUMBER_OF_JAVA_PRIORITIES =
Thread.MAX_PRIORITY - Thread.MIN_PRIORITY + 1;
final CyclicBarrier barrier =
@@ -68,53 +66,31 @@ public class Test7194254 {
barrier.await(); // 1st
int matches = 0;
- List failed = new ArrayList<>();
- try {
- String pid = getPid();
- String jstack = System.getProperty("java.home") + "/../bin/jstack";
- Process process = new ProcessBuilder(jstack, pid)
- .redirectErrorStream(true).start();
- Pattern pattern = Pattern.compile(
- "\\\"Priority=(\\d+)\\\".* prio=(\\d+).*");
- try (BufferedReader reader = new BufferedReader(
- new InputStreamReader(process.getInputStream()))) {
- String line;
- while((line = reader.readLine()) != null) {
- Matcher matcher = pattern.matcher(line);
- if (matcher.matches()) {
- matches += 1;
- String expected = matcher.group(1);
- String actual = matcher.group(2);
- if (!expected.equals(actual)) {
- failed.add(line);
- }
- }
+ ArrayList failed = new ArrayList<>();
+ ProcessBuilder pb = new ProcessBuilder(
+ JDKToolFinder.getJDKTool("jstack"),
+ String.valueOf(ProcessTools.getProcessId()));
+
+ String[] output = new OutputAnalyzer(pb.start()).getOutput().split("\\n+");
+
+ Pattern pattern = Pattern.compile(
+ "\\\"Priority=(\\d+)\\\".* prio=(\\d+).*");
+ for (String line : output) {
+ Matcher matcher = pattern.matcher(line);
+ if (matcher.matches()) {
+ matches += 1;
+ String expected = matcher.group(1);
+ String actual = matcher.group(2);
+ if (!expected.equals(actual)) {
+ failed.add(line);
}
}
- barrier.await(); // 2nd
- } finally {
- barrier.reset();
}
+ barrier.await(); // 2nd
+ barrier.reset();
- if (matches != NUMBER_OF_JAVA_PRIORITIES) {
- throw new AssertionError("matches: expected " +
- NUMBER_OF_JAVA_PRIORITIES + ", but was " + matches);
- }
- if (!failed.isEmpty()) {
- throw new AssertionError(failed.size() + ":" + failed);
- }
- System.out.println("Test passes.");
+ assertEquals(matches, NUMBER_OF_JAVA_PRIORITIES);
+ assertTrue(failed.isEmpty(), failed.size() + ":" + failed);
}
-
- static String getPid() {
- RuntimeMXBean runtimebean = ManagementFactory.getRuntimeMXBean();
- String vmname = runtimebean.getName();
- int i = vmname.indexOf('@');
- if (i != -1) {
- vmname = vmname.substring(0, i);
- }
- return vmname;
- }
-
}
diff --git a/hotspot/test/runtime/Unsafe/Reallocate.java b/hotspot/test/runtime/Unsafe/Reallocate.java
new file mode 100644
index 00000000000..19442038374
--- /dev/null
+++ b/hotspot/test/runtime/Unsafe/Reallocate.java
@@ -0,0 +1,67 @@
+/*
+ * Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+/*
+ * @test
+ * @bug 8058897
+ * @library /testlibrary
+ * @run main/othervm -XX:+UnlockDiagnosticVMOptions -XX:MallocMaxTestWords=100m Reallocate
+ */
+
+import com.oracle.java.testlibrary.*;
+import sun.misc.Unsafe;
+import static com.oracle.java.testlibrary.Asserts.*;
+
+public class Reallocate {
+ public static void main(String args[]) throws Exception {
+ Unsafe unsafe = Utils.getUnsafe();
+
+ long address = unsafe.allocateMemory(1);
+ assertNotEquals(address, 0L);
+
+ // Make sure we reallocate correctly
+ unsafe.putByte(address, Byte.MAX_VALUE);
+ address = unsafe.reallocateMemory(address, 2);
+ assertNotEquals(address, 0L);
+ assertEquals(unsafe.getByte(address), Byte.MAX_VALUE);
+
+ // Reallocating with a 0 size should return a null pointer
+ address = unsafe.reallocateMemory(address, 0);
+ assertEquals(address, 0L);
+
+ // Reallocating with a null pointer should result in a normal allocation
+ address = unsafe.reallocateMemory(0L, 1);
+ assertNotEquals(address, 0L);
+ unsafe.putByte(address, Byte.MAX_VALUE);
+ assertEquals(unsafe.getByte(address), Byte.MAX_VALUE);
+
+ // Make sure we can throw an OOME when we fail to reallocate due to OOM
+ try {
+ unsafe.reallocateMemory(address, 100 * 1024 * 1024 * 8);
+ } catch (OutOfMemoryError e) {
+ // Expected
+ return;
+ }
+ throw new RuntimeException("Did not get expected OOM");
+ }
+}
diff --git a/jaxp/.hgtags b/jaxp/.hgtags
index bd9d0889f34..cf9a1867715 100644
--- a/jaxp/.hgtags
+++ b/jaxp/.hgtags
@@ -287,3 +287,4 @@ a12d347f84176200593999f4da91ae2bb86865b2 jdk9-b39
47b0d3fa4118b9d56870cf4004987438c501f5c0 jdk9-b42
40b242363040229a05224fbc5dc203a3f46a8f8f jdk9-b43
0cb0844b58924d6086d2850c22087d06679d5eef jdk9-b44
+0dab3e848229127c7aca4c58b98e2d90ba70372f jdk9-b45
diff --git a/jaxws/.hgtags b/jaxws/.hgtags
index 7e1244a3c4b..e529fdaecfb 100644
--- a/jaxws/.hgtags
+++ b/jaxws/.hgtags
@@ -290,3 +290,4 @@ dd4ba422dba858b1c3c4b38f49a3e514be4e2790 jdk9-b38
301ddb4478fb36d1f025d14e7e48c2a434e9e6ff jdk9-b42
edc13d27dc871be57d7ca77eef77e6d04972fee2 jdk9-b43
2a03baa4d849818ff6d635f110c2813b12fc2326 jdk9-b44
+e529374fbe526dbd668e5e98fc047b42b3bc6d33 jdk9-b45
diff --git a/jaxws/src/java.xml.soap/share/classes/com/sun/xml/internal/messaging/saaj/LazyEnvelopeSource.java b/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/LazyEnvelopeSource.java
similarity index 100%
rename from jaxws/src/java.xml.soap/share/classes/com/sun/xml/internal/messaging/saaj/LazyEnvelopeSource.java
rename to jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/LazyEnvelopeSource.java
diff --git a/jaxws/src/java.xml.soap/share/classes/com/sun/xml/internal/messaging/saaj/SOAPExceptionImpl.java b/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/SOAPExceptionImpl.java
similarity index 100%
rename from jaxws/src/java.xml.soap/share/classes/com/sun/xml/internal/messaging/saaj/SOAPExceptionImpl.java
rename to jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/SOAPExceptionImpl.java
diff --git a/jaxws/src/java.xml.soap/share/classes/com/sun/xml/internal/messaging/saaj/client/p2p/HttpSOAPConnection.java b/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/client/p2p/HttpSOAPConnection.java
similarity index 100%
rename from jaxws/src/java.xml.soap/share/classes/com/sun/xml/internal/messaging/saaj/client/p2p/HttpSOAPConnection.java
rename to jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/client/p2p/HttpSOAPConnection.java
diff --git a/jaxws/src/java.xml.soap/share/classes/com/sun/xml/internal/messaging/saaj/client/p2p/HttpSOAPConnectionFactory.java b/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/client/p2p/HttpSOAPConnectionFactory.java
similarity index 100%
rename from jaxws/src/java.xml.soap/share/classes/com/sun/xml/internal/messaging/saaj/client/p2p/HttpSOAPConnectionFactory.java
rename to jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/client/p2p/HttpSOAPConnectionFactory.java
diff --git a/jaxws/src/java.xml.soap/share/classes/com/sun/xml/internal/messaging/saaj/client/p2p/LocalStrings.properties b/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/client/p2p/LocalStrings.properties
similarity index 100%
rename from jaxws/src/java.xml.soap/share/classes/com/sun/xml/internal/messaging/saaj/client/p2p/LocalStrings.properties
rename to jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/client/p2p/LocalStrings.properties
diff --git a/jaxws/src/java.xml.soap/share/classes/com/sun/xml/internal/messaging/saaj/client/p2p/LocalStrings_de.properties b/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/client/p2p/LocalStrings_de.properties
similarity index 100%
rename from jaxws/src/java.xml.soap/share/classes/com/sun/xml/internal/messaging/saaj/client/p2p/LocalStrings_de.properties
rename to jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/client/p2p/LocalStrings_de.properties
diff --git a/jaxws/src/java.xml.soap/share/classes/com/sun/xml/internal/messaging/saaj/client/p2p/LocalStrings_es.properties b/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/client/p2p/LocalStrings_es.properties
similarity index 100%
rename from jaxws/src/java.xml.soap/share/classes/com/sun/xml/internal/messaging/saaj/client/p2p/LocalStrings_es.properties
rename to jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/client/p2p/LocalStrings_es.properties
diff --git a/jaxws/src/java.xml.soap/share/classes/com/sun/xml/internal/messaging/saaj/client/p2p/LocalStrings_fr.properties b/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/client/p2p/LocalStrings_fr.properties
similarity index 100%
rename from jaxws/src/java.xml.soap/share/classes/com/sun/xml/internal/messaging/saaj/client/p2p/LocalStrings_fr.properties
rename to jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/client/p2p/LocalStrings_fr.properties
diff --git a/jaxws/src/java.xml.soap/share/classes/com/sun/xml/internal/messaging/saaj/client/p2p/LocalStrings_it.properties b/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/client/p2p/LocalStrings_it.properties
similarity index 100%
rename from jaxws/src/java.xml.soap/share/classes/com/sun/xml/internal/messaging/saaj/client/p2p/LocalStrings_it.properties
rename to jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/client/p2p/LocalStrings_it.properties
diff --git a/jaxws/src/java.xml.soap/share/classes/com/sun/xml/internal/messaging/saaj/client/p2p/LocalStrings_ja.properties b/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/client/p2p/LocalStrings_ja.properties
similarity index 100%
rename from jaxws/src/java.xml.soap/share/classes/com/sun/xml/internal/messaging/saaj/client/p2p/LocalStrings_ja.properties
rename to jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/client/p2p/LocalStrings_ja.properties
diff --git a/jaxws/src/java.xml.soap/share/classes/com/sun/xml/internal/messaging/saaj/client/p2p/LocalStrings_ko.properties b/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/client/p2p/LocalStrings_ko.properties
similarity index 100%
rename from jaxws/src/java.xml.soap/share/classes/com/sun/xml/internal/messaging/saaj/client/p2p/LocalStrings_ko.properties
rename to jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/client/p2p/LocalStrings_ko.properties
diff --git a/jaxws/src/java.xml.soap/share/classes/com/sun/xml/internal/messaging/saaj/client/p2p/LocalStrings_pt_BR.properties b/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/client/p2p/LocalStrings_pt_BR.properties
similarity index 100%
rename from jaxws/src/java.xml.soap/share/classes/com/sun/xml/internal/messaging/saaj/client/p2p/LocalStrings_pt_BR.properties
rename to jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/client/p2p/LocalStrings_pt_BR.properties
diff --git a/jaxws/src/java.xml.soap/share/classes/com/sun/xml/internal/messaging/saaj/client/p2p/LocalStrings_zh_CN.properties b/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/client/p2p/LocalStrings_zh_CN.properties
similarity index 100%
rename from jaxws/src/java.xml.soap/share/classes/com/sun/xml/internal/messaging/saaj/client/p2p/LocalStrings_zh_CN.properties
rename to jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/client/p2p/LocalStrings_zh_CN.properties
diff --git a/jaxws/src/java.xml.soap/share/classes/com/sun/xml/internal/messaging/saaj/client/p2p/LocalStrings_zh_TW.properties b/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/client/p2p/LocalStrings_zh_TW.properties
similarity index 100%
rename from jaxws/src/java.xml.soap/share/classes/com/sun/xml/internal/messaging/saaj/client/p2p/LocalStrings_zh_TW.properties
rename to jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/client/p2p/LocalStrings_zh_TW.properties
diff --git a/jaxws/src/java.xml.soap/share/classes/com/sun/xml/internal/messaging/saaj/packaging/mime/Header.java b/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/packaging/mime/Header.java
similarity index 100%
rename from jaxws/src/java.xml.soap/share/classes/com/sun/xml/internal/messaging/saaj/packaging/mime/Header.java
rename to jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/packaging/mime/Header.java
diff --git a/jaxws/src/java.xml.soap/share/classes/com/sun/xml/internal/messaging/saaj/packaging/mime/MessagingException.java b/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/packaging/mime/MessagingException.java
similarity index 100%
rename from jaxws/src/java.xml.soap/share/classes/com/sun/xml/internal/messaging/saaj/packaging/mime/MessagingException.java
rename to jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/packaging/mime/MessagingException.java
diff --git a/jaxws/src/java.xml.soap/share/classes/com/sun/xml/internal/messaging/saaj/packaging/mime/MultipartDataSource.java b/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/packaging/mime/MultipartDataSource.java
similarity index 100%
rename from jaxws/src/java.xml.soap/share/classes/com/sun/xml/internal/messaging/saaj/packaging/mime/MultipartDataSource.java
rename to jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/packaging/mime/MultipartDataSource.java
diff --git a/jaxws/src/java.xml.soap/share/classes/com/sun/xml/internal/messaging/saaj/packaging/mime/internet/BMMimeMultipart.java b/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/packaging/mime/internet/BMMimeMultipart.java
similarity index 100%
rename from jaxws/src/java.xml.soap/share/classes/com/sun/xml/internal/messaging/saaj/packaging/mime/internet/BMMimeMultipart.java
rename to jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/packaging/mime/internet/BMMimeMultipart.java
diff --git a/jaxws/src/java.xml.soap/share/classes/com/sun/xml/internal/messaging/saaj/packaging/mime/internet/ContentDisposition.java b/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/packaging/mime/internet/ContentDisposition.java
similarity index 100%
rename from jaxws/src/java.xml.soap/share/classes/com/sun/xml/internal/messaging/saaj/packaging/mime/internet/ContentDisposition.java
rename to jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/packaging/mime/internet/ContentDisposition.java
diff --git a/jaxws/src/java.xml.soap/share/classes/com/sun/xml/internal/messaging/saaj/packaging/mime/internet/ContentType.java b/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/packaging/mime/internet/ContentType.java
similarity index 100%
rename from jaxws/src/java.xml.soap/share/classes/com/sun/xml/internal/messaging/saaj/packaging/mime/internet/ContentType.java
rename to jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/packaging/mime/internet/ContentType.java
diff --git a/jaxws/src/java.xml.soap/share/classes/com/sun/xml/internal/messaging/saaj/packaging/mime/internet/HeaderTokenizer.java b/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/packaging/mime/internet/HeaderTokenizer.java
similarity index 100%
rename from jaxws/src/java.xml.soap/share/classes/com/sun/xml/internal/messaging/saaj/packaging/mime/internet/HeaderTokenizer.java
rename to jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/packaging/mime/internet/HeaderTokenizer.java
diff --git a/jaxws/src/java.xml.soap/share/classes/com/sun/xml/internal/messaging/saaj/packaging/mime/internet/InternetHeaders.java b/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/packaging/mime/internet/InternetHeaders.java
similarity index 100%
rename from jaxws/src/java.xml.soap/share/classes/com/sun/xml/internal/messaging/saaj/packaging/mime/internet/InternetHeaders.java
rename to jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/packaging/mime/internet/InternetHeaders.java
diff --git a/jaxws/src/java.xml.soap/share/classes/com/sun/xml/internal/messaging/saaj/packaging/mime/internet/MimeBodyPart.java b/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/packaging/mime/internet/MimeBodyPart.java
similarity index 100%
rename from jaxws/src/java.xml.soap/share/classes/com/sun/xml/internal/messaging/saaj/packaging/mime/internet/MimeBodyPart.java
rename to jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/packaging/mime/internet/MimeBodyPart.java
diff --git a/jaxws/src/java.xml.soap/share/classes/com/sun/xml/internal/messaging/saaj/packaging/mime/internet/MimeMultipart.java b/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/packaging/mime/internet/MimeMultipart.java
similarity index 100%
rename from jaxws/src/java.xml.soap/share/classes/com/sun/xml/internal/messaging/saaj/packaging/mime/internet/MimeMultipart.java
rename to jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/packaging/mime/internet/MimeMultipart.java
diff --git a/jaxws/src/java.xml.soap/share/classes/com/sun/xml/internal/messaging/saaj/packaging/mime/internet/MimePartDataSource.java b/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/packaging/mime/internet/MimePartDataSource.java
similarity index 100%
rename from jaxws/src/java.xml.soap/share/classes/com/sun/xml/internal/messaging/saaj/packaging/mime/internet/MimePartDataSource.java
rename to jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/packaging/mime/internet/MimePartDataSource.java
diff --git a/jaxws/src/java.xml.soap/share/classes/com/sun/xml/internal/messaging/saaj/packaging/mime/internet/MimePullMultipart.java b/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/packaging/mime/internet/MimePullMultipart.java
similarity index 100%
rename from jaxws/src/java.xml.soap/share/classes/com/sun/xml/internal/messaging/saaj/packaging/mime/internet/MimePullMultipart.java
rename to jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/packaging/mime/internet/MimePullMultipart.java
diff --git a/jaxws/src/java.xml.soap/share/classes/com/sun/xml/internal/messaging/saaj/packaging/mime/internet/MimeUtility.java b/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/packaging/mime/internet/MimeUtility.java
similarity index 100%
rename from jaxws/src/java.xml.soap/share/classes/com/sun/xml/internal/messaging/saaj/packaging/mime/internet/MimeUtility.java
rename to jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/packaging/mime/internet/MimeUtility.java
diff --git a/jaxws/src/java.xml.soap/share/classes/com/sun/xml/internal/messaging/saaj/packaging/mime/internet/ParameterList.java b/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/packaging/mime/internet/ParameterList.java
similarity index 100%
rename from jaxws/src/java.xml.soap/share/classes/com/sun/xml/internal/messaging/saaj/packaging/mime/internet/ParameterList.java
rename to jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/packaging/mime/internet/ParameterList.java
diff --git a/jaxws/src/java.xml.soap/share/classes/com/sun/xml/internal/messaging/saaj/packaging/mime/internet/ParseException.java b/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/packaging/mime/internet/ParseException.java
similarity index 100%
rename from jaxws/src/java.xml.soap/share/classes/com/sun/xml/internal/messaging/saaj/packaging/mime/internet/ParseException.java
rename to jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/packaging/mime/internet/ParseException.java
diff --git a/jaxws/src/java.xml.soap/share/classes/com/sun/xml/internal/messaging/saaj/packaging/mime/internet/SharedInputStream.java b/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/packaging/mime/internet/SharedInputStream.java
similarity index 100%
rename from jaxws/src/java.xml.soap/share/classes/com/sun/xml/internal/messaging/saaj/packaging/mime/internet/SharedInputStream.java
rename to jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/packaging/mime/internet/SharedInputStream.java
diff --git a/jaxws/src/java.xml.soap/share/classes/com/sun/xml/internal/messaging/saaj/packaging/mime/internet/UniqueValue.java b/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/packaging/mime/internet/UniqueValue.java
similarity index 100%
rename from jaxws/src/java.xml.soap/share/classes/com/sun/xml/internal/messaging/saaj/packaging/mime/internet/UniqueValue.java
rename to jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/packaging/mime/internet/UniqueValue.java
diff --git a/jaxws/src/java.xml.soap/share/classes/com/sun/xml/internal/messaging/saaj/packaging/mime/util/ASCIIUtility.java b/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/packaging/mime/util/ASCIIUtility.java
similarity index 100%
rename from jaxws/src/java.xml.soap/share/classes/com/sun/xml/internal/messaging/saaj/packaging/mime/util/ASCIIUtility.java
rename to jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/packaging/mime/util/ASCIIUtility.java
diff --git a/jaxws/src/java.xml.soap/share/classes/com/sun/xml/internal/messaging/saaj/packaging/mime/util/BASE64DecoderStream.java b/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/packaging/mime/util/BASE64DecoderStream.java
similarity index 100%
rename from jaxws/src/java.xml.soap/share/classes/com/sun/xml/internal/messaging/saaj/packaging/mime/util/BASE64DecoderStream.java
rename to jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/packaging/mime/util/BASE64DecoderStream.java
diff --git a/jaxws/src/java.xml.soap/share/classes/com/sun/xml/internal/messaging/saaj/packaging/mime/util/BASE64EncoderStream.java b/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/packaging/mime/util/BASE64EncoderStream.java
similarity index 100%
rename from jaxws/src/java.xml.soap/share/classes/com/sun/xml/internal/messaging/saaj/packaging/mime/util/BASE64EncoderStream.java
rename to jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/packaging/mime/util/BASE64EncoderStream.java
diff --git a/jaxws/src/java.xml.soap/share/classes/com/sun/xml/internal/messaging/saaj/packaging/mime/util/BEncoderStream.java b/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/packaging/mime/util/BEncoderStream.java
similarity index 100%
rename from jaxws/src/java.xml.soap/share/classes/com/sun/xml/internal/messaging/saaj/packaging/mime/util/BEncoderStream.java
rename to jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/packaging/mime/util/BEncoderStream.java
diff --git a/jaxws/src/java.xml.soap/share/classes/com/sun/xml/internal/messaging/saaj/packaging/mime/util/LineInputStream.java b/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/packaging/mime/util/LineInputStream.java
similarity index 100%
rename from jaxws/src/java.xml.soap/share/classes/com/sun/xml/internal/messaging/saaj/packaging/mime/util/LineInputStream.java
rename to jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/packaging/mime/util/LineInputStream.java
diff --git a/jaxws/src/java.xml.soap/share/classes/com/sun/xml/internal/messaging/saaj/packaging/mime/util/OutputUtil.java b/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/packaging/mime/util/OutputUtil.java
similarity index 100%
rename from jaxws/src/java.xml.soap/share/classes/com/sun/xml/internal/messaging/saaj/packaging/mime/util/OutputUtil.java
rename to jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/packaging/mime/util/OutputUtil.java
diff --git a/jaxws/src/java.xml.soap/share/classes/com/sun/xml/internal/messaging/saaj/packaging/mime/util/QDecoderStream.java b/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/packaging/mime/util/QDecoderStream.java
similarity index 100%
rename from jaxws/src/java.xml.soap/share/classes/com/sun/xml/internal/messaging/saaj/packaging/mime/util/QDecoderStream.java
rename to jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/packaging/mime/util/QDecoderStream.java
diff --git a/jaxws/src/java.xml.soap/share/classes/com/sun/xml/internal/messaging/saaj/packaging/mime/util/QEncoderStream.java b/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/packaging/mime/util/QEncoderStream.java
similarity index 100%
rename from jaxws/src/java.xml.soap/share/classes/com/sun/xml/internal/messaging/saaj/packaging/mime/util/QEncoderStream.java
rename to jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/packaging/mime/util/QEncoderStream.java
diff --git a/jaxws/src/java.xml.soap/share/classes/com/sun/xml/internal/messaging/saaj/packaging/mime/util/QPDecoderStream.java b/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/packaging/mime/util/QPDecoderStream.java
similarity index 100%
rename from jaxws/src/java.xml.soap/share/classes/com/sun/xml/internal/messaging/saaj/packaging/mime/util/QPDecoderStream.java
rename to jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/packaging/mime/util/QPDecoderStream.java
diff --git a/jaxws/src/java.xml.soap/share/classes/com/sun/xml/internal/messaging/saaj/packaging/mime/util/QPEncoderStream.java b/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/packaging/mime/util/QPEncoderStream.java
similarity index 100%
rename from jaxws/src/java.xml.soap/share/classes/com/sun/xml/internal/messaging/saaj/packaging/mime/util/QPEncoderStream.java
rename to jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/packaging/mime/util/QPEncoderStream.java
diff --git a/jaxws/src/java.xml.soap/share/classes/com/sun/xml/internal/messaging/saaj/packaging/mime/util/UUDecoderStream.java b/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/packaging/mime/util/UUDecoderStream.java
similarity index 100%
rename from jaxws/src/java.xml.soap/share/classes/com/sun/xml/internal/messaging/saaj/packaging/mime/util/UUDecoderStream.java
rename to jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/packaging/mime/util/UUDecoderStream.java
diff --git a/jaxws/src/java.xml.soap/share/classes/com/sun/xml/internal/messaging/saaj/packaging/mime/util/UUEncoderStream.java b/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/packaging/mime/util/UUEncoderStream.java
similarity index 100%
rename from jaxws/src/java.xml.soap/share/classes/com/sun/xml/internal/messaging/saaj/packaging/mime/util/UUEncoderStream.java
rename to jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/packaging/mime/util/UUEncoderStream.java
diff --git a/jaxws/src/java.xml.soap/share/classes/com/sun/xml/internal/messaging/saaj/soap/AttachmentPartImpl.java b/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/soap/AttachmentPartImpl.java
similarity index 100%
rename from jaxws/src/java.xml.soap/share/classes/com/sun/xml/internal/messaging/saaj/soap/AttachmentPartImpl.java
rename to jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/soap/AttachmentPartImpl.java
diff --git a/jaxws/src/java.xml.soap/share/classes/com/sun/xml/internal/messaging/saaj/soap/ContextClassloaderLocal.java b/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/soap/ContextClassloaderLocal.java
similarity index 100%
rename from jaxws/src/java.xml.soap/share/classes/com/sun/xml/internal/messaging/saaj/soap/ContextClassloaderLocal.java
rename to jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/soap/ContextClassloaderLocal.java
diff --git a/jaxws/src/java.xml.soap/share/classes/com/sun/xml/internal/messaging/saaj/soap/ContextClassloaderLocal.properties b/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/soap/ContextClassloaderLocal.properties
similarity index 100%
rename from jaxws/src/java.xml.soap/share/classes/com/sun/xml/internal/messaging/saaj/soap/ContextClassloaderLocal.properties
rename to jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/soap/ContextClassloaderLocal.properties
diff --git a/jaxws/src/java.xml.soap/share/classes/com/sun/xml/internal/messaging/saaj/soap/Envelope.java b/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/soap/Envelope.java
similarity index 100%
rename from jaxws/src/java.xml.soap/share/classes/com/sun/xml/internal/messaging/saaj/soap/Envelope.java
rename to jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/soap/Envelope.java
diff --git a/jaxws/src/java.xml.soap/share/classes/com/sun/xml/internal/messaging/saaj/soap/EnvelopeFactory.java b/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/soap/EnvelopeFactory.java
similarity index 100%
rename from jaxws/src/java.xml.soap/share/classes/com/sun/xml/internal/messaging/saaj/soap/EnvelopeFactory.java
rename to jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/soap/EnvelopeFactory.java
diff --git a/jaxws/src/java.xml.soap/share/classes/com/sun/xml/internal/messaging/saaj/soap/FastInfosetDataContentHandler.java b/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/soap/FastInfosetDataContentHandler.java
similarity index 100%
rename from jaxws/src/java.xml.soap/share/classes/com/sun/xml/internal/messaging/saaj/soap/FastInfosetDataContentHandler.java
rename to jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/soap/FastInfosetDataContentHandler.java
diff --git a/jaxws/src/java.xml.soap/share/classes/com/sun/xml/internal/messaging/saaj/soap/GifDataContentHandler.java b/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/soap/GifDataContentHandler.java
similarity index 100%
rename from jaxws/src/java.xml.soap/share/classes/com/sun/xml/internal/messaging/saaj/soap/GifDataContentHandler.java
rename to jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/soap/GifDataContentHandler.java
diff --git a/jaxws/src/java.xml.soap/share/classes/com/sun/xml/internal/messaging/saaj/soap/ImageDataContentHandler.java b/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/soap/ImageDataContentHandler.java
similarity index 100%
rename from jaxws/src/java.xml.soap/share/classes/com/sun/xml/internal/messaging/saaj/soap/ImageDataContentHandler.java
rename to jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/soap/ImageDataContentHandler.java
diff --git a/jaxws/src/java.xml.soap/share/classes/com/sun/xml/internal/messaging/saaj/soap/JpegDataContentHandler.java b/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/soap/JpegDataContentHandler.java
similarity index 100%
rename from jaxws/src/java.xml.soap/share/classes/com/sun/xml/internal/messaging/saaj/soap/JpegDataContentHandler.java
rename to jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/soap/JpegDataContentHandler.java
diff --git a/jaxws/src/java.xml.soap/share/classes/com/sun/xml/internal/messaging/saaj/soap/LazyEnvelope.java b/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/soap/LazyEnvelope.java
similarity index 100%
rename from jaxws/src/java.xml.soap/share/classes/com/sun/xml/internal/messaging/saaj/soap/LazyEnvelope.java
rename to jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/soap/LazyEnvelope.java
diff --git a/jaxws/src/java.xml.soap/share/classes/com/sun/xml/internal/messaging/saaj/soap/LocalStrings.properties b/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/soap/LocalStrings.properties
similarity index 100%
rename from jaxws/src/java.xml.soap/share/classes/com/sun/xml/internal/messaging/saaj/soap/LocalStrings.properties
rename to jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/soap/LocalStrings.properties
diff --git a/jaxws/src/java.xml.soap/share/classes/com/sun/xml/internal/messaging/saaj/soap/LocalStrings_de.properties b/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/soap/LocalStrings_de.properties
similarity index 100%
rename from jaxws/src/java.xml.soap/share/classes/com/sun/xml/internal/messaging/saaj/soap/LocalStrings_de.properties
rename to jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/soap/LocalStrings_de.properties
diff --git a/jaxws/src/java.xml.soap/share/classes/com/sun/xml/internal/messaging/saaj/soap/LocalStrings_es.properties b/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/soap/LocalStrings_es.properties
similarity index 100%
rename from jaxws/src/java.xml.soap/share/classes/com/sun/xml/internal/messaging/saaj/soap/LocalStrings_es.properties
rename to jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/soap/LocalStrings_es.properties
diff --git a/jaxws/src/java.xml.soap/share/classes/com/sun/xml/internal/messaging/saaj/soap/LocalStrings_fr.properties b/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/soap/LocalStrings_fr.properties
similarity index 100%
rename from jaxws/src/java.xml.soap/share/classes/com/sun/xml/internal/messaging/saaj/soap/LocalStrings_fr.properties
rename to jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/soap/LocalStrings_fr.properties
diff --git a/jaxws/src/java.xml.soap/share/classes/com/sun/xml/internal/messaging/saaj/soap/LocalStrings_it.properties b/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/soap/LocalStrings_it.properties
similarity index 100%
rename from jaxws/src/java.xml.soap/share/classes/com/sun/xml/internal/messaging/saaj/soap/LocalStrings_it.properties
rename to jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/soap/LocalStrings_it.properties
diff --git a/jaxws/src/java.xml.soap/share/classes/com/sun/xml/internal/messaging/saaj/soap/LocalStrings_ja.properties b/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/soap/LocalStrings_ja.properties
similarity index 100%
rename from jaxws/src/java.xml.soap/share/classes/com/sun/xml/internal/messaging/saaj/soap/LocalStrings_ja.properties
rename to jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/soap/LocalStrings_ja.properties
diff --git a/jaxws/src/java.xml.soap/share/classes/com/sun/xml/internal/messaging/saaj/soap/LocalStrings_ko.properties b/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/soap/LocalStrings_ko.properties
similarity index 100%
rename from jaxws/src/java.xml.soap/share/classes/com/sun/xml/internal/messaging/saaj/soap/LocalStrings_ko.properties
rename to jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/soap/LocalStrings_ko.properties
diff --git a/jaxws/src/java.xml.soap/share/classes/com/sun/xml/internal/messaging/saaj/soap/LocalStrings_pt_BR.properties b/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/soap/LocalStrings_pt_BR.properties
similarity index 100%
rename from jaxws/src/java.xml.soap/share/classes/com/sun/xml/internal/messaging/saaj/soap/LocalStrings_pt_BR.properties
rename to jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/soap/LocalStrings_pt_BR.properties
diff --git a/jaxws/src/java.xml.soap/share/classes/com/sun/xml/internal/messaging/saaj/soap/LocalStrings_zh_CN.properties b/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/soap/LocalStrings_zh_CN.properties
similarity index 100%
rename from jaxws/src/java.xml.soap/share/classes/com/sun/xml/internal/messaging/saaj/soap/LocalStrings_zh_CN.properties
rename to jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/soap/LocalStrings_zh_CN.properties
diff --git a/jaxws/src/java.xml.soap/share/classes/com/sun/xml/internal/messaging/saaj/soap/LocalStrings_zh_TW.properties b/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/soap/LocalStrings_zh_TW.properties
similarity index 100%
rename from jaxws/src/java.xml.soap/share/classes/com/sun/xml/internal/messaging/saaj/soap/LocalStrings_zh_TW.properties
rename to jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/soap/LocalStrings_zh_TW.properties
diff --git a/jaxws/src/java.xml.soap/share/classes/com/sun/xml/internal/messaging/saaj/soap/MessageFactoryImpl.java b/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/soap/MessageFactoryImpl.java
similarity index 100%
rename from jaxws/src/java.xml.soap/share/classes/com/sun/xml/internal/messaging/saaj/soap/MessageFactoryImpl.java
rename to jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/soap/MessageFactoryImpl.java
diff --git a/jaxws/src/java.xml.soap/share/classes/com/sun/xml/internal/messaging/saaj/soap/MessageImpl.java b/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/soap/MessageImpl.java
similarity index 100%
rename from jaxws/src/java.xml.soap/share/classes/com/sun/xml/internal/messaging/saaj/soap/MessageImpl.java
rename to jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/soap/MessageImpl.java
diff --git a/jaxws/src/java.xml.soap/share/classes/com/sun/xml/internal/messaging/saaj/soap/MultipartDataContentHandler.java b/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/soap/MultipartDataContentHandler.java
similarity index 100%
rename from jaxws/src/java.xml.soap/share/classes/com/sun/xml/internal/messaging/saaj/soap/MultipartDataContentHandler.java
rename to jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/soap/MultipartDataContentHandler.java
diff --git a/jaxws/src/java.xml.soap/share/classes/com/sun/xml/internal/messaging/saaj/soap/SAAJMetaFactoryImpl.java b/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/soap/SAAJMetaFactoryImpl.java
similarity index 100%
rename from jaxws/src/java.xml.soap/share/classes/com/sun/xml/internal/messaging/saaj/soap/SAAJMetaFactoryImpl.java
rename to jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/soap/SAAJMetaFactoryImpl.java
diff --git a/jaxws/src/java.xml.soap/share/classes/com/sun/xml/internal/messaging/saaj/soap/SOAPDocument.java b/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/soap/SOAPDocument.java
similarity index 100%
rename from jaxws/src/java.xml.soap/share/classes/com/sun/xml/internal/messaging/saaj/soap/SOAPDocument.java
rename to jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/soap/SOAPDocument.java
diff --git a/jaxws/src/java.xml.soap/share/classes/com/sun/xml/internal/messaging/saaj/soap/SOAPDocumentFragment.java b/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/soap/SOAPDocumentFragment.java
similarity index 100%
rename from jaxws/src/java.xml.soap/share/classes/com/sun/xml/internal/messaging/saaj/soap/SOAPDocumentFragment.java
rename to jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/soap/SOAPDocumentFragment.java
diff --git a/jaxws/src/java.xml.soap/share/classes/com/sun/xml/internal/messaging/saaj/soap/SOAPDocumentImpl.java b/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/soap/SOAPDocumentImpl.java
similarity index 100%
rename from jaxws/src/java.xml.soap/share/classes/com/sun/xml/internal/messaging/saaj/soap/SOAPDocumentImpl.java
rename to jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/soap/SOAPDocumentImpl.java
diff --git a/jaxws/src/java.xml.soap/share/classes/com/sun/xml/internal/messaging/saaj/soap/SOAPFactoryImpl.java b/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/soap/SOAPFactoryImpl.java
similarity index 100%
rename from jaxws/src/java.xml.soap/share/classes/com/sun/xml/internal/messaging/saaj/soap/SOAPFactoryImpl.java
rename to jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/soap/SOAPFactoryImpl.java
diff --git a/jaxws/src/java.xml.soap/share/classes/com/sun/xml/internal/messaging/saaj/soap/SOAPIOException.java b/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/soap/SOAPIOException.java
similarity index 100%
rename from jaxws/src/java.xml.soap/share/classes/com/sun/xml/internal/messaging/saaj/soap/SOAPIOException.java
rename to jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/soap/SOAPIOException.java
diff --git a/jaxws/src/java.xml.soap/share/classes/com/sun/xml/internal/messaging/saaj/soap/SOAPPartImpl.java b/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/soap/SOAPPartImpl.java
similarity index 100%
rename from jaxws/src/java.xml.soap/share/classes/com/sun/xml/internal/messaging/saaj/soap/SOAPPartImpl.java
rename to jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/soap/SOAPPartImpl.java
diff --git a/jaxws/src/java.xml.soap/share/classes/com/sun/xml/internal/messaging/saaj/soap/SOAPVersionMismatchException.java b/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/soap/SOAPVersionMismatchException.java
similarity index 100%
rename from jaxws/src/java.xml.soap/share/classes/com/sun/xml/internal/messaging/saaj/soap/SOAPVersionMismatchException.java
rename to jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/soap/SOAPVersionMismatchException.java
diff --git a/jaxws/src/java.xml.soap/share/classes/com/sun/xml/internal/messaging/saaj/soap/StaxBridge.java b/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/soap/StaxBridge.java
similarity index 100%
rename from jaxws/src/java.xml.soap/share/classes/com/sun/xml/internal/messaging/saaj/soap/StaxBridge.java
rename to jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/soap/StaxBridge.java
diff --git a/jaxws/src/java.xml.soap/share/classes/com/sun/xml/internal/messaging/saaj/soap/StaxLazySourceBridge.java b/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/soap/StaxLazySourceBridge.java
similarity index 100%
rename from jaxws/src/java.xml.soap/share/classes/com/sun/xml/internal/messaging/saaj/soap/StaxLazySourceBridge.java
rename to jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/soap/StaxLazySourceBridge.java
diff --git a/jaxws/src/java.xml.soap/share/classes/com/sun/xml/internal/messaging/saaj/soap/StaxReaderBridge.java b/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/soap/StaxReaderBridge.java
similarity index 100%
rename from jaxws/src/java.xml.soap/share/classes/com/sun/xml/internal/messaging/saaj/soap/StaxReaderBridge.java
rename to jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/soap/StaxReaderBridge.java
diff --git a/jaxws/src/java.xml.soap/share/classes/com/sun/xml/internal/messaging/saaj/soap/StringDataContentHandler.java b/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/soap/StringDataContentHandler.java
similarity index 100%
rename from jaxws/src/java.xml.soap/share/classes/com/sun/xml/internal/messaging/saaj/soap/StringDataContentHandler.java
rename to jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/soap/StringDataContentHandler.java
diff --git a/jaxws/src/java.xml.soap/share/classes/com/sun/xml/internal/messaging/saaj/soap/XmlDataContentHandler.java b/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/soap/XmlDataContentHandler.java
similarity index 100%
rename from jaxws/src/java.xml.soap/share/classes/com/sun/xml/internal/messaging/saaj/soap/XmlDataContentHandler.java
rename to jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/soap/XmlDataContentHandler.java
diff --git a/jaxws/src/java.xml.soap/share/classes/com/sun/xml/internal/messaging/saaj/soap/dynamic/SOAPFactoryDynamicImpl.java b/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/soap/dynamic/SOAPFactoryDynamicImpl.java
similarity index 100%
rename from jaxws/src/java.xml.soap/share/classes/com/sun/xml/internal/messaging/saaj/soap/dynamic/SOAPFactoryDynamicImpl.java
rename to jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/soap/dynamic/SOAPFactoryDynamicImpl.java
diff --git a/jaxws/src/java.xml.soap/share/classes/com/sun/xml/internal/messaging/saaj/soap/dynamic/SOAPMessageFactoryDynamicImpl.java b/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/soap/dynamic/SOAPMessageFactoryDynamicImpl.java
similarity index 100%
rename from jaxws/src/java.xml.soap/share/classes/com/sun/xml/internal/messaging/saaj/soap/dynamic/SOAPMessageFactoryDynamicImpl.java
rename to jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/soap/dynamic/SOAPMessageFactoryDynamicImpl.java
diff --git a/jaxws/src/java.xml.soap/share/classes/com/sun/xml/internal/messaging/saaj/soap/impl/BodyElementImpl.java b/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/soap/impl/BodyElementImpl.java
similarity index 100%
rename from jaxws/src/java.xml.soap/share/classes/com/sun/xml/internal/messaging/saaj/soap/impl/BodyElementImpl.java
rename to jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/soap/impl/BodyElementImpl.java
diff --git a/jaxws/src/java.xml.soap/share/classes/com/sun/xml/internal/messaging/saaj/soap/impl/BodyImpl.java b/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/soap/impl/BodyImpl.java
similarity index 100%
rename from jaxws/src/java.xml.soap/share/classes/com/sun/xml/internal/messaging/saaj/soap/impl/BodyImpl.java
rename to jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/soap/impl/BodyImpl.java
diff --git a/jaxws/src/java.xml.soap/share/classes/com/sun/xml/internal/messaging/saaj/soap/impl/CDATAImpl.java b/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/soap/impl/CDATAImpl.java
similarity index 100%
rename from jaxws/src/java.xml.soap/share/classes/com/sun/xml/internal/messaging/saaj/soap/impl/CDATAImpl.java
rename to jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/soap/impl/CDATAImpl.java
diff --git a/jaxws/src/java.xml.soap/share/classes/com/sun/xml/internal/messaging/saaj/soap/impl/DetailEntryImpl.java b/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/soap/impl/DetailEntryImpl.java
similarity index 100%
rename from jaxws/src/java.xml.soap/share/classes/com/sun/xml/internal/messaging/saaj/soap/impl/DetailEntryImpl.java
rename to jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/soap/impl/DetailEntryImpl.java
diff --git a/jaxws/src/java.xml.soap/share/classes/com/sun/xml/internal/messaging/saaj/soap/impl/DetailImpl.java b/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/soap/impl/DetailImpl.java
similarity index 100%
rename from jaxws/src/java.xml.soap/share/classes/com/sun/xml/internal/messaging/saaj/soap/impl/DetailImpl.java
rename to jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/soap/impl/DetailImpl.java
diff --git a/jaxws/src/java.xml.soap/share/classes/com/sun/xml/internal/messaging/saaj/soap/impl/ElementFactory.java b/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/soap/impl/ElementFactory.java
similarity index 100%
rename from jaxws/src/java.xml.soap/share/classes/com/sun/xml/internal/messaging/saaj/soap/impl/ElementFactory.java
rename to jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/soap/impl/ElementFactory.java
diff --git a/jaxws/src/java.xml.soap/share/classes/com/sun/xml/internal/messaging/saaj/soap/impl/ElementImpl.java b/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/soap/impl/ElementImpl.java
similarity index 100%
rename from jaxws/src/java.xml.soap/share/classes/com/sun/xml/internal/messaging/saaj/soap/impl/ElementImpl.java
rename to jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/soap/impl/ElementImpl.java
diff --git a/jaxws/src/java.xml.soap/share/classes/com/sun/xml/internal/messaging/saaj/soap/impl/EnvelopeImpl.java b/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/soap/impl/EnvelopeImpl.java
similarity index 100%
rename from jaxws/src/java.xml.soap/share/classes/com/sun/xml/internal/messaging/saaj/soap/impl/EnvelopeImpl.java
rename to jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/soap/impl/EnvelopeImpl.java
diff --git a/jaxws/src/java.xml.soap/share/classes/com/sun/xml/internal/messaging/saaj/soap/impl/FaultElementImpl.java b/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/soap/impl/FaultElementImpl.java
similarity index 100%
rename from jaxws/src/java.xml.soap/share/classes/com/sun/xml/internal/messaging/saaj/soap/impl/FaultElementImpl.java
rename to jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/soap/impl/FaultElementImpl.java
diff --git a/jaxws/src/java.xml.soap/share/classes/com/sun/xml/internal/messaging/saaj/soap/impl/FaultImpl.java b/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/soap/impl/FaultImpl.java
similarity index 100%
rename from jaxws/src/java.xml.soap/share/classes/com/sun/xml/internal/messaging/saaj/soap/impl/FaultImpl.java
rename to jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/soap/impl/FaultImpl.java
diff --git a/jaxws/src/java.xml.soap/share/classes/com/sun/xml/internal/messaging/saaj/soap/impl/HeaderElementImpl.java b/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/soap/impl/HeaderElementImpl.java
similarity index 100%
rename from jaxws/src/java.xml.soap/share/classes/com/sun/xml/internal/messaging/saaj/soap/impl/HeaderElementImpl.java
rename to jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/soap/impl/HeaderElementImpl.java
diff --git a/jaxws/src/java.xml.soap/share/classes/com/sun/xml/internal/messaging/saaj/soap/impl/HeaderImpl.java b/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/soap/impl/HeaderImpl.java
similarity index 100%
rename from jaxws/src/java.xml.soap/share/classes/com/sun/xml/internal/messaging/saaj/soap/impl/HeaderImpl.java
rename to jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/soap/impl/HeaderImpl.java
diff --git a/jaxws/src/java.xml.soap/share/classes/com/sun/xml/internal/messaging/saaj/soap/impl/LocalStrings.properties b/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/soap/impl/LocalStrings.properties
similarity index 100%
rename from jaxws/src/java.xml.soap/share/classes/com/sun/xml/internal/messaging/saaj/soap/impl/LocalStrings.properties
rename to jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/soap/impl/LocalStrings.properties
diff --git a/jaxws/src/java.xml.soap/share/classes/com/sun/xml/internal/messaging/saaj/soap/impl/LocalStrings_de.properties b/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/soap/impl/LocalStrings_de.properties
similarity index 100%
rename from jaxws/src/java.xml.soap/share/classes/com/sun/xml/internal/messaging/saaj/soap/impl/LocalStrings_de.properties
rename to jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/soap/impl/LocalStrings_de.properties
diff --git a/jaxws/src/java.xml.soap/share/classes/com/sun/xml/internal/messaging/saaj/soap/impl/LocalStrings_es.properties b/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/soap/impl/LocalStrings_es.properties
similarity index 100%
rename from jaxws/src/java.xml.soap/share/classes/com/sun/xml/internal/messaging/saaj/soap/impl/LocalStrings_es.properties
rename to jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/soap/impl/LocalStrings_es.properties
diff --git a/jaxws/src/java.xml.soap/share/classes/com/sun/xml/internal/messaging/saaj/soap/impl/LocalStrings_fr.properties b/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/soap/impl/LocalStrings_fr.properties
similarity index 100%
rename from jaxws/src/java.xml.soap/share/classes/com/sun/xml/internal/messaging/saaj/soap/impl/LocalStrings_fr.properties
rename to jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/soap/impl/LocalStrings_fr.properties
diff --git a/jaxws/src/java.xml.soap/share/classes/com/sun/xml/internal/messaging/saaj/soap/impl/LocalStrings_it.properties b/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/soap/impl/LocalStrings_it.properties
similarity index 100%
rename from jaxws/src/java.xml.soap/share/classes/com/sun/xml/internal/messaging/saaj/soap/impl/LocalStrings_it.properties
rename to jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/soap/impl/LocalStrings_it.properties
diff --git a/jaxws/src/java.xml.soap/share/classes/com/sun/xml/internal/messaging/saaj/soap/impl/LocalStrings_ja.properties b/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/soap/impl/LocalStrings_ja.properties
similarity index 100%
rename from jaxws/src/java.xml.soap/share/classes/com/sun/xml/internal/messaging/saaj/soap/impl/LocalStrings_ja.properties
rename to jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/soap/impl/LocalStrings_ja.properties
diff --git a/jaxws/src/java.xml.soap/share/classes/com/sun/xml/internal/messaging/saaj/soap/impl/LocalStrings_ko.properties b/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/soap/impl/LocalStrings_ko.properties
similarity index 100%
rename from jaxws/src/java.xml.soap/share/classes/com/sun/xml/internal/messaging/saaj/soap/impl/LocalStrings_ko.properties
rename to jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/soap/impl/LocalStrings_ko.properties
diff --git a/jaxws/src/java.xml.soap/share/classes/com/sun/xml/internal/messaging/saaj/soap/impl/LocalStrings_pt_BR.properties b/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/soap/impl/LocalStrings_pt_BR.properties
similarity index 100%
rename from jaxws/src/java.xml.soap/share/classes/com/sun/xml/internal/messaging/saaj/soap/impl/LocalStrings_pt_BR.properties
rename to jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/soap/impl/LocalStrings_pt_BR.properties
diff --git a/jaxws/src/java.xml.soap/share/classes/com/sun/xml/internal/messaging/saaj/soap/impl/LocalStrings_zh_CN.properties b/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/soap/impl/LocalStrings_zh_CN.properties
similarity index 100%
rename from jaxws/src/java.xml.soap/share/classes/com/sun/xml/internal/messaging/saaj/soap/impl/LocalStrings_zh_CN.properties
rename to jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/soap/impl/LocalStrings_zh_CN.properties
diff --git a/jaxws/src/java.xml.soap/share/classes/com/sun/xml/internal/messaging/saaj/soap/impl/LocalStrings_zh_TW.properties b/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/soap/impl/LocalStrings_zh_TW.properties
similarity index 100%
rename from jaxws/src/java.xml.soap/share/classes/com/sun/xml/internal/messaging/saaj/soap/impl/LocalStrings_zh_TW.properties
rename to jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/soap/impl/LocalStrings_zh_TW.properties
diff --git a/jaxws/src/java.xml.soap/share/classes/com/sun/xml/internal/messaging/saaj/soap/impl/SOAPCommentImpl.java b/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/soap/impl/SOAPCommentImpl.java
similarity index 100%
rename from jaxws/src/java.xml.soap/share/classes/com/sun/xml/internal/messaging/saaj/soap/impl/SOAPCommentImpl.java
rename to jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/soap/impl/SOAPCommentImpl.java
diff --git a/jaxws/src/java.xml.soap/share/classes/com/sun/xml/internal/messaging/saaj/soap/impl/SOAPTextImpl.java b/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/soap/impl/SOAPTextImpl.java
similarity index 100%
rename from jaxws/src/java.xml.soap/share/classes/com/sun/xml/internal/messaging/saaj/soap/impl/SOAPTextImpl.java
rename to jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/soap/impl/SOAPTextImpl.java
diff --git a/jaxws/src/java.xml.soap/share/classes/com/sun/xml/internal/messaging/saaj/soap/impl/TreeException.java b/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/soap/impl/TreeException.java
similarity index 100%
rename from jaxws/src/java.xml.soap/share/classes/com/sun/xml/internal/messaging/saaj/soap/impl/TreeException.java
rename to jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/soap/impl/TreeException.java
diff --git a/jaxws/src/java.xml.soap/share/classes/com/sun/xml/internal/messaging/saaj/soap/name/LocalStrings.properties b/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/soap/name/LocalStrings.properties
similarity index 100%
rename from jaxws/src/java.xml.soap/share/classes/com/sun/xml/internal/messaging/saaj/soap/name/LocalStrings.properties
rename to jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/soap/name/LocalStrings.properties
diff --git a/jaxws/src/java.xml.soap/share/classes/com/sun/xml/internal/messaging/saaj/soap/name/LocalStrings_de.properties b/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/soap/name/LocalStrings_de.properties
similarity index 100%
rename from jaxws/src/java.xml.soap/share/classes/com/sun/xml/internal/messaging/saaj/soap/name/LocalStrings_de.properties
rename to jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/soap/name/LocalStrings_de.properties
diff --git a/jaxws/src/java.xml.soap/share/classes/com/sun/xml/internal/messaging/saaj/soap/name/LocalStrings_es.properties b/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/soap/name/LocalStrings_es.properties
similarity index 100%
rename from jaxws/src/java.xml.soap/share/classes/com/sun/xml/internal/messaging/saaj/soap/name/LocalStrings_es.properties
rename to jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/soap/name/LocalStrings_es.properties
diff --git a/jaxws/src/java.xml.soap/share/classes/com/sun/xml/internal/messaging/saaj/soap/name/LocalStrings_fr.properties b/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/soap/name/LocalStrings_fr.properties
similarity index 100%
rename from jaxws/src/java.xml.soap/share/classes/com/sun/xml/internal/messaging/saaj/soap/name/LocalStrings_fr.properties
rename to jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/soap/name/LocalStrings_fr.properties
diff --git a/jaxws/src/java.xml.soap/share/classes/com/sun/xml/internal/messaging/saaj/soap/name/LocalStrings_it.properties b/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/soap/name/LocalStrings_it.properties
similarity index 100%
rename from jaxws/src/java.xml.soap/share/classes/com/sun/xml/internal/messaging/saaj/soap/name/LocalStrings_it.properties
rename to jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/soap/name/LocalStrings_it.properties
diff --git a/jaxws/src/java.xml.soap/share/classes/com/sun/xml/internal/messaging/saaj/soap/name/LocalStrings_ja.properties b/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/soap/name/LocalStrings_ja.properties
similarity index 100%
rename from jaxws/src/java.xml.soap/share/classes/com/sun/xml/internal/messaging/saaj/soap/name/LocalStrings_ja.properties
rename to jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/soap/name/LocalStrings_ja.properties
diff --git a/jaxws/src/java.xml.soap/share/classes/com/sun/xml/internal/messaging/saaj/soap/name/LocalStrings_ko.properties b/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/soap/name/LocalStrings_ko.properties
similarity index 100%
rename from jaxws/src/java.xml.soap/share/classes/com/sun/xml/internal/messaging/saaj/soap/name/LocalStrings_ko.properties
rename to jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/soap/name/LocalStrings_ko.properties
diff --git a/jaxws/src/java.xml.soap/share/classes/com/sun/xml/internal/messaging/saaj/soap/name/LocalStrings_pt_BR.properties b/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/soap/name/LocalStrings_pt_BR.properties
similarity index 100%
rename from jaxws/src/java.xml.soap/share/classes/com/sun/xml/internal/messaging/saaj/soap/name/LocalStrings_pt_BR.properties
rename to jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/soap/name/LocalStrings_pt_BR.properties
diff --git a/jaxws/src/java.xml.soap/share/classes/com/sun/xml/internal/messaging/saaj/soap/name/LocalStrings_zh_CN.properties b/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/soap/name/LocalStrings_zh_CN.properties
similarity index 100%
rename from jaxws/src/java.xml.soap/share/classes/com/sun/xml/internal/messaging/saaj/soap/name/LocalStrings_zh_CN.properties
rename to jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/soap/name/LocalStrings_zh_CN.properties
diff --git a/jaxws/src/java.xml.soap/share/classes/com/sun/xml/internal/messaging/saaj/soap/name/LocalStrings_zh_TW.properties b/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/soap/name/LocalStrings_zh_TW.properties
similarity index 100%
rename from jaxws/src/java.xml.soap/share/classes/com/sun/xml/internal/messaging/saaj/soap/name/LocalStrings_zh_TW.properties
rename to jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/soap/name/LocalStrings_zh_TW.properties
diff --git a/jaxws/src/java.xml.soap/share/classes/com/sun/xml/internal/messaging/saaj/soap/name/NameImpl.java b/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/soap/name/NameImpl.java
similarity index 100%
rename from jaxws/src/java.xml.soap/share/classes/com/sun/xml/internal/messaging/saaj/soap/name/NameImpl.java
rename to jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/soap/name/NameImpl.java
diff --git a/jaxws/src/java.xml.soap/share/classes/com/sun/xml/internal/messaging/saaj/soap/ver1_1/Body1_1Impl.java b/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/soap/ver1_1/Body1_1Impl.java
similarity index 100%
rename from jaxws/src/java.xml.soap/share/classes/com/sun/xml/internal/messaging/saaj/soap/ver1_1/Body1_1Impl.java
rename to jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/soap/ver1_1/Body1_1Impl.java
diff --git a/jaxws/src/java.xml.soap/share/classes/com/sun/xml/internal/messaging/saaj/soap/ver1_1/BodyElement1_1Impl.java b/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/soap/ver1_1/BodyElement1_1Impl.java
similarity index 100%
rename from jaxws/src/java.xml.soap/share/classes/com/sun/xml/internal/messaging/saaj/soap/ver1_1/BodyElement1_1Impl.java
rename to jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/soap/ver1_1/BodyElement1_1Impl.java
diff --git a/jaxws/src/java.xml.soap/share/classes/com/sun/xml/internal/messaging/saaj/soap/ver1_1/Detail1_1Impl.java b/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/soap/ver1_1/Detail1_1Impl.java
similarity index 100%
rename from jaxws/src/java.xml.soap/share/classes/com/sun/xml/internal/messaging/saaj/soap/ver1_1/Detail1_1Impl.java
rename to jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/soap/ver1_1/Detail1_1Impl.java
diff --git a/jaxws/src/java.xml.soap/share/classes/com/sun/xml/internal/messaging/saaj/soap/ver1_1/DetailEntry1_1Impl.java b/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/soap/ver1_1/DetailEntry1_1Impl.java
similarity index 100%
rename from jaxws/src/java.xml.soap/share/classes/com/sun/xml/internal/messaging/saaj/soap/ver1_1/DetailEntry1_1Impl.java
rename to jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/soap/ver1_1/DetailEntry1_1Impl.java
diff --git a/jaxws/src/java.xml.soap/share/classes/com/sun/xml/internal/messaging/saaj/soap/ver1_1/Envelope1_1Impl.java b/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/soap/ver1_1/Envelope1_1Impl.java
similarity index 100%
rename from jaxws/src/java.xml.soap/share/classes/com/sun/xml/internal/messaging/saaj/soap/ver1_1/Envelope1_1Impl.java
rename to jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/soap/ver1_1/Envelope1_1Impl.java
diff --git a/jaxws/src/java.xml.soap/share/classes/com/sun/xml/internal/messaging/saaj/soap/ver1_1/Fault1_1Impl.java b/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/soap/ver1_1/Fault1_1Impl.java
similarity index 100%
rename from jaxws/src/java.xml.soap/share/classes/com/sun/xml/internal/messaging/saaj/soap/ver1_1/Fault1_1Impl.java
rename to jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/soap/ver1_1/Fault1_1Impl.java
diff --git a/jaxws/src/java.xml.soap/share/classes/com/sun/xml/internal/messaging/saaj/soap/ver1_1/FaultElement1_1Impl.java b/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/soap/ver1_1/FaultElement1_1Impl.java
similarity index 100%
rename from jaxws/src/java.xml.soap/share/classes/com/sun/xml/internal/messaging/saaj/soap/ver1_1/FaultElement1_1Impl.java
rename to jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/soap/ver1_1/FaultElement1_1Impl.java
diff --git a/jaxws/src/java.xml.soap/share/classes/com/sun/xml/internal/messaging/saaj/soap/ver1_1/Header1_1Impl.java b/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/soap/ver1_1/Header1_1Impl.java
similarity index 100%
rename from jaxws/src/java.xml.soap/share/classes/com/sun/xml/internal/messaging/saaj/soap/ver1_1/Header1_1Impl.java
rename to jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/soap/ver1_1/Header1_1Impl.java
diff --git a/jaxws/src/java.xml.soap/share/classes/com/sun/xml/internal/messaging/saaj/soap/ver1_1/HeaderElement1_1Impl.java b/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/soap/ver1_1/HeaderElement1_1Impl.java
similarity index 100%
rename from jaxws/src/java.xml.soap/share/classes/com/sun/xml/internal/messaging/saaj/soap/ver1_1/HeaderElement1_1Impl.java
rename to jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/soap/ver1_1/HeaderElement1_1Impl.java
diff --git a/jaxws/src/java.xml.soap/share/classes/com/sun/xml/internal/messaging/saaj/soap/ver1_1/LocalStrings.properties b/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/soap/ver1_1/LocalStrings.properties
similarity index 100%
rename from jaxws/src/java.xml.soap/share/classes/com/sun/xml/internal/messaging/saaj/soap/ver1_1/LocalStrings.properties
rename to jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/soap/ver1_1/LocalStrings.properties
diff --git a/jaxws/src/java.xml.soap/share/classes/com/sun/xml/internal/messaging/saaj/soap/ver1_1/LocalStrings_de.properties b/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/soap/ver1_1/LocalStrings_de.properties
similarity index 100%
rename from jaxws/src/java.xml.soap/share/classes/com/sun/xml/internal/messaging/saaj/soap/ver1_1/LocalStrings_de.properties
rename to jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/soap/ver1_1/LocalStrings_de.properties
diff --git a/jaxws/src/java.xml.soap/share/classes/com/sun/xml/internal/messaging/saaj/soap/ver1_1/LocalStrings_es.properties b/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/soap/ver1_1/LocalStrings_es.properties
similarity index 100%
rename from jaxws/src/java.xml.soap/share/classes/com/sun/xml/internal/messaging/saaj/soap/ver1_1/LocalStrings_es.properties
rename to jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/soap/ver1_1/LocalStrings_es.properties
diff --git a/jaxws/src/java.xml.soap/share/classes/com/sun/xml/internal/messaging/saaj/soap/ver1_1/LocalStrings_fr.properties b/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/soap/ver1_1/LocalStrings_fr.properties
similarity index 100%
rename from jaxws/src/java.xml.soap/share/classes/com/sun/xml/internal/messaging/saaj/soap/ver1_1/LocalStrings_fr.properties
rename to jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/soap/ver1_1/LocalStrings_fr.properties
diff --git a/jaxws/src/java.xml.soap/share/classes/com/sun/xml/internal/messaging/saaj/soap/ver1_1/LocalStrings_it.properties b/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/soap/ver1_1/LocalStrings_it.properties
similarity index 100%
rename from jaxws/src/java.xml.soap/share/classes/com/sun/xml/internal/messaging/saaj/soap/ver1_1/LocalStrings_it.properties
rename to jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/soap/ver1_1/LocalStrings_it.properties
diff --git a/jaxws/src/java.xml.soap/share/classes/com/sun/xml/internal/messaging/saaj/soap/ver1_1/LocalStrings_ja.properties b/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/soap/ver1_1/LocalStrings_ja.properties
similarity index 100%
rename from jaxws/src/java.xml.soap/share/classes/com/sun/xml/internal/messaging/saaj/soap/ver1_1/LocalStrings_ja.properties
rename to jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/soap/ver1_1/LocalStrings_ja.properties
diff --git a/jaxws/src/java.xml.soap/share/classes/com/sun/xml/internal/messaging/saaj/soap/ver1_1/LocalStrings_ko.properties b/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/soap/ver1_1/LocalStrings_ko.properties
similarity index 100%
rename from jaxws/src/java.xml.soap/share/classes/com/sun/xml/internal/messaging/saaj/soap/ver1_1/LocalStrings_ko.properties
rename to jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/soap/ver1_1/LocalStrings_ko.properties
diff --git a/jaxws/src/java.xml.soap/share/classes/com/sun/xml/internal/messaging/saaj/soap/ver1_1/LocalStrings_pt_BR.properties b/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/soap/ver1_1/LocalStrings_pt_BR.properties
similarity index 100%
rename from jaxws/src/java.xml.soap/share/classes/com/sun/xml/internal/messaging/saaj/soap/ver1_1/LocalStrings_pt_BR.properties
rename to jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/soap/ver1_1/LocalStrings_pt_BR.properties
diff --git a/jaxws/src/java.xml.soap/share/classes/com/sun/xml/internal/messaging/saaj/soap/ver1_1/LocalStrings_zh_CN.properties b/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/soap/ver1_1/LocalStrings_zh_CN.properties
similarity index 100%
rename from jaxws/src/java.xml.soap/share/classes/com/sun/xml/internal/messaging/saaj/soap/ver1_1/LocalStrings_zh_CN.properties
rename to jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/soap/ver1_1/LocalStrings_zh_CN.properties
diff --git a/jaxws/src/java.xml.soap/share/classes/com/sun/xml/internal/messaging/saaj/soap/ver1_1/LocalStrings_zh_TW.properties b/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/soap/ver1_1/LocalStrings_zh_TW.properties
similarity index 100%
rename from jaxws/src/java.xml.soap/share/classes/com/sun/xml/internal/messaging/saaj/soap/ver1_1/LocalStrings_zh_TW.properties
rename to jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/soap/ver1_1/LocalStrings_zh_TW.properties
diff --git a/jaxws/src/java.xml.soap/share/classes/com/sun/xml/internal/messaging/saaj/soap/ver1_1/Message1_1Impl.java b/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/soap/ver1_1/Message1_1Impl.java
similarity index 100%
rename from jaxws/src/java.xml.soap/share/classes/com/sun/xml/internal/messaging/saaj/soap/ver1_1/Message1_1Impl.java
rename to jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/soap/ver1_1/Message1_1Impl.java
diff --git a/jaxws/src/java.xml.soap/share/classes/com/sun/xml/internal/messaging/saaj/soap/ver1_1/SOAPFactory1_1Impl.java b/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/soap/ver1_1/SOAPFactory1_1Impl.java
similarity index 100%
rename from jaxws/src/java.xml.soap/share/classes/com/sun/xml/internal/messaging/saaj/soap/ver1_1/SOAPFactory1_1Impl.java
rename to jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/soap/ver1_1/SOAPFactory1_1Impl.java
diff --git a/jaxws/src/java.xml.soap/share/classes/com/sun/xml/internal/messaging/saaj/soap/ver1_1/SOAPMessageFactory1_1Impl.java b/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/soap/ver1_1/SOAPMessageFactory1_1Impl.java
similarity index 100%
rename from jaxws/src/java.xml.soap/share/classes/com/sun/xml/internal/messaging/saaj/soap/ver1_1/SOAPMessageFactory1_1Impl.java
rename to jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/soap/ver1_1/SOAPMessageFactory1_1Impl.java
diff --git a/jaxws/src/java.xml.soap/share/classes/com/sun/xml/internal/messaging/saaj/soap/ver1_1/SOAPPart1_1Impl.java b/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/soap/ver1_1/SOAPPart1_1Impl.java
similarity index 100%
rename from jaxws/src/java.xml.soap/share/classes/com/sun/xml/internal/messaging/saaj/soap/ver1_1/SOAPPart1_1Impl.java
rename to jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/soap/ver1_1/SOAPPart1_1Impl.java
diff --git a/jaxws/src/java.xml.soap/share/classes/com/sun/xml/internal/messaging/saaj/soap/ver1_2/Body1_2Impl.java b/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/soap/ver1_2/Body1_2Impl.java
similarity index 100%
rename from jaxws/src/java.xml.soap/share/classes/com/sun/xml/internal/messaging/saaj/soap/ver1_2/Body1_2Impl.java
rename to jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/soap/ver1_2/Body1_2Impl.java
diff --git a/jaxws/src/java.xml.soap/share/classes/com/sun/xml/internal/messaging/saaj/soap/ver1_2/BodyElement1_2Impl.java b/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/soap/ver1_2/BodyElement1_2Impl.java
similarity index 100%
rename from jaxws/src/java.xml.soap/share/classes/com/sun/xml/internal/messaging/saaj/soap/ver1_2/BodyElement1_2Impl.java
rename to jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/soap/ver1_2/BodyElement1_2Impl.java
diff --git a/jaxws/src/java.xml.soap/share/classes/com/sun/xml/internal/messaging/saaj/soap/ver1_2/Detail1_2Impl.java b/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/soap/ver1_2/Detail1_2Impl.java
similarity index 100%
rename from jaxws/src/java.xml.soap/share/classes/com/sun/xml/internal/messaging/saaj/soap/ver1_2/Detail1_2Impl.java
rename to jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/soap/ver1_2/Detail1_2Impl.java
diff --git a/jaxws/src/java.xml.soap/share/classes/com/sun/xml/internal/messaging/saaj/soap/ver1_2/DetailEntry1_2Impl.java b/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/soap/ver1_2/DetailEntry1_2Impl.java
similarity index 100%
rename from jaxws/src/java.xml.soap/share/classes/com/sun/xml/internal/messaging/saaj/soap/ver1_2/DetailEntry1_2Impl.java
rename to jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/soap/ver1_2/DetailEntry1_2Impl.java
diff --git a/jaxws/src/java.xml.soap/share/classes/com/sun/xml/internal/messaging/saaj/soap/ver1_2/Envelope1_2Impl.java b/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/soap/ver1_2/Envelope1_2Impl.java
similarity index 100%
rename from jaxws/src/java.xml.soap/share/classes/com/sun/xml/internal/messaging/saaj/soap/ver1_2/Envelope1_2Impl.java
rename to jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/soap/ver1_2/Envelope1_2Impl.java
diff --git a/jaxws/src/java.xml.soap/share/classes/com/sun/xml/internal/messaging/saaj/soap/ver1_2/Fault1_2Impl.java b/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/soap/ver1_2/Fault1_2Impl.java
similarity index 100%
rename from jaxws/src/java.xml.soap/share/classes/com/sun/xml/internal/messaging/saaj/soap/ver1_2/Fault1_2Impl.java
rename to jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/soap/ver1_2/Fault1_2Impl.java
diff --git a/jaxws/src/java.xml.soap/share/classes/com/sun/xml/internal/messaging/saaj/soap/ver1_2/FaultElement1_2Impl.java b/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/soap/ver1_2/FaultElement1_2Impl.java
similarity index 100%
rename from jaxws/src/java.xml.soap/share/classes/com/sun/xml/internal/messaging/saaj/soap/ver1_2/FaultElement1_2Impl.java
rename to jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/soap/ver1_2/FaultElement1_2Impl.java
diff --git a/jaxws/src/java.xml.soap/share/classes/com/sun/xml/internal/messaging/saaj/soap/ver1_2/Header1_2Impl.java b/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/soap/ver1_2/Header1_2Impl.java
similarity index 100%
rename from jaxws/src/java.xml.soap/share/classes/com/sun/xml/internal/messaging/saaj/soap/ver1_2/Header1_2Impl.java
rename to jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/soap/ver1_2/Header1_2Impl.java
diff --git a/jaxws/src/java.xml.soap/share/classes/com/sun/xml/internal/messaging/saaj/soap/ver1_2/HeaderElement1_2Impl.java b/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/soap/ver1_2/HeaderElement1_2Impl.java
similarity index 100%
rename from jaxws/src/java.xml.soap/share/classes/com/sun/xml/internal/messaging/saaj/soap/ver1_2/HeaderElement1_2Impl.java
rename to jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/soap/ver1_2/HeaderElement1_2Impl.java
diff --git a/jaxws/src/java.xml.soap/share/classes/com/sun/xml/internal/messaging/saaj/soap/ver1_2/LocalStrings.properties b/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/soap/ver1_2/LocalStrings.properties
similarity index 100%
rename from jaxws/src/java.xml.soap/share/classes/com/sun/xml/internal/messaging/saaj/soap/ver1_2/LocalStrings.properties
rename to jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/soap/ver1_2/LocalStrings.properties
diff --git a/jaxws/src/java.xml.soap/share/classes/com/sun/xml/internal/messaging/saaj/soap/ver1_2/LocalStrings_de.properties b/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/soap/ver1_2/LocalStrings_de.properties
similarity index 100%
rename from jaxws/src/java.xml.soap/share/classes/com/sun/xml/internal/messaging/saaj/soap/ver1_2/LocalStrings_de.properties
rename to jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/soap/ver1_2/LocalStrings_de.properties
diff --git a/jaxws/src/java.xml.soap/share/classes/com/sun/xml/internal/messaging/saaj/soap/ver1_2/LocalStrings_es.properties b/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/soap/ver1_2/LocalStrings_es.properties
similarity index 100%
rename from jaxws/src/java.xml.soap/share/classes/com/sun/xml/internal/messaging/saaj/soap/ver1_2/LocalStrings_es.properties
rename to jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/soap/ver1_2/LocalStrings_es.properties
diff --git a/jaxws/src/java.xml.soap/share/classes/com/sun/xml/internal/messaging/saaj/soap/ver1_2/LocalStrings_fr.properties b/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/soap/ver1_2/LocalStrings_fr.properties
similarity index 100%
rename from jaxws/src/java.xml.soap/share/classes/com/sun/xml/internal/messaging/saaj/soap/ver1_2/LocalStrings_fr.properties
rename to jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/soap/ver1_2/LocalStrings_fr.properties
diff --git a/jaxws/src/java.xml.soap/share/classes/com/sun/xml/internal/messaging/saaj/soap/ver1_2/LocalStrings_it.properties b/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/soap/ver1_2/LocalStrings_it.properties
similarity index 100%
rename from jaxws/src/java.xml.soap/share/classes/com/sun/xml/internal/messaging/saaj/soap/ver1_2/LocalStrings_it.properties
rename to jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/soap/ver1_2/LocalStrings_it.properties
diff --git a/jaxws/src/java.xml.soap/share/classes/com/sun/xml/internal/messaging/saaj/soap/ver1_2/LocalStrings_ja.properties b/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/soap/ver1_2/LocalStrings_ja.properties
similarity index 100%
rename from jaxws/src/java.xml.soap/share/classes/com/sun/xml/internal/messaging/saaj/soap/ver1_2/LocalStrings_ja.properties
rename to jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/soap/ver1_2/LocalStrings_ja.properties
diff --git a/jaxws/src/java.xml.soap/share/classes/com/sun/xml/internal/messaging/saaj/soap/ver1_2/LocalStrings_ko.properties b/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/soap/ver1_2/LocalStrings_ko.properties
similarity index 100%
rename from jaxws/src/java.xml.soap/share/classes/com/sun/xml/internal/messaging/saaj/soap/ver1_2/LocalStrings_ko.properties
rename to jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/soap/ver1_2/LocalStrings_ko.properties
diff --git a/jaxws/src/java.xml.soap/share/classes/com/sun/xml/internal/messaging/saaj/soap/ver1_2/LocalStrings_pt_BR.properties b/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/soap/ver1_2/LocalStrings_pt_BR.properties
similarity index 100%
rename from jaxws/src/java.xml.soap/share/classes/com/sun/xml/internal/messaging/saaj/soap/ver1_2/LocalStrings_pt_BR.properties
rename to jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/soap/ver1_2/LocalStrings_pt_BR.properties
diff --git a/jaxws/src/java.xml.soap/share/classes/com/sun/xml/internal/messaging/saaj/soap/ver1_2/LocalStrings_zh_CN.properties b/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/soap/ver1_2/LocalStrings_zh_CN.properties
similarity index 100%
rename from jaxws/src/java.xml.soap/share/classes/com/sun/xml/internal/messaging/saaj/soap/ver1_2/LocalStrings_zh_CN.properties
rename to jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/soap/ver1_2/LocalStrings_zh_CN.properties
diff --git a/jaxws/src/java.xml.soap/share/classes/com/sun/xml/internal/messaging/saaj/soap/ver1_2/LocalStrings_zh_TW.properties b/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/soap/ver1_2/LocalStrings_zh_TW.properties
similarity index 100%
rename from jaxws/src/java.xml.soap/share/classes/com/sun/xml/internal/messaging/saaj/soap/ver1_2/LocalStrings_zh_TW.properties
rename to jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/soap/ver1_2/LocalStrings_zh_TW.properties
diff --git a/jaxws/src/java.xml.soap/share/classes/com/sun/xml/internal/messaging/saaj/soap/ver1_2/Message1_2Impl.java b/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/soap/ver1_2/Message1_2Impl.java
similarity index 100%
rename from jaxws/src/java.xml.soap/share/classes/com/sun/xml/internal/messaging/saaj/soap/ver1_2/Message1_2Impl.java
rename to jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/soap/ver1_2/Message1_2Impl.java
diff --git a/jaxws/src/java.xml.soap/share/classes/com/sun/xml/internal/messaging/saaj/soap/ver1_2/SOAPFactory1_2Impl.java b/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/soap/ver1_2/SOAPFactory1_2Impl.java
similarity index 100%
rename from jaxws/src/java.xml.soap/share/classes/com/sun/xml/internal/messaging/saaj/soap/ver1_2/SOAPFactory1_2Impl.java
rename to jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/soap/ver1_2/SOAPFactory1_2Impl.java
diff --git a/jaxws/src/java.xml.soap/share/classes/com/sun/xml/internal/messaging/saaj/soap/ver1_2/SOAPMessageFactory1_2Impl.java b/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/soap/ver1_2/SOAPMessageFactory1_2Impl.java
similarity index 100%
rename from jaxws/src/java.xml.soap/share/classes/com/sun/xml/internal/messaging/saaj/soap/ver1_2/SOAPMessageFactory1_2Impl.java
rename to jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/soap/ver1_2/SOAPMessageFactory1_2Impl.java
diff --git a/jaxws/src/java.xml.soap/share/classes/com/sun/xml/internal/messaging/saaj/soap/ver1_2/SOAPPart1_2Impl.java b/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/soap/ver1_2/SOAPPart1_2Impl.java
similarity index 100%
rename from jaxws/src/java.xml.soap/share/classes/com/sun/xml/internal/messaging/saaj/soap/ver1_2/SOAPPart1_2Impl.java
rename to jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/soap/ver1_2/SOAPPart1_2Impl.java
diff --git a/jaxws/src/java.xml.soap/share/classes/com/sun/xml/internal/messaging/saaj/util/Base64.java b/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/util/Base64.java
similarity index 100%
rename from jaxws/src/java.xml.soap/share/classes/com/sun/xml/internal/messaging/saaj/util/Base64.java
rename to jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/util/Base64.java
diff --git a/jaxws/src/java.xml.soap/share/classes/com/sun/xml/internal/messaging/saaj/util/ByteInputStream.java b/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/util/ByteInputStream.java
similarity index 100%
rename from jaxws/src/java.xml.soap/share/classes/com/sun/xml/internal/messaging/saaj/util/ByteInputStream.java
rename to jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/util/ByteInputStream.java
diff --git a/jaxws/src/java.xml.soap/share/classes/com/sun/xml/internal/messaging/saaj/util/ByteOutputStream.java b/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/util/ByteOutputStream.java
similarity index 100%
rename from jaxws/src/java.xml.soap/share/classes/com/sun/xml/internal/messaging/saaj/util/ByteOutputStream.java
rename to jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/util/ByteOutputStream.java
diff --git a/jaxws/src/java.xml.soap/share/classes/com/sun/xml/internal/messaging/saaj/util/CharReader.java b/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/util/CharReader.java
similarity index 100%
rename from jaxws/src/java.xml.soap/share/classes/com/sun/xml/internal/messaging/saaj/util/CharReader.java
rename to jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/util/CharReader.java
diff --git a/jaxws/src/java.xml.soap/share/classes/com/sun/xml/internal/messaging/saaj/util/CharWriter.java b/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/util/CharWriter.java
similarity index 100%
rename from jaxws/src/java.xml.soap/share/classes/com/sun/xml/internal/messaging/saaj/util/CharWriter.java
rename to jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/util/CharWriter.java
diff --git a/jaxws/src/java.xml.soap/share/classes/com/sun/xml/internal/messaging/saaj/util/FastInfosetReflection.java b/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/util/FastInfosetReflection.java
similarity index 100%
rename from jaxws/src/java.xml.soap/share/classes/com/sun/xml/internal/messaging/saaj/util/FastInfosetReflection.java
rename to jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/util/FastInfosetReflection.java
diff --git a/jaxws/src/java.xml.soap/share/classes/com/sun/xml/internal/messaging/saaj/util/FinalArrayList.java b/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/util/FinalArrayList.java
similarity index 100%
rename from jaxws/src/java.xml.soap/share/classes/com/sun/xml/internal/messaging/saaj/util/FinalArrayList.java
rename to jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/util/FinalArrayList.java
diff --git a/jaxws/src/java.xml.soap/share/classes/com/sun/xml/internal/messaging/saaj/util/JAXMStreamSource.java b/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/util/JAXMStreamSource.java
similarity index 100%
rename from jaxws/src/java.xml.soap/share/classes/com/sun/xml/internal/messaging/saaj/util/JAXMStreamSource.java
rename to jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/util/JAXMStreamSource.java
diff --git a/jaxws/src/java.xml.soap/share/classes/com/sun/xml/internal/messaging/saaj/util/JaxmURI.java b/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/util/JaxmURI.java
similarity index 100%
rename from jaxws/src/java.xml.soap/share/classes/com/sun/xml/internal/messaging/saaj/util/JaxmURI.java
rename to jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/util/JaxmURI.java
diff --git a/jaxws/src/java.xml.soap/share/classes/com/sun/xml/internal/messaging/saaj/util/LocalStrings.properties b/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/util/LocalStrings.properties
similarity index 100%
rename from jaxws/src/java.xml.soap/share/classes/com/sun/xml/internal/messaging/saaj/util/LocalStrings.properties
rename to jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/util/LocalStrings.properties
diff --git a/jaxws/src/java.xml.soap/share/classes/com/sun/xml/internal/messaging/saaj/util/LocalStrings_de.properties b/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/util/LocalStrings_de.properties
similarity index 100%
rename from jaxws/src/java.xml.soap/share/classes/com/sun/xml/internal/messaging/saaj/util/LocalStrings_de.properties
rename to jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/util/LocalStrings_de.properties
diff --git a/jaxws/src/java.xml.soap/share/classes/com/sun/xml/internal/messaging/saaj/util/LocalStrings_es.properties b/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/util/LocalStrings_es.properties
similarity index 100%
rename from jaxws/src/java.xml.soap/share/classes/com/sun/xml/internal/messaging/saaj/util/LocalStrings_es.properties
rename to jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/util/LocalStrings_es.properties
diff --git a/jaxws/src/java.xml.soap/share/classes/com/sun/xml/internal/messaging/saaj/util/LocalStrings_fr.properties b/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/util/LocalStrings_fr.properties
similarity index 100%
rename from jaxws/src/java.xml.soap/share/classes/com/sun/xml/internal/messaging/saaj/util/LocalStrings_fr.properties
rename to jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/util/LocalStrings_fr.properties
diff --git a/jaxws/src/java.xml.soap/share/classes/com/sun/xml/internal/messaging/saaj/util/LocalStrings_it.properties b/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/util/LocalStrings_it.properties
similarity index 100%
rename from jaxws/src/java.xml.soap/share/classes/com/sun/xml/internal/messaging/saaj/util/LocalStrings_it.properties
rename to jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/util/LocalStrings_it.properties
diff --git a/jaxws/src/java.xml.soap/share/classes/com/sun/xml/internal/messaging/saaj/util/LocalStrings_ja.properties b/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/util/LocalStrings_ja.properties
similarity index 100%
rename from jaxws/src/java.xml.soap/share/classes/com/sun/xml/internal/messaging/saaj/util/LocalStrings_ja.properties
rename to jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/util/LocalStrings_ja.properties
diff --git a/jaxws/src/java.xml.soap/share/classes/com/sun/xml/internal/messaging/saaj/util/LocalStrings_ko.properties b/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/util/LocalStrings_ko.properties
similarity index 100%
rename from jaxws/src/java.xml.soap/share/classes/com/sun/xml/internal/messaging/saaj/util/LocalStrings_ko.properties
rename to jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/util/LocalStrings_ko.properties
diff --git a/jaxws/src/java.xml.soap/share/classes/com/sun/xml/internal/messaging/saaj/util/LocalStrings_pt_BR.properties b/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/util/LocalStrings_pt_BR.properties
similarity index 100%
rename from jaxws/src/java.xml.soap/share/classes/com/sun/xml/internal/messaging/saaj/util/LocalStrings_pt_BR.properties
rename to jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/util/LocalStrings_pt_BR.properties
diff --git a/jaxws/src/java.xml.soap/share/classes/com/sun/xml/internal/messaging/saaj/util/LocalStrings_zh_CN.properties b/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/util/LocalStrings_zh_CN.properties
similarity index 100%
rename from jaxws/src/java.xml.soap/share/classes/com/sun/xml/internal/messaging/saaj/util/LocalStrings_zh_CN.properties
rename to jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/util/LocalStrings_zh_CN.properties
diff --git a/jaxws/src/java.xml.soap/share/classes/com/sun/xml/internal/messaging/saaj/util/LocalStrings_zh_TW.properties b/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/util/LocalStrings_zh_TW.properties
similarity index 100%
rename from jaxws/src/java.xml.soap/share/classes/com/sun/xml/internal/messaging/saaj/util/LocalStrings_zh_TW.properties
rename to jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/util/LocalStrings_zh_TW.properties
diff --git a/jaxws/src/java.xml.soap/share/classes/com/sun/xml/internal/messaging/saaj/util/LogDomainConstants.java b/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/util/LogDomainConstants.java
similarity index 100%
rename from jaxws/src/java.xml.soap/share/classes/com/sun/xml/internal/messaging/saaj/util/LogDomainConstants.java
rename to jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/util/LogDomainConstants.java
diff --git a/jaxws/src/java.xml.soap/share/classes/com/sun/xml/internal/messaging/saaj/util/MimeHeadersUtil.java b/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/util/MimeHeadersUtil.java
similarity index 100%
rename from jaxws/src/java.xml.soap/share/classes/com/sun/xml/internal/messaging/saaj/util/MimeHeadersUtil.java
rename to jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/util/MimeHeadersUtil.java
diff --git a/jaxws/src/java.xml.soap/share/classes/com/sun/xml/internal/messaging/saaj/util/NamespaceContextIterator.java b/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/util/NamespaceContextIterator.java
similarity index 100%
rename from jaxws/src/java.xml.soap/share/classes/com/sun/xml/internal/messaging/saaj/util/NamespaceContextIterator.java
rename to jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/util/NamespaceContextIterator.java
diff --git a/jaxws/src/java.xml.soap/share/classes/com/sun/xml/internal/messaging/saaj/util/ParseUtil.java b/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/util/ParseUtil.java
similarity index 100%
rename from jaxws/src/java.xml.soap/share/classes/com/sun/xml/internal/messaging/saaj/util/ParseUtil.java
rename to jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/util/ParseUtil.java
diff --git a/jaxws/src/java.xml.soap/share/classes/com/sun/xml/internal/messaging/saaj/util/ParserPool.java b/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/util/ParserPool.java
similarity index 100%
rename from jaxws/src/java.xml.soap/share/classes/com/sun/xml/internal/messaging/saaj/util/ParserPool.java
rename to jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/util/ParserPool.java
diff --git a/jaxws/src/java.xml.soap/share/classes/com/sun/xml/internal/messaging/saaj/util/RejectDoctypeSaxFilter.java b/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/util/RejectDoctypeSaxFilter.java
similarity index 100%
rename from jaxws/src/java.xml.soap/share/classes/com/sun/xml/internal/messaging/saaj/util/RejectDoctypeSaxFilter.java
rename to jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/util/RejectDoctypeSaxFilter.java
diff --git a/jaxws/src/java.xml.soap/share/classes/com/sun/xml/internal/messaging/saaj/util/SAAJUtil.java b/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/util/SAAJUtil.java
similarity index 100%
rename from jaxws/src/java.xml.soap/share/classes/com/sun/xml/internal/messaging/saaj/util/SAAJUtil.java
rename to jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/util/SAAJUtil.java
diff --git a/jaxws/src/java.xml.soap/share/classes/com/sun/xml/internal/messaging/saaj/util/TeeInputStream.java b/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/util/TeeInputStream.java
similarity index 100%
rename from jaxws/src/java.xml.soap/share/classes/com/sun/xml/internal/messaging/saaj/util/TeeInputStream.java
rename to jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/util/TeeInputStream.java
diff --git a/jaxws/src/java.xml.soap/share/classes/com/sun/xml/internal/messaging/saaj/util/XMLDeclarationParser.java b/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/util/XMLDeclarationParser.java
similarity index 100%
rename from jaxws/src/java.xml.soap/share/classes/com/sun/xml/internal/messaging/saaj/util/XMLDeclarationParser.java
rename to jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/util/XMLDeclarationParser.java
diff --git a/jaxws/src/java.xml.soap/share/classes/com/sun/xml/internal/messaging/saaj/util/stax/LazyEnvelopeStaxReader.java b/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/util/stax/LazyEnvelopeStaxReader.java
similarity index 100%
rename from jaxws/src/java.xml.soap/share/classes/com/sun/xml/internal/messaging/saaj/util/stax/LazyEnvelopeStaxReader.java
rename to jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/util/stax/LazyEnvelopeStaxReader.java
diff --git a/jaxws/src/java.xml.soap/share/classes/com/sun/xml/internal/messaging/saaj/util/stax/SaajStaxReaderEx.java b/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/util/stax/SaajStaxReaderEx.java
similarity index 100%
rename from jaxws/src/java.xml.soap/share/classes/com/sun/xml/internal/messaging/saaj/util/stax/SaajStaxReaderEx.java
rename to jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/util/stax/SaajStaxReaderEx.java
diff --git a/jaxws/src/java.xml.soap/share/classes/com/sun/xml/internal/messaging/saaj/util/stax/SaajStaxWriter.java b/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/util/stax/SaajStaxWriter.java
similarity index 100%
rename from jaxws/src/java.xml.soap/share/classes/com/sun/xml/internal/messaging/saaj/util/stax/SaajStaxWriter.java
rename to jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/util/stax/SaajStaxWriter.java
diff --git a/jaxws/src/java.xml.soap/share/classes/com/sun/xml/internal/messaging/saaj/util/stax/SaajStaxWriterEx.java b/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/util/stax/SaajStaxWriterEx.java
similarity index 100%
rename from jaxws/src/java.xml.soap/share/classes/com/sun/xml/internal/messaging/saaj/util/stax/SaajStaxWriterEx.java
rename to jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/util/stax/SaajStaxWriterEx.java
diff --git a/jaxws/src/java.xml.soap/share/classes/com/sun/xml/internal/messaging/saaj/util/transform/EfficientStreamingTransformer.java b/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/util/transform/EfficientStreamingTransformer.java
similarity index 100%
rename from jaxws/src/java.xml.soap/share/classes/com/sun/xml/internal/messaging/saaj/util/transform/EfficientStreamingTransformer.java
rename to jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/util/transform/EfficientStreamingTransformer.java
diff --git a/jaxws/src/java.xml.soap/share/classes/javax/xml/soap/AttachmentPart.java b/jaxws/src/java.xml.ws/share/classes/javax/xml/soap/AttachmentPart.java
similarity index 100%
rename from jaxws/src/java.xml.soap/share/classes/javax/xml/soap/AttachmentPart.java
rename to jaxws/src/java.xml.ws/share/classes/javax/xml/soap/AttachmentPart.java
diff --git a/jaxws/src/java.xml.soap/share/classes/javax/xml/soap/Detail.java b/jaxws/src/java.xml.ws/share/classes/javax/xml/soap/Detail.java
similarity index 100%
rename from jaxws/src/java.xml.soap/share/classes/javax/xml/soap/Detail.java
rename to jaxws/src/java.xml.ws/share/classes/javax/xml/soap/Detail.java
diff --git a/jaxws/src/java.xml.soap/share/classes/javax/xml/soap/DetailEntry.java b/jaxws/src/java.xml.ws/share/classes/javax/xml/soap/DetailEntry.java
similarity index 100%
rename from jaxws/src/java.xml.soap/share/classes/javax/xml/soap/DetailEntry.java
rename to jaxws/src/java.xml.ws/share/classes/javax/xml/soap/DetailEntry.java
diff --git a/jaxws/src/java.xml.soap/share/classes/javax/xml/soap/FactoryFinder.java b/jaxws/src/java.xml.ws/share/classes/javax/xml/soap/FactoryFinder.java
similarity index 100%
rename from jaxws/src/java.xml.soap/share/classes/javax/xml/soap/FactoryFinder.java
rename to jaxws/src/java.xml.ws/share/classes/javax/xml/soap/FactoryFinder.java
diff --git a/jaxws/src/java.xml.soap/share/classes/javax/xml/soap/MessageFactory.java b/jaxws/src/java.xml.ws/share/classes/javax/xml/soap/MessageFactory.java
similarity index 100%
rename from jaxws/src/java.xml.soap/share/classes/javax/xml/soap/MessageFactory.java
rename to jaxws/src/java.xml.ws/share/classes/javax/xml/soap/MessageFactory.java
diff --git a/jaxws/src/java.xml.soap/share/classes/javax/xml/soap/MimeHeader.java b/jaxws/src/java.xml.ws/share/classes/javax/xml/soap/MimeHeader.java
similarity index 100%
rename from jaxws/src/java.xml.soap/share/classes/javax/xml/soap/MimeHeader.java
rename to jaxws/src/java.xml.ws/share/classes/javax/xml/soap/MimeHeader.java
diff --git a/jaxws/src/java.xml.soap/share/classes/javax/xml/soap/MimeHeaders.java b/jaxws/src/java.xml.ws/share/classes/javax/xml/soap/MimeHeaders.java
similarity index 100%
rename from jaxws/src/java.xml.soap/share/classes/javax/xml/soap/MimeHeaders.java
rename to jaxws/src/java.xml.ws/share/classes/javax/xml/soap/MimeHeaders.java
diff --git a/jaxws/src/java.xml.soap/share/classes/javax/xml/soap/Name.java b/jaxws/src/java.xml.ws/share/classes/javax/xml/soap/Name.java
similarity index 100%
rename from jaxws/src/java.xml.soap/share/classes/javax/xml/soap/Name.java
rename to jaxws/src/java.xml.ws/share/classes/javax/xml/soap/Name.java
diff --git a/jaxws/src/java.xml.soap/share/classes/javax/xml/soap/Node.java b/jaxws/src/java.xml.ws/share/classes/javax/xml/soap/Node.java
similarity index 100%
rename from jaxws/src/java.xml.soap/share/classes/javax/xml/soap/Node.java
rename to jaxws/src/java.xml.ws/share/classes/javax/xml/soap/Node.java
diff --git a/jaxws/src/java.xml.soap/share/classes/javax/xml/soap/SAAJMetaFactory.java b/jaxws/src/java.xml.ws/share/classes/javax/xml/soap/SAAJMetaFactory.java
similarity index 100%
rename from jaxws/src/java.xml.soap/share/classes/javax/xml/soap/SAAJMetaFactory.java
rename to jaxws/src/java.xml.ws/share/classes/javax/xml/soap/SAAJMetaFactory.java
diff --git a/jaxws/src/java.xml.soap/share/classes/javax/xml/soap/SAAJResult.java b/jaxws/src/java.xml.ws/share/classes/javax/xml/soap/SAAJResult.java
similarity index 100%
rename from jaxws/src/java.xml.soap/share/classes/javax/xml/soap/SAAJResult.java
rename to jaxws/src/java.xml.ws/share/classes/javax/xml/soap/SAAJResult.java
diff --git a/jaxws/src/java.xml.soap/share/classes/javax/xml/soap/SOAPBody.java b/jaxws/src/java.xml.ws/share/classes/javax/xml/soap/SOAPBody.java
similarity index 100%
rename from jaxws/src/java.xml.soap/share/classes/javax/xml/soap/SOAPBody.java
rename to jaxws/src/java.xml.ws/share/classes/javax/xml/soap/SOAPBody.java
diff --git a/jaxws/src/java.xml.soap/share/classes/javax/xml/soap/SOAPBodyElement.java b/jaxws/src/java.xml.ws/share/classes/javax/xml/soap/SOAPBodyElement.java
similarity index 100%
rename from jaxws/src/java.xml.soap/share/classes/javax/xml/soap/SOAPBodyElement.java
rename to jaxws/src/java.xml.ws/share/classes/javax/xml/soap/SOAPBodyElement.java
diff --git a/jaxws/src/java.xml.soap/share/classes/javax/xml/soap/SOAPConnection.java b/jaxws/src/java.xml.ws/share/classes/javax/xml/soap/SOAPConnection.java
similarity index 100%
rename from jaxws/src/java.xml.soap/share/classes/javax/xml/soap/SOAPConnection.java
rename to jaxws/src/java.xml.ws/share/classes/javax/xml/soap/SOAPConnection.java
diff --git a/jaxws/src/java.xml.soap/share/classes/javax/xml/soap/SOAPConnectionFactory.java b/jaxws/src/java.xml.ws/share/classes/javax/xml/soap/SOAPConnectionFactory.java
similarity index 100%
rename from jaxws/src/java.xml.soap/share/classes/javax/xml/soap/SOAPConnectionFactory.java
rename to jaxws/src/java.xml.ws/share/classes/javax/xml/soap/SOAPConnectionFactory.java
diff --git a/jaxws/src/java.xml.soap/share/classes/javax/xml/soap/SOAPConstants.java b/jaxws/src/java.xml.ws/share/classes/javax/xml/soap/SOAPConstants.java
similarity index 100%
rename from jaxws/src/java.xml.soap/share/classes/javax/xml/soap/SOAPConstants.java
rename to jaxws/src/java.xml.ws/share/classes/javax/xml/soap/SOAPConstants.java
diff --git a/jaxws/src/java.xml.soap/share/classes/javax/xml/soap/SOAPElement.java b/jaxws/src/java.xml.ws/share/classes/javax/xml/soap/SOAPElement.java
similarity index 100%
rename from jaxws/src/java.xml.soap/share/classes/javax/xml/soap/SOAPElement.java
rename to jaxws/src/java.xml.ws/share/classes/javax/xml/soap/SOAPElement.java
diff --git a/jaxws/src/java.xml.soap/share/classes/javax/xml/soap/SOAPElementFactory.java b/jaxws/src/java.xml.ws/share/classes/javax/xml/soap/SOAPElementFactory.java
similarity index 100%
rename from jaxws/src/java.xml.soap/share/classes/javax/xml/soap/SOAPElementFactory.java
rename to jaxws/src/java.xml.ws/share/classes/javax/xml/soap/SOAPElementFactory.java
diff --git a/jaxws/src/java.xml.soap/share/classes/javax/xml/soap/SOAPEnvelope.java b/jaxws/src/java.xml.ws/share/classes/javax/xml/soap/SOAPEnvelope.java
similarity index 100%
rename from jaxws/src/java.xml.soap/share/classes/javax/xml/soap/SOAPEnvelope.java
rename to jaxws/src/java.xml.ws/share/classes/javax/xml/soap/SOAPEnvelope.java
diff --git a/jaxws/src/java.xml.soap/share/classes/javax/xml/soap/SOAPException.java b/jaxws/src/java.xml.ws/share/classes/javax/xml/soap/SOAPException.java
similarity index 100%
rename from jaxws/src/java.xml.soap/share/classes/javax/xml/soap/SOAPException.java
rename to jaxws/src/java.xml.ws/share/classes/javax/xml/soap/SOAPException.java
diff --git a/jaxws/src/java.xml.soap/share/classes/javax/xml/soap/SOAPFactory.java b/jaxws/src/java.xml.ws/share/classes/javax/xml/soap/SOAPFactory.java
similarity index 100%
rename from jaxws/src/java.xml.soap/share/classes/javax/xml/soap/SOAPFactory.java
rename to jaxws/src/java.xml.ws/share/classes/javax/xml/soap/SOAPFactory.java
diff --git a/jaxws/src/java.xml.soap/share/classes/javax/xml/soap/SOAPFault.java b/jaxws/src/java.xml.ws/share/classes/javax/xml/soap/SOAPFault.java
similarity index 100%
rename from jaxws/src/java.xml.soap/share/classes/javax/xml/soap/SOAPFault.java
rename to jaxws/src/java.xml.ws/share/classes/javax/xml/soap/SOAPFault.java
diff --git a/jaxws/src/java.xml.soap/share/classes/javax/xml/soap/SOAPFaultElement.java b/jaxws/src/java.xml.ws/share/classes/javax/xml/soap/SOAPFaultElement.java
similarity index 100%
rename from jaxws/src/java.xml.soap/share/classes/javax/xml/soap/SOAPFaultElement.java
rename to jaxws/src/java.xml.ws/share/classes/javax/xml/soap/SOAPFaultElement.java
diff --git a/jaxws/src/java.xml.soap/share/classes/javax/xml/soap/SOAPHeader.java b/jaxws/src/java.xml.ws/share/classes/javax/xml/soap/SOAPHeader.java
similarity index 100%
rename from jaxws/src/java.xml.soap/share/classes/javax/xml/soap/SOAPHeader.java
rename to jaxws/src/java.xml.ws/share/classes/javax/xml/soap/SOAPHeader.java
diff --git a/jaxws/src/java.xml.soap/share/classes/javax/xml/soap/SOAPHeaderElement.java b/jaxws/src/java.xml.ws/share/classes/javax/xml/soap/SOAPHeaderElement.java
similarity index 100%
rename from jaxws/src/java.xml.soap/share/classes/javax/xml/soap/SOAPHeaderElement.java
rename to jaxws/src/java.xml.ws/share/classes/javax/xml/soap/SOAPHeaderElement.java
diff --git a/jaxws/src/java.xml.soap/share/classes/javax/xml/soap/SOAPMessage.java b/jaxws/src/java.xml.ws/share/classes/javax/xml/soap/SOAPMessage.java
similarity index 100%
rename from jaxws/src/java.xml.soap/share/classes/javax/xml/soap/SOAPMessage.java
rename to jaxws/src/java.xml.ws/share/classes/javax/xml/soap/SOAPMessage.java
diff --git a/jaxws/src/java.xml.soap/share/classes/javax/xml/soap/SOAPPart.java b/jaxws/src/java.xml.ws/share/classes/javax/xml/soap/SOAPPart.java
similarity index 100%
rename from jaxws/src/java.xml.soap/share/classes/javax/xml/soap/SOAPPart.java
rename to jaxws/src/java.xml.ws/share/classes/javax/xml/soap/SOAPPart.java
diff --git a/jaxws/src/java.xml.soap/share/classes/javax/xml/soap/Text.java b/jaxws/src/java.xml.ws/share/classes/javax/xml/soap/Text.java
similarity index 100%
rename from jaxws/src/java.xml.soap/share/classes/javax/xml/soap/Text.java
rename to jaxws/src/java.xml.ws/share/classes/javax/xml/soap/Text.java
diff --git a/jaxws/src/java.xml.soap/share/classes/javax/xml/soap/package.html b/jaxws/src/java.xml.ws/share/classes/javax/xml/soap/package.html
similarity index 100%
rename from jaxws/src/java.xml.soap/share/classes/javax/xml/soap/package.html
rename to jaxws/src/java.xml.ws/share/classes/javax/xml/soap/package.html
diff --git a/jdk/.hgtags b/jdk/.hgtags
index bcf97a6c401..7a8ce5643e2 100644
--- a/jdk/.hgtags
+++ b/jdk/.hgtags
@@ -287,3 +287,4 @@ e336cbd8b15e959e70ed02f0f5e93fa76ebd4c07 jdk9-b41
6b2314173433467245261364a52fb8e347fe6342 jdk9-b42
8c6ad41974f9ab6c33d544b088648314963f2a50 jdk9-b43
8cc4dc300041eb70a7a40e4b2431a8f4d4965ea4 jdk9-b44
+9acaa4f57b0b9e3757a7b4576ca9418a75ea8287 jdk9-b45
diff --git a/jdk/make/lib/LibCommon.gmk b/jdk/make/lib/LibCommon.gmk
index f8eb27a1139..250f8f44b2c 100644
--- a/jdk/make/lib/LibCommon.gmk
+++ b/jdk/make/lib/LibCommon.gmk
@@ -53,24 +53,21 @@ endif
# Find the default set of src dirs for a native library.
# Param 1 - module name
# Param 2 - library name
-define FindSrcDirsForLib
+FindSrcDirsForLib = \
$(call uniq, $(wildcard \
$(JDK_TOPDIR)/src/$(strip $1)/$(OPENJDK_TARGET_OS)/native/lib$(strip $2) \
$(JDK_TOPDIR)/src/$(strip $1)/$(OPENJDK_TARGET_OS_TYPE)/native/lib$(strip $2) \
$(JDK_TOPDIR)/src/$(strip $1)/share/native/lib$(strip $2)))
-endef
################################################################################
# Find lib dir for module
# Param 1 - module name
ifeq ($(OPENJDK_TARGET_OS_TYPE), unix)
- define FindLibDirForModule
- $(SUPPORT_OUTPUTDIR)/modules_libs/$(strip $1)$(OPENJDK_TARGET_CPU_LIBDIR)
- endef
+ FindLibDirForModule = \
+ $(SUPPORT_OUTPUTDIR)/modules_libs/$(strip $1)$(OPENJDK_TARGET_CPU_LIBDIR)
else
- define FindLibDirForModule
- $(SUPPORT_OUTPUTDIR)/modules_libs/$(strip $1)
- endef
+ FindLibDirForModule = \
+ $(SUPPORT_OUTPUTDIR)/modules_libs/$(strip $1)
endif
################################################################################
@@ -78,11 +75,10 @@ endif
# Param 1 - module name
# Param 2 - library name
# Param 3 - subdir for library
-define FindLib
-$(strip \
- $(call FindLibDirForModule, $(strip $1))$(strip $3)/$(LIBRARY_PREFIX)$(strip $2)$(SHARED_LIBRARY_SUFFIX) \
-)
-endef
+FindLib = \
+ $(call FindLibDirForModule, \
+ $(strip $1))$(strip $3)/$(LIBRARY_PREFIX)$(strip $2)$(SHARED_LIBRARY_SUFFIX)
+
################################################################################
# Define the header include flags needed to compile against it.
diff --git a/jdk/make/src/classes/build/tools/module/boot.modules b/jdk/make/src/classes/build/tools/module/boot.modules
index 396e13c4db3..9763b9287d4 100644
--- a/jdk/make/src/classes/build/tools/module/boot.modules
+++ b/jdk/make/src/classes/build/tools/module/boot.modules
@@ -17,10 +17,10 @@ java.security.sasl
java.smartcardio
java.sql
java.sql.rowset
+java.transaction
java.xml
java.xml.bind
java.xml.crypto
-java.xml.soap
java.xml.ws
jdk.charsets
jdk.deploy
diff --git a/jdk/src/java.base/share/classes/java/io/FilterOutputStream.java b/jdk/src/java.base/share/classes/java/io/FilterOutputStream.java
index 7d5b0c9c074..85e4dd1b281 100644
--- a/jdk/src/java.base/share/classes/java/io/FilterOutputStream.java
+++ b/jdk/src/java.base/share/classes/java/io/FilterOutputStream.java
@@ -48,6 +48,8 @@ class FilterOutputStream extends OutputStream {
*/
protected OutputStream out;
+ private boolean closed;
+
/**
* Creates an output stream filter built on top of the specified
* underlying output stream.
@@ -144,9 +146,9 @@ class FilterOutputStream extends OutputStream {
* Closes this output stream and releases any system resources
* associated with the stream.
*
- * The close method of FilterOutputStream
- * calls its flush method, and then calls the
- * close method of its underlying output stream.
+ * When not already closed, the {@code close} method of {@code
+ * FilterOutputStream} calls its {@code flush} method, and then
+ * calls the {@code close} method of its underlying output stream.
*
* @exception IOException if an I/O error occurs.
* @see java.io.FilterOutputStream#flush()
@@ -154,6 +156,9 @@ class FilterOutputStream extends OutputStream {
*/
@SuppressWarnings("try")
public void close() throws IOException {
+ if (closed)
+ return;
+ closed = true;
try (OutputStream ostream = out) {
flush();
}
diff --git a/jdk/src/java.base/share/classes/java/lang/Deprecated.java b/jdk/src/java.base/share/classes/java/lang/Deprecated.java
index 58a0691f054..7adc22edaf5 100644
--- a/jdk/src/java.base/share/classes/java/lang/Deprecated.java
+++ b/jdk/src/java.base/share/classes/java/lang/Deprecated.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2003, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2003, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -34,9 +34,13 @@ import static java.lang.annotation.ElementType.*;
* or because a better alternative exists. Compilers warn when a
* deprecated program element is used or overridden in non-deprecated code.
*
+ *
Use of the @Deprecated annotation on a local variable
+ * declaration or on a parameter declaration or a package declaration
+ * has no effect.
+ *
* @author Neal Gafter
* @since 1.5
- * @jls 9.6.3.6 @Deprecated
+ * @jls 9.6.4.6 @Deprecated
*/
@Documented
@Retention(RetentionPolicy.RUNTIME)
diff --git a/jdk/src/java.base/share/classes/java/math/BigInteger.java b/jdk/src/java.base/share/classes/java/math/BigInteger.java
index 487ed224352..2088f63fca1 100644
--- a/jdk/src/java.base/share/classes/java/math/BigInteger.java
+++ b/jdk/src/java.base/share/classes/java/math/BigInteger.java
@@ -265,24 +265,41 @@ public class BigInteger extends Number implements Comparable {
// Constructors
/**
- * Translates a byte array containing the two's-complement binary
- * representation of a BigInteger into a BigInteger. The input array is
+ * Translates a byte sub-array containing the two's-complement binary
+ * representation of a BigInteger into a BigInteger. The sub-array is
+ * specified via an offset into the array and a length. The sub-array is
* assumed to be in big-endian byte-order: the most significant
- * byte is in the zeroth element.
+ * byte is the element at index {@code off}. The {@code val} array is
+ * assumed to be unchanged for the duration of the constructor call.
*
- * @param val big-endian two's-complement binary representation of
- * BigInteger.
+ * An {@code IndexOutOfBoundsException} is thrown if the length of the array
+ * {@code val} is non-zero and either {@code off} is negative, {@code len}
+ * is negative, or {@code off+len} is greater than the length of
+ * {@code val}.
+ *
+ * @param val byte array containing a sub-array which is the big-endian
+ * two's-complement binary representation of a BigInteger.
+ * @param off the start offset of the binary representation.
+ * @param len the number of bytes to use.
* @throws NumberFormatException {@code val} is zero bytes long.
+ * @throws IndexOutOfBoundsException if the provided array offset and
+ * length would cause an index into the byte array to be
+ * negative or greater than or equal to the array length.
+ * @since 1.9
*/
- public BigInteger(byte[] val) {
- if (val.length == 0)
+ public BigInteger(byte[] val, int off, int len) {
+ if (val.length == 0) {
throw new NumberFormatException("Zero length BigInteger");
+ } else if ((off < 0) || (off >= val.length) || (len < 0) ||
+ (len > val.length - off)) { // 0 <= off < val.length
+ throw new IndexOutOfBoundsException();
+ }
- if (val[0] < 0) {
- mag = makePositive(val);
+ if (val[off] < 0) {
+ mag = makePositive(val, off, len);
signum = -1;
} else {
- mag = stripLeadingZeroBytes(val);
+ mag = stripLeadingZeroBytes(val, off, len);
signum = (mag.length == 0 ? 0 : 1);
}
if (mag.length >= MAX_MAG_LENGTH) {
@@ -290,11 +307,28 @@ public class BigInteger extends Number implements Comparable {
}
}
+ /**
+ * Translates a byte array containing the two's-complement binary
+ * representation of a BigInteger into a BigInteger. The input array is
+ * assumed to be in big-endian byte-order: the most significant
+ * byte is in the zeroth element. The {@code val} array is assumed to be
+ * unchanged for the duration of the constructor call.
+ *
+ * @param val big-endian two's-complement binary representation of a
+ * BigInteger.
+ * @throws NumberFormatException {@code val} is zero bytes long.
+ */
+ public BigInteger(byte[] val) {
+ this(val, 0, val.length);
+ }
+
/**
* This private constructor translates an int array containing the
* two's-complement binary representation of a BigInteger into a
* BigInteger. The input array is assumed to be in big-endian
- * int-order: the most significant int is in the zeroth element.
+ * int-order: the most significant int is in the zeroth element. The
+ * {@code val} array is assumed to be unchanged for the duration of
+ * the constructor call.
*/
private BigInteger(int[] val) {
if (val.length == 0)
@@ -315,24 +349,44 @@ public class BigInteger extends Number implements Comparable {
/**
* Translates the sign-magnitude representation of a BigInteger into a
* BigInteger. The sign is represented as an integer signum value: -1 for
- * negative, 0 for zero, or 1 for positive. The magnitude is a byte array
- * in big-endian byte-order: the most significant byte is in the
- * zeroth element. A zero-length magnitude array is permissible, and will
- * result in a BigInteger value of 0, whether signum is -1, 0 or 1.
+ * negative, 0 for zero, or 1 for positive. The magnitude is a sub-array of
+ * a byte array in big-endian byte-order: the most significant byte
+ * is the element at index {@code off}. A zero value of the length
+ * {@code len} is permissible, and will result in a BigInteger value of 0,
+ * whether signum is -1, 0 or 1. The {@code magnitude} array is assumed to
+ * be unchanged for the duration of the constructor call.
+ *
+ * An {@code IndexOutOfBoundsException} is thrown if the length of the array
+ * {@code magnitude} is non-zero and either {@code off} is negative,
+ * {@code len} is negative, or {@code off+len} is greater than the length of
+ * {@code magnitude}.
*
* @param signum signum of the number (-1 for negative, 0 for zero, 1
* for positive).
* @param magnitude big-endian binary representation of the magnitude of
* the number.
+ * @param off the start offset of the binary representation.
+ * @param len the number of bytes to use.
* @throws NumberFormatException {@code signum} is not one of the three
* legal values (-1, 0, and 1), or {@code signum} is 0 and
* {@code magnitude} contains one or more non-zero bytes.
+ * @throws IndexOutOfBoundsException if the provided array offset and
+ * length would cause an index into the byte array to be
+ * negative or greater than or equal to the array length.
+ * @since 1.9
*/
- public BigInteger(int signum, byte[] magnitude) {
- this.mag = stripLeadingZeroBytes(magnitude);
-
- if (signum < -1 || signum > 1)
+ public BigInteger(int signum, byte[] magnitude, int off, int len) {
+ if (signum < -1 || signum > 1) {
throw(new NumberFormatException("Invalid signum value"));
+ } else if ((off < 0) || (len < 0) ||
+ (len > 0 &&
+ ((off >= magnitude.length) ||
+ (len > magnitude.length - off)))) { // 0 <= off < magnitude.length
+ throw new IndexOutOfBoundsException();
+ }
+
+ // stripLeadingZeroBytes() returns a zero length array if len == 0
+ this.mag = stripLeadingZeroBytes(magnitude, off, len);
if (this.mag.length == 0) {
this.signum = 0;
@@ -346,11 +400,34 @@ public class BigInteger extends Number implements Comparable {
}
}
+ /**
+ * Translates the sign-magnitude representation of a BigInteger into a
+ * BigInteger. The sign is represented as an integer signum value: -1 for
+ * negative, 0 for zero, or 1 for positive. The magnitude is a byte array
+ * in big-endian byte-order: the most significant byte is the
+ * zeroth element. A zero-length magnitude array is permissible, and will
+ * result in a BigInteger value of 0, whether signum is -1, 0 or 1. The
+ * {@code magnitude} array is assumed to be unchanged for the duration of
+ * the constructor call.
+ *
+ * @param signum signum of the number (-1 for negative, 0 for zero, 1
+ * for positive).
+ * @param magnitude big-endian binary representation of the magnitude of
+ * the number.
+ * @throws NumberFormatException {@code signum} is not one of the three
+ * legal values (-1, 0, and 1), or {@code signum} is 0 and
+ * {@code magnitude} contains one or more non-zero bytes.
+ */
+ public BigInteger(int signum, byte[] magnitude) {
+ this(signum, magnitude, 0, magnitude.length);
+ }
+
/**
* A constructor for internal use that translates the sign-magnitude
* representation of a BigInteger into a BigInteger. It checks the
* arguments and copies the magnitude so this constructor would be
- * safe for external use.
+ * safe for external use. The {@code magnitude} array is assumed to be
+ * unchanged for the duration of the constructor call.
*/
private BigInteger(int signum, int[] magnitude) {
this.mag = stripLeadingZeroInts(magnitude);
@@ -467,7 +544,9 @@ public class BigInteger extends Number implements Comparable {
/*
* Constructs a new BigInteger using a char array with radix=10.
- * Sign is precalculated outside and not allowed in the val.
+ * Sign is precalculated outside and not allowed in the val. The {@code val}
+ * array is assumed to be unchanged for the duration of the constructor
+ * call.
*/
BigInteger(char[] val, int sign, int len) {
int cursor = 0, numDigits;
@@ -1035,11 +1114,12 @@ public class BigInteger extends Number implements Comparable {
/**
* This private constructor is for internal use and assumes that its
- * arguments are correct.
+ * arguments are correct. The {@code magnitude} array is assumed to be
+ * unchanged for the duration of the constructor call.
*/
private BigInteger(byte[] magnitude, int signum) {
this.signum = (magnitude.length == 0 ? 0 : signum);
- this.mag = stripLeadingZeroBytes(magnitude);
+ this.mag = stripLeadingZeroBytes(magnitude, 0, magnitude.length);
if (mag.length >= MAX_MAG_LENGTH) {
checkRange();
}
@@ -3977,18 +4057,18 @@ public class BigInteger extends Number implements Comparable {
/**
* Returns a copy of the input array stripped of any leading zero bytes.
*/
- private static int[] stripLeadingZeroBytes(byte a[]) {
- int byteLength = a.length;
+ private static int[] stripLeadingZeroBytes(byte a[], int off, int len) {
+ int indexBound = off + len;
int keep;
// Find first nonzero byte
- for (keep = 0; keep < byteLength && a[keep] == 0; keep++)
+ for (keep = off; keep < indexBound && a[keep] == 0; keep++)
;
// Allocate new array and copy relevant part of input array
- int intLength = ((byteLength - keep) + 3) >>> 2;
+ int intLength = ((indexBound - keep) + 3) >>> 2;
int[] result = new int[intLength];
- int b = byteLength - 1;
+ int b = indexBound - 1;
for (int i = intLength-1; i >= 0; i--) {
result[i] = a[b--] & 0xff;
int bytesRemaining = b - keep + 1;
@@ -4003,27 +4083,27 @@ public class BigInteger extends Number implements Comparable {
* Takes an array a representing a negative 2's-complement number and
* returns the minimal (no leading zero bytes) unsigned whose value is -a.
*/
- private static int[] makePositive(byte a[]) {
+ private static int[] makePositive(byte a[], int off, int len) {
int keep, k;
- int byteLength = a.length;
+ int indexBound = off + len;
// Find first non-sign (0xff) byte of input
- for (keep=0; keep < byteLength && a[keep] == -1; keep++)
+ for (keep=off; keep < indexBound && a[keep] == -1; keep++)
;
/* Allocate output array. If all non-sign bytes are 0x00, we must
* allocate space for one extra output byte. */
- for (k=keep; k < byteLength && a[k] == 0; k++)
+ for (k=keep; k < indexBound && a[k] == 0; k++)
;
- int extraByte = (k == byteLength) ? 1 : 0;
- int intLength = ((byteLength - keep + extraByte) + 3) >>> 2;
+ int extraByte = (k == indexBound) ? 1 : 0;
+ int intLength = ((indexBound - keep + extraByte) + 3) >>> 2;
int result[] = new int[intLength];
/* Copy one's complement of input into output, leaving extra
* byte (if it exists) == 0x00 */
- int b = byteLength - 1;
+ int b = indexBound - 1;
for (int i = intLength-1; i >= 0; i--) {
result[i] = a[b--] & 0xff;
int numBytesToTransfer = Math.min(3, b-keep+1);
@@ -4248,7 +4328,7 @@ public class BigInteger extends Number implements Comparable {
message = "BigInteger: Signum not present in stream";
throw new java.io.StreamCorruptedException(message);
}
- int[] mag = stripLeadingZeroBytes(magnitude);
+ int[] mag = stripLeadingZeroBytes(magnitude, 0, magnitude.length);
if ((mag.length == 0) != (sign == 0)) {
String message = "BigInteger: signum-magnitude mismatch";
if (fields.defaulted("magnitude"))
diff --git a/jdk/src/java.base/share/classes/java/util/Formatter.java b/jdk/src/java.base/share/classes/java/util/Formatter.java
index 70298d5b59f..a973ee6889e 100644
--- a/jdk/src/java.base/share/classes/java/util/Formatter.java
+++ b/jdk/src/java.base/share/classes/java/util/Formatter.java
@@ -3727,29 +3727,29 @@ public final class Formatter implements Closeable, Flushable {
exp = new StringBuilder("+00");
}
}
- return;
- }
- long adjusted = -(long) scale + (len - 1);
- if (form == BigDecimalLayoutForm.DECIMAL_FLOAT) {
+ } else if (form == BigDecimalLayoutForm.DECIMAL_FLOAT) {
// count of padding zeros
- int pad = scale - len;
- if (pad >= 0) {
+
+ if (scale >= len) {
// 0.xxx form
mant.append("0.");
dot = true;
- trailingZeros(mant, pad);
+ trailingZeros(mant, scale - len);
mant.append(coeff);
} else {
- if (-pad < len) {
+ if (scale > 0) {
// xx.xx form
- mant.append(coeff, 0, -pad);
+ int pad = len - scale;
+ mant.append(coeff, 0, pad);
mant.append('.');
dot = true;
- mant.append(coeff, -pad, -pad + scale);
- } else {
+ mant.append(coeff, pad, len);
+ } else { // scale < 0
// xx form
mant.append(coeff, 0, len);
- trailingZeros(mant, -scale);
+ if (intVal.signum() != 0) {
+ trailingZeros(mant, -scale);
+ }
this.scale = 0;
}
}
@@ -3762,6 +3762,7 @@ public final class Formatter implements Closeable, Flushable {
mant.append(coeff, 1, len);
}
exp = new StringBuilder();
+ long adjusted = -(long) scale + (len - 1);
if (adjusted != 0) {
long abs = Math.abs(adjusted);
// require sign
diff --git a/jdk/src/java.base/share/classes/javax/crypto/spec/RC5ParameterSpec.java b/jdk/src/java.base/share/classes/javax/crypto/spec/RC5ParameterSpec.java
index 0eddb61f1de..5d8f09f4567 100644
--- a/jdk/src/java.base/share/classes/javax/crypto/spec/RC5ParameterSpec.java
+++ b/jdk/src/java.base/share/classes/javax/crypto/spec/RC5ParameterSpec.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1998, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1998, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -29,7 +29,7 @@ import java.security.spec.AlgorithmParameterSpec;
/**
* This class specifies the parameters used with the
- * RC5
+ * RC5
* algorithm.
*
*
The parameters consist of a version number, a rounds count, a word
@@ -37,7 +37,7 @@ import java.security.spec.AlgorithmParameterSpec;
*
*
This class can be used to initialize a Cipher object that
* implements the RC5 algorithm as supplied by
- * RSA Security Inc.,
+ * RSA Security LLC,
* or any parties authorized by RSA Security.
*
* @author Jan Luehe
diff --git a/jdk/src/java.base/windows/classes/sun/nio/ch/FileDispatcherImpl.java b/jdk/src/java.base/windows/classes/sun/nio/ch/FileDispatcherImpl.java
index c767a34cc08..a8c20e2bb58 100644
--- a/jdk/src/java.base/windows/classes/sun/nio/ch/FileDispatcherImpl.java
+++ b/jdk/src/java.base/windows/classes/sun/nio/ch/FileDispatcherImpl.java
@@ -123,7 +123,7 @@ class FileDispatcherImpl extends FileDispatcher {
new PrivilegedAction() {
@Override
public String run() {
- return System.getProperty("jdk.net.enableFastFileTransfer");
+ return System.getProperty("jdk.nio.enableFastFileTransfer");
}
});
boolean enable;
diff --git a/jdk/src/java.base/windows/native/libnet/NetworkInterface_winXP.c b/jdk/src/java.base/windows/native/libnet/NetworkInterface_winXP.c
index e5580c6f3dc..2308a59b44b 100644
--- a/jdk/src/java.base/windows/native/libnet/NetworkInterface_winXP.c
+++ b/jdk/src/java.base/windows/native/libnet/NetworkInterface_winXP.c
@@ -81,9 +81,17 @@ static int getAdapters (JNIEnv *env, IP_ADAPTER_ADDRESSES **adapters) {
DWORD ret, flags;
IP_ADAPTER_ADDRESSES *adapterInfo;
ULONG len;
+ char *error_msg_buf = NULL;
+ size_t error_msg_buf_size =
+ strlen("IP Helper Library GetAdaptersAddresses function failed"
+ " with error == ") + 10;
+ int _ret = 0;
+
+
adapterInfo = (IP_ADAPTER_ADDRESSES *)malloc (bufsize);
if (adapterInfo == NULL) {
- JNU_ThrowByName(env, "java/lang/OutOfMemoryError", "Native heap allocation failure");
+ JNU_ThrowByName(env, "java/lang/OutOfMemoryError",
+ "Native heap allocation failure");
return -1;
}
@@ -94,10 +102,12 @@ static int getAdapters (JNIEnv *env, IP_ADAPTER_ADDRESSES **adapters) {
ret = GetAdaptersAddresses(AF_UNSPEC, flags, NULL, adapterInfo, &len);
if (ret == ERROR_BUFFER_OVERFLOW) {
- IP_ADAPTER_ADDRESSES * newAdapterInfo = (IP_ADAPTER_ADDRESSES *) realloc (adapterInfo, len);
+ IP_ADAPTER_ADDRESSES * newAdapterInfo =
+ (IP_ADAPTER_ADDRESSES *) realloc (adapterInfo, len);
if (newAdapterInfo == NULL) {
free(adapterInfo);
- JNU_ThrowByName(env, "java/lang/OutOfMemoryError", "Native heap allocation failure");
+ JNU_ThrowByName(env, "java/lang/OutOfMemoryError",
+ "Native heap allocation failure");
return -1;
}
@@ -109,8 +119,32 @@ static int getAdapters (JNIEnv *env, IP_ADAPTER_ADDRESSES **adapters) {
if (ret != ERROR_SUCCESS) {
free (adapterInfo);
- JNU_ThrowByName(env, "java/lang/Error",
- "IP Helper Library GetAdaptersAddresses function failed");
+ if (ret == ERROR_INSUFFICIENT_BUFFER) {
+ JNU_ThrowByName(env, "java/lang/Error",
+ "IP Helper Library GetAdaptersAddresses function failed "
+ "with ERROR_INSUFFICIENT_BUFFER");
+ } else if (ret == ERROR_ADDRESS_NOT_ASSOCIATED ) {
+ JNU_ThrowByName(env, "java/lang/Error",
+ "IP Helper Library GetAdaptersAddresses function failed "
+ "with ERROR_ADDRESS_NOT_ASSOCIATED");
+ } else {
+ error_msg_buf = (char *)malloc(error_msg_buf_size);
+ if (error_msg_buf != NULL) {
+ memset(error_msg_buf, 0, error_msg_buf_size);
+ _ret = _snprintf_s(error_msg_buf, error_msg_buf_size,
+ _TRUNCATE, "IP Helper Library GetAdaptersAddresses "
+ "function failed with error == %d", ret);
+ if (_ret != -1) {
+ JNU_ThrowByName(env, "java/lang/Error", error_msg_buf);
+ } else {
+ JNU_ThrowByName(env, "java/lang/Error",
+ "IP Helper Library GetAdaptersAddresses function failure");
+ }
+ } else {
+ JNU_ThrowByName(env, "java/lang/Error",
+ "IP Helper Library GetAdaptersAddresses function failed");
+ }
+ }
return -1;
}
*adapters = adapterInfo;
@@ -126,9 +160,14 @@ IP_ADAPTER_ADDRESSES *getAdapter (JNIEnv *env, jint index) {
DWORD flags, val;
IP_ADAPTER_ADDRESSES *adapterInfo, *ptr, *ret;
ULONG len;
+ char *error_msg_buf = NULL;
+ size_t error_msg_buf_size =
+ strlen("IP Helper Library GetAdaptersAddresses function failed with error == ") + 10;
+ int _ret = 0;
adapterInfo = (IP_ADAPTER_ADDRESSES *)malloc (bufsize);
if (adapterInfo == NULL) {
- JNU_ThrowByName(env, "java/lang/OutOfMemoryError", "Native heap allocation failure");
+ JNU_ThrowByName(env, "java/lang/OutOfMemoryError",
+ "Native heap allocation failure");
return NULL;
}
len = bufsize;
@@ -137,10 +176,12 @@ IP_ADAPTER_ADDRESSES *getAdapter (JNIEnv *env, jint index) {
flags |= GAA_FLAG_INCLUDE_PREFIX;
val = GetAdaptersAddresses(AF_UNSPEC, flags, NULL, adapterInfo, &len);
if (val == ERROR_BUFFER_OVERFLOW) {
- IP_ADAPTER_ADDRESSES * newAdapterInfo = (IP_ADAPTER_ADDRESSES *) realloc (adapterInfo, len);
+ IP_ADAPTER_ADDRESSES * newAdapterInfo =
+ (IP_ADAPTER_ADDRESSES *) realloc (adapterInfo, len);
if (newAdapterInfo == NULL) {
free(adapterInfo);
- JNU_ThrowByName(env, "java/lang/OutOfMemoryError", "Native heap allocation failure");
+ JNU_ThrowByName(env, "java/lang/OutOfMemoryError",
+ "Native heap allocation failure");
return NULL;
}
@@ -152,10 +193,35 @@ IP_ADAPTER_ADDRESSES *getAdapter (JNIEnv *env, jint index) {
if (val != ERROR_SUCCESS) {
free (adapterInfo);
- JNU_ThrowByName(env, "java/lang/Error",
- "IP Helper Library GetAdaptersAddresses function failed");
+ if (val == ERROR_INSUFFICIENT_BUFFER) {
+ JNU_ThrowByName(env, "java/lang/Error",
+ "IP Helper Library GetAdaptersAddresses function failed "
+ "with ERROR_INSUFFICIENT_BUFFER");
+ } else if (val == ERROR_ADDRESS_NOT_ASSOCIATED ) {
+ JNU_ThrowByName(env, "java/lang/Error",
+ "IP Helper Library GetAdaptersAddresses function failed "
+ "with ERROR_ADDRESS_NOT_ASSOCIATED");
+ } else {
+ error_msg_buf = (char *)malloc(error_msg_buf_size);
+ if (error_msg_buf != NULL) {
+ memset(error_msg_buf, 0, error_msg_buf_size);
+ _ret = _snprintf_s(error_msg_buf, error_msg_buf_size,
+ _TRUNCATE, "IP Helper Library GetAdaptersAddresses function failed "
+ "with error == %d", val);
+ if (_ret != -1) {
+ JNU_ThrowByName(env, "java/lang/Error", error_msg_buf);
+ } else {
+ JNU_ThrowByName(env, "java/lang/Error",
+ "IP Helper Library GetAdaptersAddresses function failure");
+ }
+ } else {
+ JNU_ThrowByName(env, "java/lang/Error",
+ "IP Helper Library GetAdaptersAddresses function failed");
+ }
+ }
return NULL;
}
+
ptr = adapterInfo;
ret = NULL;
while (ptr != NULL) {
@@ -168,7 +234,8 @@ IP_ADAPTER_ADDRESSES *getAdapter (JNIEnv *env, jint index) {
ret = (IP_ADAPTER_ADDRESSES *) malloc(sizeof(IP_ADAPTER_ADDRESSES));
if (ret == NULL) {
free(adapterInfo);
- JNU_ThrowByName(env, "java/lang/OutOfMemoryError", "Native heap allocation failure");
+ JNU_ThrowByName(env, "java/lang/OutOfMemoryError",
+ "Native heap allocation failure");
return NULL;
}
diff --git a/jdk/src/java.scripting/share/classes/javax/script/ScriptEngineFactory.java b/jdk/src/java.scripting/share/classes/javax/script/ScriptEngineFactory.java
index e73c99f5203..7692a0aaec7 100644
--- a/jdk/src/java.scripting/share/classes/javax/script/ScriptEngineFactory.java
+++ b/jdk/src/java.scripting/share/classes/javax/script/ScriptEngineFactory.java
@@ -85,7 +85,7 @@ public interface ScriptEngineFactory {
public List getNames();
/**
- * Returns the name of the scripting langauge supported by this
+ * Returns the name of the scripting language supported by this
* ScriptEngine.
* @return The name of the supported language.
*/
@@ -104,14 +104,15 @@ public interface ScriptEngineFactory {
*
*
ScriptEngine.ENGINE
*
ScriptEngine.ENGINE_VERSION
- *
ScriptEngine.NAME
*
ScriptEngine.LANGUAGE
*
ScriptEngine.LANGUAGE_VERSION
+ *
ScriptEngine.NAME
*
*
* The values for these keys are the Strings returned by getEngineName,
- * getEngineVersion, getName, getLanguageName and
- * getLanguageVersion respectively.
+ * getEngineVersion, getLanguageName,
+ * getLanguageVersion for the first four keys respectively. For NAME, one of the Strings
+ * returned by getNames is returned.
* A reserved key, THREADING, whose value describes the behavior of the engine
* with respect to concurrent execution of scripts and maintenance of state is also defined.
* These values for the THREADING key are:
diff --git a/corba/src/java.sql/share/classes/javax/transaction/xa/XAException.java b/jdk/src/java.sql/share/classes/javax/transaction/xa/XAException.java
similarity index 93%
rename from corba/src/java.sql/share/classes/javax/transaction/xa/XAException.java
rename to jdk/src/java.sql/share/classes/javax/transaction/xa/XAException.java
index 7941e98995b..62ae7e5e8d9 100644
--- a/corba/src/java.sql/share/classes/javax/transaction/xa/XAException.java
+++ b/jdk/src/java.sql/share/classes/javax/transaction/xa/XAException.java
@@ -30,21 +30,20 @@ package javax.transaction.xa;
* Transaction Manager of an error encountered by the involved transaction.
*
*/
-public class XAException extends java.lang.Exception {
+public class XAException extends Exception {
+ //private static final long serialVersionUID = -8249683284832867751L;
/**
- * The error code with which to create the SystemException.
- *
- * @serial The error code for the exception
+ * The error code with which to create the SystemException.
+ *
+ * @serial The error code for the exception
*/
-
public int errorCode;
/**
* Create an XAException.
*/
- public XAException()
- {
+ public XAException() {
super();
}
@@ -54,8 +53,7 @@ public class XAException extends java.lang.Exception {
* @param s The String object containing the exception
* message.
*/
- public XAException(String s)
- {
+ public XAException(String s) {
super(s);
}
@@ -64,8 +62,7 @@ public class XAException extends java.lang.Exception {
*
* @param errcode The error code identifying the exception.
*/
- public XAException(int errcode)
- {
+ public XAException(int errcode) {
super();
errorCode = errcode;
}
@@ -196,6 +193,4 @@ public class XAException extends java.lang.Exception {
* The resource manager is doing work outside a global transaction.
*/
public final static int XAER_OUTSIDE = -9;
-
-
}
diff --git a/jdk/src/java.sql/share/classes/javax/transaction/xa/XAResource.java b/jdk/src/java.sql/share/classes/javax/transaction/xa/XAResource.java
new file mode 100644
index 00000000000..489818e98a5
--- /dev/null
+++ b/jdk/src/java.sql/share/classes/javax/transaction/xa/XAResource.java
@@ -0,0 +1,305 @@
+/*
+ * Copyright (c) 2000, 2001, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation. Oracle designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Oracle in the LICENSE file that accompanied this code.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+package javax.transaction.xa;
+
+/**
+ * The XAResource interface is a Java mapping of the industry standard
+ * XA interface based on the X/Open CAE Specification (Distributed
+ * Transaction Processing: The XA Specification).
+ *
+ *
The XA interface defines the contract between a Resource Manager
+ * and a Transaction Manager in a distributed transaction processing
+ * (DTP) environment. A JDBC driver or a JMS provider implements
+ * this interface to support the association between a global transaction
+ * and a database or message service connection.
+ *
+ *
The XAResource interface can be supported by any transactional
+ * resource that is intended to be used by application programs in an
+ * environment where transactions are controlled by an external
+ * transaction manager. An example of such a resource is a database
+ * management system. An application may access data through multiple
+ * database connections. Each database connection is enlisted with
+ * the transaction manager as a transactional resource. The transaction
+ * manager obtains an XAResource for each connection participating
+ * in a global transaction. The transaction manager uses the
+ * start method
+ * to associate the global transaction with the resource, and it uses the
+ * end method to disassociate the transaction from
+ * the resource. The resource
+ * manager is responsible for associating the global transaction to all
+ * work performed on its data between the start and end method invocations.
+ *
+ *
At transaction commit time, the resource managers are informed by
+ * the transaction manager to prepare, commit, or rollback a transaction
+ * according to the two-phase commit protocol.
+ *
+ */
+public interface XAResource {
+
+ /**
+ * Commits the global transaction specified by xid.
+ *
+ * @param xid A global transaction identifier
+ *
+ * @param onePhase If true, the resource manager should use a one-phase
+ * commit protocol to commit the work done on behalf of xid.
+ *
+ * @exception XAException An error has occurred. Possible XAExceptions
+ * are XA_HEURHAZ, XA_HEURCOM, XA_HEURRB, XA_HEURMIX, XAER_RMERR,
+ * XAER_RMFAIL, XAER_NOTA, XAER_INVAL, or XAER_PROTO.
+ *
+ *
If the resource manager did not commit the transaction and the
+ * paramether onePhase is set to true, the resource manager may throw
+ * one of the XA_RB* exceptions. Upon return, the resource manager has
+ * rolled back the branch's work and has released all held resources.
+ */
+ void commit(Xid xid, boolean onePhase) throws XAException;
+
+ /**
+ * Ends the work performed on behalf of a transaction branch.
+ * The resource manager disassociates the XA resource from the
+ * transaction branch specified and lets the transaction
+ * complete.
+ *
+ *
If TMSUSPEND is specified in the flags, the transaction branch
+ * is temporarily suspended in an incomplete state. The transaction
+ * context is in a suspended state and must be resumed via the
+ * start method with TMRESUME specified.
+ *
+ *
If TMFAIL is specified, the portion of work has failed.
+ * The resource manager may mark the transaction as rollback-only
+ *
+ *
If TMSUCCESS is specified, the portion of work has completed
+ * successfully.
+ *
+ * @param xid A global transaction identifier that is the same as
+ * the identifier used previously in the start method.
+ *
+ * @param flags One of TMSUCCESS, TMFAIL, or TMSUSPEND.
+ *
+ * @exception XAException An error has occurred. Possible XAException
+ * values are XAER_RMERR, XAER_RMFAILED, XAER_NOTA, XAER_INVAL,
+ * XAER_PROTO, or XA_RB*.
+ */
+ void end(Xid xid, int flags) throws XAException;
+
+ /**
+ * Tells the resource manager to forget about a heuristically
+ * completed transaction branch.
+ *
+ * @param xid A global transaction identifier.
+ *
+ * @exception XAException An error has occurred. Possible exception
+ * values are XAER_RMERR, XAER_RMFAIL, XAER_NOTA, XAER_INVAL, or
+ * XAER_PROTO.
+ */
+ void forget(Xid xid) throws XAException;
+
+ /**
+ * Obtains the current transaction timeout value set for this
+ * XAResource instance. If XAResource.setTransactionTimeout
+ * was not used prior to invoking this method, the return value
+ * is the default timeout set for the resource manager; otherwise,
+ * the value used in the previous setTransactionTimeout
+ * call is returned.
+ *
+ * @return the transaction timeout value in seconds.
+ *
+ * @exception XAException An error has occurred. Possible exception
+ * values are XAER_RMERR and XAER_RMFAIL.
+ */
+ int getTransactionTimeout() throws XAException;
+
+ /**
+ * This method is called to determine if the resource manager
+ * instance represented by the target object is the same as the
+ * resouce manager instance represented by the parameter xares.
+ *
+ * @param xares An XAResource object whose resource manager instance
+ * is to be compared with the resource manager instance of the
+ * target object.
+ *
+ * @return true if it's the same RM instance; otherwise
+ * false.
+ *
+ * @exception XAException An error has occurred. Possible exception
+ * values are XAER_RMERR and XAER_RMFAIL.
+ */
+ boolean isSameRM(XAResource xares) throws XAException;
+
+ /**
+ * Ask the resource manager to prepare for a transaction commit
+ * of the transaction specified in xid.
+ *
+ * @param xid A global transaction identifier.
+ *
+ * @exception XAException An error has occurred. Possible exception
+ * values are: XA_RB*, XAER_RMERR, XAER_RMFAIL, XAER_NOTA, XAER_INVAL,
+ * or XAER_PROTO.
+ *
+ * @return A value indicating the resource manager's vote on the
+ * outcome of the transaction. The possible values are: XA_RDONLY
+ * or XA_OK. If the resource manager wants to roll back the
+ * transaction, it should do so by raising an appropriate XAException
+ * in the prepare method.
+ */
+ int prepare(Xid xid) throws XAException;
+
+ /**
+ * Obtains a list of prepared transaction branches from a resource
+ * manager. The transaction manager calls this method during recovery
+ * to obtain the list of transaction branches that are currently in
+ * prepared or heuristically completed states.
+ *
+ * @param flag One of TMSTARTRSCAN, TMENDRSCAN, TMNOFLAGS. TMNOFLAGS
+ * must be used when no other flags are set in the parameter.
+ *
+ * @exception XAException An error has occurred. Possible values are
+ * XAER_RMERR, XAER_RMFAIL, XAER_INVAL, and XAER_PROTO.
+ *
+ * @return The resource manager returns zero or more XIDs of the
+ * transaction branches that are currently in a prepared or
+ * heuristically completed state. If an error occurs during the
+ * operation, the resource manager should throw the appropriate
+ * XAException.
+ */
+ Xid[] recover(int flag) throws XAException;
+
+ /**
+ * Informs the resource manager to roll back work done on behalf
+ * of a transaction branch.
+ *
+ * @param xid A global transaction identifier.
+ *
+ * @exception XAException An error has occurred.
+ */
+ void rollback(Xid xid) throws XAException;
+
+ /**
+ * Sets the current transaction timeout value for this XAResource
+ * instance. Once set, this timeout value is effective until
+ * setTransactionTimeout is invoked again with a different
+ * value. To reset the timeout value to the default value used by the resource
+ * manager, set the value to zero.
+ *
+ * If the timeout operation is performed successfully, the method returns
+ * true; otherwise false. If a resource manager does not
+ * support explicitly setting the transaction timeout value, this method
+ * returns false.
+ *
+ * @param seconds The transaction timeout value in seconds.
+ *
+ * @return true if the transaction timeout value is set successfully;
+ * otherwise false.
+ *
+ * @exception XAException An error has occurred. Possible exception values
+ * are XAER_RMERR, XAER_RMFAIL, or XAER_INVAL.
+ */
+ boolean setTransactionTimeout(int seconds) throws XAException;
+
+ /**
+ * Starts work on behalf of a transaction branch specified in
+ * xid.
+ *
+ * If TMJOIN is specified, the start applies to joining a transaction
+ * previously seen by the resource manager. If TMRESUME is specified,
+ * the start applies to resuming a suspended transaction specified in the
+ * parameter xid.
+ *
+ * If neither TMJOIN nor TMRESUME is specified and the transaction
+ * specified by xid has previously been seen by the resource
+ * manager, the resource manager throws the XAException exception with
+ * XAER_DUPID error code.
+ *
+ * @param xid A global transaction identifier to be associated
+ * with the resource.
+ *
+ * @param flags One of TMNOFLAGS, TMJOIN, or TMRESUME.
+ *
+ * @exception XAException An error has occurred. Possible exceptions
+ * are XA_RB*, XAER_RMERR, XAER_RMFAIL, XAER_DUPID, XAER_OUTSIDE,
+ * XAER_NOTA, XAER_INVAL, or XAER_PROTO.
+ */
+ void start(Xid xid, int flags) throws XAException;
+
+ /**
+ * Ends a recovery scan.
+ */
+ public final static int TMENDRSCAN = 0x00800000;
+
+ /**
+ * Disassociates the caller and marks the transaction branch
+ * rollback-only.
+ */
+ public final static int TMFAIL = 0x20000000;
+
+ /**
+ * Caller is joining existing transaction branch.
+ */
+ public final static int TMJOIN = 0x00200000;
+
+ /**
+ * Use TMNOFLAGS to indicate no flags value is selected.
+ */
+ public final static int TMNOFLAGS = 0x00000000;
+
+ /**
+ * Caller is using one-phase optimization.
+ */
+ public final static int TMONEPHASE = 0x40000000;
+
+ /**
+ * Caller is resuming association with a suspended
+ * transaction branch.
+ */
+ public final static int TMRESUME = 0x08000000;
+
+ /**
+ * Starts a recovery scan.
+ */
+ public final static int TMSTARTRSCAN = 0x01000000;
+
+ /**
+ * Disassociates caller from a transaction branch.
+ */
+ public final static int TMSUCCESS = 0x04000000;
+
+ /**
+ * Caller is suspending (not ending) its association with
+ * a transaction branch.
+ */
+ public final static int TMSUSPEND = 0x02000000;
+
+ /**
+ * The transaction branch has been read-only and has been committed.
+ */
+ public final static int XA_RDONLY = 0x00000003;
+
+ /**
+ * The transaction work has been prepared normally.
+ */
+ public final static int XA_OK = 0;
+}
diff --git a/corba/src/java.sql/share/classes/javax/transaction/xa/Xid.java b/jdk/src/java.sql/share/classes/javax/transaction/xa/Xid.java
similarity index 100%
rename from corba/src/java.sql/share/classes/javax/transaction/xa/Xid.java
rename to jdk/src/java.sql/share/classes/javax/transaction/xa/Xid.java
diff --git a/corba/src/java.sql/share/classes/javax/transaction/xa/package.html b/jdk/src/java.sql/share/classes/javax/transaction/xa/package.html
similarity index 100%
rename from corba/src/java.sql/share/classes/javax/transaction/xa/package.html
rename to jdk/src/java.sql/share/classes/javax/transaction/xa/package.html
diff --git a/corba/src/java.corba/share/classes/javax/transaction/InvalidTransactionException.java b/jdk/src/java.transaction/share/classes/javax/transaction/InvalidTransactionException.java
similarity index 89%
rename from corba/src/java.corba/share/classes/javax/transaction/InvalidTransactionException.java
rename to jdk/src/java.transaction/share/classes/javax/transaction/InvalidTransactionException.java
index 268f54cb609..5d0c699b887 100644
--- a/corba/src/java.corba/share/classes/javax/transaction/InvalidTransactionException.java
+++ b/jdk/src/java.transaction/share/classes/javax/transaction/InvalidTransactionException.java
@@ -36,15 +36,14 @@ package javax.transaction;
* context. For example, this exception could be raised if an error
* occured when trying to register a resource.
*/
-public class InvalidTransactionException extends java.rmi.RemoteException
-{
- public InvalidTransactionException()
- {
+@SuppressWarnings("serial") // serialVersionUID intentionally omitted
+public class InvalidTransactionException extends java.rmi.RemoteException {
+
+ public InvalidTransactionException() {
super();
}
- public InvalidTransactionException(String msg)
- {
+ public InvalidTransactionException(String msg) {
super(msg);
}
}
diff --git a/corba/src/java.corba/share/classes/javax/transaction/TransactionRequiredException.java b/jdk/src/java.transaction/share/classes/javax/transaction/TransactionRequiredException.java
similarity index 89%
rename from corba/src/java.corba/share/classes/javax/transaction/TransactionRequiredException.java
rename to jdk/src/java.transaction/share/classes/javax/transaction/TransactionRequiredException.java
index 3a5040f0d78..ee2ccbb8040 100644
--- a/corba/src/java.corba/share/classes/javax/transaction/TransactionRequiredException.java
+++ b/jdk/src/java.transaction/share/classes/javax/transaction/TransactionRequiredException.java
@@ -35,15 +35,14 @@ package javax.transaction;
* This exception indicates that a request carried a null transaction context,
* but the target object requires an activate transaction.
*/
-public class TransactionRequiredException extends java.rmi.RemoteException
-{
- public TransactionRequiredException()
- {
+@SuppressWarnings("serial") // serialVersionUID intentionally omitted
+public class TransactionRequiredException extends java.rmi.RemoteException {
+
+ public TransactionRequiredException() {
super();
}
- public TransactionRequiredException(String msg)
- {
+ public TransactionRequiredException(String msg) {
super(msg);
}
}
diff --git a/corba/src/java.corba/share/classes/javax/transaction/TransactionRolledbackException.java b/jdk/src/java.transaction/share/classes/javax/transaction/TransactionRolledbackException.java
similarity index 89%
rename from corba/src/java.corba/share/classes/javax/transaction/TransactionRolledbackException.java
rename to jdk/src/java.transaction/share/classes/javax/transaction/TransactionRolledbackException.java
index f75cdfb70c9..73ee335beee 100644
--- a/corba/src/java.corba/share/classes/javax/transaction/TransactionRolledbackException.java
+++ b/jdk/src/java.transaction/share/classes/javax/transaction/TransactionRolledbackException.java
@@ -38,15 +38,14 @@ package javax.transaction;
* because further computation on behalf of the transaction would be
* fruitless
*/
-public class TransactionRolledbackException extends java.rmi.RemoteException
-{
- public TransactionRolledbackException()
- {
+@SuppressWarnings("serial") // serialVersionUID intentionally omitted
+public class TransactionRolledbackException extends java.rmi.RemoteException {
+
+ public TransactionRolledbackException() {
super();
}
- public TransactionRolledbackException(String msg)
- {
+ public TransactionRolledbackException(String msg) {
super(msg);
}
}
diff --git a/corba/src/java.corba/share/classes/javax/transaction/package.html b/jdk/src/java.transaction/share/classes/javax/transaction/package.html
similarity index 100%
rename from corba/src/java.corba/share/classes/javax/transaction/package.html
rename to jdk/src/java.transaction/share/classes/javax/transaction/package.html
diff --git a/jdk/src/java.xml.crypto/share/classes/org/jcp/xml/dsig/internal/dom/DOMKeyValue.java b/jdk/src/java.xml.crypto/share/classes/org/jcp/xml/dsig/internal/dom/DOMKeyValue.java
index bb7a553beb3..08aee02be10 100644
--- a/jdk/src/java.xml.crypto/share/classes/org/jcp/xml/dsig/internal/dom/DOMKeyValue.java
+++ b/jdk/src/java.xml.crypto/share/classes/org/jcp/xml/dsig/internal/dom/DOMKeyValue.java
@@ -21,7 +21,7 @@
* under the License.
*/
/*
- * Copyright (c) 2005, 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2005, 2015, Oracle and/or its affiliates. All rights reserved.
*/
/*
* $Id: DOMKeyValue.java 1333415 2012-05-03 12:03:51Z coheigea $
@@ -33,20 +33,19 @@ import javax.xml.crypto.dom.DOMCryptoContext;
import javax.xml.crypto.dsig.*;
import javax.xml.crypto.dsig.keyinfo.KeyValue;
-import java.lang.reflect.InvocationTargetException;
-import java.lang.reflect.Method;
-import java.security.AccessController;
+import java.io.IOException;
+import java.math.BigInteger;
import java.security.KeyException;
import java.security.KeyFactory;
import java.security.NoSuchAlgorithmException;
-import java.security.PrivilegedActionException;
-import java.security.PrivilegedExceptionAction;
import java.security.PublicKey;
import java.security.interfaces.DSAParams;
import java.security.interfaces.DSAPublicKey;
import java.security.interfaces.ECPublicKey;
import java.security.interfaces.RSAPublicKey;
import java.security.spec.DSAPublicKeySpec;
+import java.security.spec.ECField;
+import java.security.spec.ECFieldFp;
import java.security.spec.ECParameterSpec;
import java.security.spec.ECPoint;
import java.security.spec.ECPublicKeySpec;
@@ -54,6 +53,7 @@ import java.security.spec.EllipticCurve;
import java.security.spec.InvalidKeySpecException;
import java.security.spec.KeySpec;
import java.security.spec.RSAPublicKeySpec;
+import java.util.Arrays;
import org.w3c.dom.Document;
import org.w3c.dom.Element;
import org.w3c.dom.Node;
@@ -325,55 +325,112 @@ public abstract class DOMKeyValue extends DOMStructure implements KeyValue {
private byte[] ecPublicKey;
private KeyFactory eckf;
private ECParameterSpec ecParams;
- private Method encodePoint, decodePoint, getCurveName,
- getECParameterSpec;
+
+ // The supported curve, secp256r1
+ private static final Curve SECP256R1;
+ static {
+ final String name, oid, sfield, a, b, x, y, n;
+ name = "secp256r1 [NIST P-256, X9.62 prime256v1]";
+ oid = "1.2.840.10045.3.1.7";
+ sfield =
+ "FFFFFFFF00000001000000000000000000000000FFFFFFFFFFFFFFFFFFFFFFFF";
+ a =
+ "FFFFFFFF00000001000000000000000000000000FFFFFFFFFFFFFFFFFFFFFFFC";
+ b =
+ "5AC635D8AA3A93E7B3EBBD55769886BC651D06B0CC53B0F63BCE3C3E27D2604B";
+ x =
+ "6B17D1F2E12C4247F8BCE6E563A440F277037D812DEB33A0F4A13945D898C296";
+ y =
+ "4FE342E2FE1A7F9B8EE7EB4A7C0F9E162BCE33576B315ECECBB6406837BF51F5";
+ n =
+ "FFFFFFFF00000000FFFFFFFFFFFFFFFFBCE6FAADA7179E84F3B9CAC2FC632551";
+ final int h = 1;
+
+ BigInteger p = bigInt(sfield);
+ ECField field = new ECFieldFp(p);
+ EllipticCurve curve = new EllipticCurve(field, bigInt(a),
+ bigInt(b));
+ ECPoint g = new ECPoint(bigInt(x), bigInt(y));
+ SECP256R1 = new Curve(name, oid, curve, g, bigInt(n), h);
+ }
EC(PublicKey key) throws KeyException {
super(key);
ECPublicKey ecKey = (ECPublicKey)key;
ECPoint ecPoint = ecKey.getW();
ecParams = ecKey.getParams();
- try {
- AccessController.doPrivileged(
- new PrivilegedExceptionAction() {
- public Void run() throws
- ClassNotFoundException, NoSuchMethodException
- {
- getMethods();
- return null;
- }
- }
- );
- } catch (PrivilegedActionException pae) {
- throw new KeyException("ECKeyValue not supported",
- pae.getException());
- }
- Object[] args = new Object[] { ecPoint, ecParams.getCurve() };
- try {
- ecPublicKey = (byte[])encodePoint.invoke(null, args);
- } catch (IllegalAccessException iae) {
- throw new KeyException(iae);
- } catch (InvocationTargetException ite) {
- throw new KeyException(ite);
- }
+ ecPublicKey = encodePoint(ecPoint, ecParams.getCurve());
}
EC(Element dmElem) throws MarshalException {
super(dmElem);
}
- void getMethods() throws ClassNotFoundException, NoSuchMethodException {
- Class> c = Class.forName("sun.security.util.ECParameters");
- Class>[] params = new Class>[] { ECPoint.class,
- EllipticCurve.class };
- encodePoint = c.getMethod("encodePoint", params);
- params = new Class>[] { ECParameterSpec.class };
- getCurveName = c.getMethod("getCurveName", params);
- params = new Class>[] { byte[].class, EllipticCurve.class };
- decodePoint = c.getMethod("decodePoint", params);
- c = Class.forName("sun.security.util.NamedCurve");
- params = new Class>[] { String.class };
- getECParameterSpec = c.getMethod("getECParameterSpec", params);
+ private static ECPoint decodePoint(byte[] data, EllipticCurve curve)
+ throws IOException {
+ if ((data.length == 0) || (data[0] != 4)) {
+ throw new IOException("Only uncompressed point format " +
+ "supported");
+ }
+ // Per ANSI X9.62, an encoded point is a 1 byte type followed by
+ // ceiling(log base 2 field-size / 8) bytes of x and the same of y.
+ int n = (data.length - 1) / 2;
+ if (n != ((curve.getField().getFieldSize() + 7) >> 3)) {
+ throw new IOException("Point does not match field size");
+ }
+
+ byte[] xb = Arrays.copyOfRange(data, 1, 1 + n);
+ byte[] yb = Arrays.copyOfRange(data, n + 1, n + 1 + n);
+
+ return new ECPoint(new BigInteger(1, xb), new BigInteger(1, yb));
+ }
+
+ private static byte[] encodePoint(ECPoint point, EllipticCurve curve) {
+ // get field size in bytes (rounding up)
+ int n = (curve.getField().getFieldSize() + 7) >> 3;
+ byte[] xb = trimZeroes(point.getAffineX().toByteArray());
+ byte[] yb = trimZeroes(point.getAffineY().toByteArray());
+ if ((xb.length > n) || (yb.length > n)) {
+ throw new RuntimeException("Point coordinates do not " +
+ "match field size");
+ }
+ byte[] b = new byte[1 + (n << 1)];
+ b[0] = 4; // uncompressed
+ System.arraycopy(xb, 0, b, n - xb.length + 1, xb.length);
+ System.arraycopy(yb, 0, b, b.length - yb.length, yb.length);
+ return b;
+ }
+
+ private static byte[] trimZeroes(byte[] b) {
+ int i = 0;
+ while ((i < b.length - 1) && (b[i] == 0)) {
+ i++;
+ }
+ if (i == 0) {
+ return b;
+ }
+ return Arrays.copyOfRange(b, i, b.length);
+ }
+
+ private static String getCurveOid(ECParameterSpec params) {
+ // Check that the params represent the secp256r1 curve
+ // If so, return the object identifier of the curve
+ int fieldSize = params.getCurve().getField().getFieldSize();
+ if (SECP256R1.getCurve().getField().getFieldSize() == fieldSize
+ && SECP256R1.getCurve().equals(params.getCurve())
+ && SECP256R1.getGenerator().equals(params.getGenerator())
+ && SECP256R1.getOrder().equals(params.getOrder())
+ && SECP256R1.getCofactor() == params.getCofactor()) {
+ return SECP256R1.getObjectId();
+ }
+ return null;
+ }
+
+ private static ECParameterSpec getECParameterSpec(String oid) {
+ if (oid.equals(SECP256R1.getObjectId())) {
+ return SECP256R1;
+ }
+ return null;
}
void marshalPublicKey(Node parent, Document doc, String dsPrefix,
@@ -391,14 +448,11 @@ public abstract class DOMKeyValue extends DOMStructure implements KeyValue {
XMLDSIG_11_XMLNS,
prefix);
Object[] args = new Object[] { ecParams };
- try {
- String oid = (String) getCurveName.invoke(null, args);
- DOMUtils.setAttribute(namedCurveElem, "URI", "urn:oid:" + oid);
- } catch (IllegalAccessException iae) {
- throw new MarshalException(iae);
- } catch (InvocationTargetException ite) {
- throw new MarshalException(ite);
+ String oid = getCurveOid(ecParams);
+ if (oid == null) {
+ throw new MarshalException("Invalid ECParameterSpec");
}
+ DOMUtils.setAttribute(namedCurveElem, "URI", "urn:oid:" + oid);
String qname = (prefix == null || prefix.length() == 0)
? "xmlns" : "xmlns:" + prefix;
namedCurveElem.setAttributeNS("http://www.w3.org/2000/xmlns/",
@@ -422,21 +476,6 @@ public abstract class DOMKeyValue extends DOMStructure implements KeyValue {
("unable to create EC KeyFactory: " + e.getMessage());
}
}
- try {
- AccessController.doPrivileged(
- new PrivilegedExceptionAction() {
- public Void run() throws
- ClassNotFoundException, NoSuchMethodException
- {
- getMethods();
- return null;
- }
- }
- );
- } catch (PrivilegedActionException pae) {
- throw new MarshalException("ECKeyValue not supported",
- pae.getException());
- }
ECParameterSpec ecParams = null;
Element curElem = DOMUtils.getFirstChildElement(kvtElem);
if (curElem.getLocalName().equals("ECParameters")) {
@@ -447,14 +486,9 @@ public abstract class DOMKeyValue extends DOMStructure implements KeyValue {
// strip off "urn:oid"
if (uri.startsWith("urn:oid:")) {
String oid = uri.substring(8);
- try {
- Object[] args = new Object[] { oid };
- ecParams = (ECParameterSpec)
- getECParameterSpec.invoke(null, args);
- } catch (IllegalAccessException iae) {
- throw new MarshalException(iae);
- } catch (InvocationTargetException ite) {
- throw new MarshalException(ite);
+ ecParams = getECParameterSpec(oid);
+ if (ecParams == null) {
+ throw new MarshalException("Invalid curve OID");
}
} else {
throw new MarshalException("Invalid NamedCurve URI");
@@ -464,24 +498,43 @@ public abstract class DOMKeyValue extends DOMStructure implements KeyValue {
}
curElem = DOMUtils.getNextSiblingElement(curElem, "PublicKey");
ECPoint ecPoint = null;
+
try {
- Object[] args = new Object[] { Base64.decode(curElem),
- ecParams.getCurve() };
- ecPoint = (ECPoint)decodePoint.invoke(null, args);
+ ecPoint = decodePoint(Base64.decode(curElem),
+ ecParams.getCurve());
} catch (Base64DecodingException bde) {
throw new MarshalException("Invalid EC PublicKey", bde);
- } catch (IllegalAccessException iae) {
- throw new MarshalException(iae);
- } catch (InvocationTargetException ite) {
- throw new MarshalException(ite);
+ } catch (IOException ioe) {
+ throw new MarshalException("Invalid EC Point", ioe);
}
-/*
- ecPoint = sun.security.util.ECParameters.decodePoint(
- Base64.decode(curElem), ecParams.getCurve());
-*/
+
ECPublicKeySpec spec = new ECPublicKeySpec(ecPoint, ecParams);
return generatePublicKey(eckf, spec);
}
+
+ static final class Curve extends ECParameterSpec {
+ private final String name;
+ private final String oid;
+
+ Curve(String name, String oid, EllipticCurve curve,
+ ECPoint g, BigInteger n, int h) {
+ super(curve, g, n, h);
+ this.name = name;
+ this.oid = oid;
+ }
+
+ private String getName() {
+ return name;
+ }
+
+ private String getObjectId() {
+ return oid;
+ }
+ }
+ }
+
+ private static BigInteger bigInt(String s) {
+ return new BigInteger(s, 16);
}
static final class Unknown extends DOMKeyValue {
diff --git a/jdk/test/ProblemList.txt b/jdk/test/ProblemList.txt
index 16bdf6d2114..982e1ab15f5 100644
--- a/jdk/test/ProblemList.txt
+++ b/jdk/test/ProblemList.txt
@@ -154,6 +154,9 @@ com/sun/management/OperatingSystemMXBean/GetProcessCpuLoad.java aix-all
com/sun/management/OperatingSystemMXBean/GetSystemCpuLoad.java aix-all
javax/management/MBeanServer/OldMBeanServerTest.java aix-all
+# 8042215
+javax/management/remote/mandatory/notif/NotifReconnectDeadlockTest.java generic-all
+
############################################################################
# jdk_math
diff --git a/jdk/test/com/sun/corba/5036554/TestCorbaBug.sh b/jdk/test/com/sun/corba/5036554/TestCorbaBug.sh
index 4f0ff231a99..e8b4365b68f 100644
--- a/jdk/test/com/sun/corba/5036554/TestCorbaBug.sh
+++ b/jdk/test/com/sun/corba/5036554/TestCorbaBug.sh
@@ -75,13 +75,13 @@ ${TESTJAVA}${FS}bin${FS}java -version
mkdir bug
cp ${TESTSRC}${FS}bug.idl .
-${TESTJAVA}${FS}bin${FS}idlj bug.idl
+${COMPILEJAVA}${FS}bin${FS}idlj bug.idl
cp ${TESTSRC}${FS}JavaBug.java bug
chmod -fR 777 bug
-${TESTJAVA}${FS}bin${FS}javac -d . bug${FS}*.java
+${COMPILEJAVA}${FS}bin${FS}javac -d . bug${FS}*.java
${TESTJAVA}${FS}bin${FS}java ${TESTVMOPTS} -cp . bug/JavaBug > test.out 2>&1
diff --git a/jdk/test/com/sun/corba/cachedSocket/7056731.sh b/jdk/test/com/sun/corba/cachedSocket/7056731.sh
index 3db0f73660f..2e5e3fb8547 100644
--- a/jdk/test/com/sun/corba/cachedSocket/7056731.sh
+++ b/jdk/test/com/sun/corba/cachedSocket/7056731.sh
@@ -55,8 +55,8 @@ PORT=1052
cp -r ${TESTSRC}${FS}*.java ${TESTSRC}${FS}Hello.idl .
echo "Testing...please wait"
-${TESTJAVA}${FS}bin${FS}idlj -fall Hello.idl
-${TESTJAVA}${FS}bin${FS}javac *.java HelloApp/*.java
+${COMPILEJAVA}${FS}bin${FS}idlj -fall Hello.idl
+${COMPILEJAVA}${FS}bin${FS}javac *.java HelloApp/*.java
echo "starting orbd"
${TESTJAVA}${FS}bin${FS}orbd -ORBInitialPort $PORT -ORBInitialHost localhost &
diff --git a/jdk/test/com/sun/crypto/provider/Cipher/DES/TestUtility.java b/jdk/test/com/sun/crypto/provider/Cipher/DES/TestUtility.java
index 61efd621bdb..ffa0a5bfcb3 100644
--- a/jdk/test/com/sun/crypto/provider/Cipher/DES/TestUtility.java
+++ b/jdk/test/com/sun/crypto/provider/Cipher/DES/TestUtility.java
@@ -27,39 +27,52 @@
public class TestUtility {
- private static final String digits = "0123456789abcdef";
+ private static final String DIGITS = "0123456789abcdef";
- public TestUtility() {
+ private TestUtility() {
}
public static String hexDump(byte[] bytes) {
- StringBuffer buf = new StringBuffer (bytes.length * 2);
- int i;
+ StringBuilder buf = new StringBuilder(bytes.length * 2);
+ int i;
- buf.append (" "); // four spaces
+ buf.append(" "); // four spaces
for (i = 0; i < bytes.length; i++) {
- buf.append (digits.charAt ((bytes[i] >> 4) & 0x0f));
- buf.append (digits.charAt (bytes[i] & 0x0f));
- if (((i + 1) % 32) == 0) {
- if ((i + 1) != bytes.length)
- buf.append ("\n "); // line after four words
- } else if (((i + 1) % 4) == 0)
- buf.append (' '); // space between words
+ buf.append(DIGITS.charAt(bytes[i] >> 4 & 0x0f));
+ buf.append(DIGITS.charAt(bytes[i] & 0x0f));
+ if ((i + 1) % 32 == 0) {
+ if (i + 1 != bytes.length) {
+ buf.append("\n "); // line after four words
+ }
+ } else if ((i + 1) % 4 == 0) {
+ buf.append(' '); // space between words
+ }
}
- return buf.toString ();
+ return buf.toString();
}
+ public static String hexDump(byte[] bytes, int index) {
+ StringBuilder buf = new StringBuilder(bytes.length * 2);
+ int i;
+
+ buf.append(" "); // four spaces
+ buf.append(DIGITS.charAt(bytes[index] >> 4 & 0x0f));
+ buf.append(DIGITS.charAt(bytes[index] & 0x0f));
+ return buf.toString();
+ }
public static boolean equalsBlock(byte[] b1, byte[] b2) {
- if (b1.length != b2.length)
+ if (b1.length != b2.length) {
return false;
+ }
- for (int i=0; i 0)
throw new RuntimeException(failed + " test(s) failed - see log for details");
diff --git a/jdk/test/java/math/BigInteger/BigIntegerTest.java b/jdk/test/java/math/BigInteger/BigIntegerTest.java
index c8d63261e70..4de80fad4fd 100644
--- a/jdk/test/java/math/BigInteger/BigIntegerTest.java
+++ b/jdk/test/java/math/BigInteger/BigIntegerTest.java
@@ -23,7 +23,7 @@
/*
* @test
- * @bug 4181191 4161971 4227146 4194389 4823171 4624738 4812225 4837946
+ * @bug 4181191 4161971 4227146 4194389 4823171 4624738 4812225 4837946 4026465
* @summary tests methods in BigInteger
* @run main/timeout=400 BigIntegerTest
* @author madbot
@@ -89,6 +89,120 @@ public class BigIntegerTest {
static Random rnd = new Random();
static boolean failure = false;
+ public static void constructor() {
+ int failCount = 0;
+
+ // --- guard condition tests for array indexing ---
+
+ int arrayLength = 23;
+ int halfLength = arrayLength/2;
+ byte[] array = new byte[arrayLength];
+ rnd.nextBytes(array);
+
+ int[][] offLen = new int[][] { // offset, length, num exceptions
+ {-1, arrayLength, 1}, // negative offset
+ {0, arrayLength, 0}, // OK
+ {1, arrayLength, 1}, // length overflow
+ {arrayLength - 1, 1, 0}, // OK
+ {arrayLength, 1, 1}, // offset overflow
+ {0, -1, 1}, // negative length
+ {halfLength, arrayLength - halfLength + 1, 1} // length overflow
+ };
+
+ // two's complement
+ for (int[] ol : offLen) {
+ int numExceptions = 0;
+ try {
+ BigInteger bi = new BigInteger(array, ol[0], ol[1]);
+ } catch (IndexOutOfBoundsException e) {
+ numExceptions++;
+ }
+ if (numExceptions != ol[2]) {
+ System.err.println("IndexOutOfBoundsException did not occur for "
+ + " two's complement constructor with parameters offset "
+ + ol[0] + " and length " + ol[1]);
+ failCount++;
+ }
+ }
+
+ // sign-magnitude
+ for (int[] ol : offLen) {
+ int numExceptions = 0;
+ try {
+ BigInteger bi = new BigInteger(1, array, ol[0], ol[1]);
+ } catch (IndexOutOfBoundsException e) {
+ numExceptions++;
+ }
+ if (numExceptions != ol[2]) {
+ System.err.println("IndexOutOfBoundsException did not occur for "
+ + " sign-magnitude constructor with parameters offset "
+ + ol[0] + " and length " + ol[1]);
+ failCount++;
+ }
+ }
+
+ // --- tests for creation of zero-valued BigIntegers ---
+
+ byte[] magZeroLength = new byte[0];
+ for (int signum = -1; signum <= 1; signum++) {
+ BigInteger bi = new BigInteger(signum, magZeroLength);
+ if (bi.compareTo(BigInteger.ZERO) != 0) {
+ System.err.println("A: Zero length BigInteger != 0 for signum " + signum);
+ failCount++;
+ }
+ }
+
+ for (int signum = -1; signum <= 1; signum++) {
+ BigInteger bi = new BigInteger(signum, magZeroLength, 0, 0);
+ if (bi.compareTo(BigInteger.ZERO) != 0) {
+ System.err.println("B: Zero length BigInteger != 0 for signum " + signum);
+ failCount++;
+ }
+ }
+
+ byte[] magNonZeroLength = new byte[42];
+ rnd.nextBytes(magNonZeroLength);
+ for (int signum = -1; signum <= 1; signum++) {
+ BigInteger bi = new BigInteger(signum, magNonZeroLength, 0, 0);
+ if (bi.compareTo(BigInteger.ZERO) != 0) {
+ System.err.println("C: Zero length BigInteger != 0 for signum " + signum);
+ failCount++;
+ }
+ }
+
+ // --- tests for accurate creation of non-zero BigIntegers ---
+
+ for (int i = 0; i < SIZE; i++) {
+ // create reference value via a different code path from those tested
+ BigInteger reference = new BigInteger(2 + rnd.nextInt(336), 4, rnd);
+
+ byte[] refArray = reference.toByteArray();
+ int refLen = refArray.length;
+ int factor = rnd.nextInt(5);
+ int objLen = refArray.length + factor*rnd.nextInt(refArray.length) + 1;
+ int offset = rnd.nextInt(objLen - refLen);
+ byte[] objArray = new byte[objLen];
+ System.arraycopy(refArray, 0, objArray, offset, refLen);
+
+ BigInteger twosComp = new BigInteger(objArray, offset, refLen);
+ if (twosComp.compareTo(reference) != 0) {
+ System.err.println("Two's-complement BigInteger not equal for offset " +
+ offset + " and length " + refLen);
+ failCount++;
+ }
+
+ boolean isNegative = rnd.nextBoolean();
+ BigInteger signMag = new BigInteger(isNegative ? -1 : 1, objArray, offset, refLen);
+ if (signMag.compareTo(isNegative ? reference.negate() : reference) != 0) {
+ System.err.println("Sign-magnitude BigInteger not equal for offset " +
+ offset + " and length " + refLen);
+ failCount++;
+ }
+ }
+
+ report("Constructor", failCount);
+ }
+
public static void pow(int order) {
int failCount1 = 0;
@@ -961,6 +1075,8 @@ public class BigIntegerTest {
if (args.length >3)
order4 = (int)((Integer.parseInt(args[3]))* 3.333);
+ constructor();
+
prime();
nextProbablePrime();
diff --git a/jdk/test/java/nio/channels/FileChannel/TransferToChannel.java b/jdk/test/java/nio/channels/FileChannel/TransferToChannel.java
index 2aa1b4bd2cc..44e96337b27 100644
--- a/jdk/test/java/nio/channels/FileChannel/TransferToChannel.java
+++ b/jdk/test/java/nio/channels/FileChannel/TransferToChannel.java
@@ -25,7 +25,7 @@
* @bug 4652496
* @summary Test transferTo with different target channels
* @run main TransferToChannel
- * @run main/othervm -Djdk.net.enableFastFileTransfer TransferToChannel
+ * @run main/othervm -Djdk.nio.enableFastFileTransfer TransferToChannel
*/
import java.nio.channels.FileChannel;
diff --git a/jdk/test/java/rmi/activation/Activatable/checkActivateRef/group.security.policy b/jdk/test/java/rmi/activation/Activatable/checkActivateRef/group.security.policy
index 2130c464a88..02604b7eeb3 100644
--- a/jdk/test/java/rmi/activation/Activatable/checkActivateRef/group.security.policy
+++ b/jdk/test/java/rmi/activation/Activatable/checkActivateRef/group.security.policy
@@ -4,8 +4,8 @@
grant {
permission java.io.FilePermission "..${/}..${/}test.props", "read";
-
- // test needs to communicate with the activation system
permission java.net.SocketPermission "*:1024-", "connect,accept,listen";
+ permission java.util.PropertyPermission "test.*", "read";
+
permission java.lang.RuntimePermission "getClassLoader";
};
diff --git a/jdk/test/java/rmi/activation/Activatable/checkAnnotations/group.security.policy b/jdk/test/java/rmi/activation/Activatable/checkAnnotations/group.security.policy
index a6115faf6df..276768a15d1 100644
--- a/jdk/test/java/rmi/activation/Activatable/checkAnnotations/group.security.policy
+++ b/jdk/test/java/rmi/activation/Activatable/checkAnnotations/group.security.policy
@@ -1,10 +1,9 @@
/*
- * security policy used by activation groups.
+ * security policy used by activation groups
*/
grant {
permission java.io.FilePermission "..${/}..${/}test.props", "read";
-
- // test needs to communicate with the activation system
permission java.net.SocketPermission "*:1024-", "connect,accept,listen";
+ permission java.util.PropertyPermission "test.*", "read";
};
diff --git a/jdk/test/java/rmi/activation/Activatable/checkRegisterInLog/group.security.policy b/jdk/test/java/rmi/activation/Activatable/checkRegisterInLog/group.security.policy
index 6c8dc8a0d06..276768a15d1 100644
--- a/jdk/test/java/rmi/activation/Activatable/checkRegisterInLog/group.security.policy
+++ b/jdk/test/java/rmi/activation/Activatable/checkRegisterInLog/group.security.policy
@@ -4,10 +4,6 @@
grant {
permission java.io.FilePermission "..${/}..${/}test.props", "read";
-
- // allow remote objects to be exported on arbitrary ports.
- permission java.net.SocketPermission "*:1024-", "connect,accept";
-
- // allow exporting object with non-public remote interface
- permission java.rmi.RMIPermission "exportRemoteInterface.ActivateMe";
+ permission java.net.SocketPermission "*:1024-", "connect,accept,listen";
+ permission java.util.PropertyPermission "test.*", "read";
};
diff --git a/jdk/test/java/rmi/activation/Activatable/createPrivateActivable/group.security.policy b/jdk/test/java/rmi/activation/Activatable/createPrivateActivable/group.security.policy
index e7a403e569a..276768a15d1 100644
--- a/jdk/test/java/rmi/activation/Activatable/createPrivateActivable/group.security.policy
+++ b/jdk/test/java/rmi/activation/Activatable/createPrivateActivable/group.security.policy
@@ -1,13 +1,9 @@
/*
- * security policy used activation groups
+ * security policy used by activation groups
*/
grant {
permission java.io.FilePermission "..${/}..${/}test.props", "read";
-
- // test needs to communicate with the activation system
permission java.net.SocketPermission "*:1024-", "connect,accept,listen";
-
- // allow exporting object with non-public remote interface
- permission java.rmi.RMIPermission "exportRemoteInterface.ActivateMe";
+ permission java.util.PropertyPermission "test.*", "read";
};
diff --git a/jdk/test/java/rmi/activation/Activatable/downloadParameterClass/group.security.policy b/jdk/test/java/rmi/activation/Activatable/downloadParameterClass/group.security.policy
index 38258b4b45c..41abd5dd468 100644
--- a/jdk/test/java/rmi/activation/Activatable/downloadParameterClass/group.security.policy
+++ b/jdk/test/java/rmi/activation/Activatable/downloadParameterClass/group.security.policy
@@ -1,14 +1,15 @@
/*
- * security policy used exec'ed activation groups
+ * security policy used by activation groups
*/
grant {
+ permission java.io.FilePermission "..${/}..${/}test.props", "read";
+ permission java.net.SocketPermission "*:1024-", "connect,accept,listen";
+ permission java.util.PropertyPermission "test.*", "read";
+
// need to load custom security manager and activation group from a new codebase
permission java.io.FilePermission ".${/}codebase1", "read,write,delete";
permission java.io.FilePermission ".${/}codebase1${/}-", "read,write";
permission java.io.FilePermission ".${/}codebase2", "read,write,delete";
permission java.io.FilePermission ".${/}codebase2${/}-", "read,write,delete";
-
- // allow remote objects to be exported on arbitrary ports.
- permission java.net.SocketPermission "*:1024-", "connect,accept,listen";
};
diff --git a/jdk/test/java/rmi/activation/Activatable/elucidateNoSuchMethod/group.security.policy b/jdk/test/java/rmi/activation/Activatable/elucidateNoSuchMethod/group.security.policy
index 3cc19105e0f..bf7d8c414b9 100644
--- a/jdk/test/java/rmi/activation/Activatable/elucidateNoSuchMethod/group.security.policy
+++ b/jdk/test/java/rmi/activation/Activatable/elucidateNoSuchMethod/group.security.policy
@@ -1,12 +1,13 @@
/*
- * security policy used activation groups
+ * security policy used by activation groups
*/
grant {
+ permission java.io.FilePermission "..${/}..${/}test.props", "read";
+ permission java.net.SocketPermission "*:1024-", "connect,accept,listen";
+ permission java.util.PropertyPermission "test.*", "read";
+
// Needed because of bug#: 4182104
permission java.lang.RuntimePermission "modifyThreadGroup";
permission java.lang.RuntimePermission "modifyThread";
-
- // allow remote objects to be exported on arbitrary ports.
- permission java.net.SocketPermission "*:1024-", "connect,accept,listen";
};
diff --git a/jdk/test/java/rmi/activation/Activatable/extLoadedImpl/group.security.policy b/jdk/test/java/rmi/activation/Activatable/extLoadedImpl/group.security.policy
index 09e121a74f9..276768a15d1 100644
--- a/jdk/test/java/rmi/activation/Activatable/extLoadedImpl/group.security.policy
+++ b/jdk/test/java/rmi/activation/Activatable/extLoadedImpl/group.security.policy
@@ -1,8 +1,9 @@
/*
- * security policy used exec'ed activation groups
+ * security policy used by activation groups
*/
grant {
- // allow remote objects to be exported on arbitrary ports.
+ permission java.io.FilePermission "..${/}..${/}test.props", "read";
permission java.net.SocketPermission "*:1024-", "connect,accept,listen";
+ permission java.util.PropertyPermission "test.*", "read";
};
diff --git a/jdk/test/java/rmi/activation/Activatable/forceLogSnapshot/group.security.policy b/jdk/test/java/rmi/activation/Activatable/forceLogSnapshot/group.security.policy
index f5637355114..276768a15d1 100644
--- a/jdk/test/java/rmi/activation/Activatable/forceLogSnapshot/group.security.policy
+++ b/jdk/test/java/rmi/activation/Activatable/forceLogSnapshot/group.security.policy
@@ -3,9 +3,7 @@
*/
grant {
- // allow remote objects to be exported on arbitrary ports.
+ permission java.io.FilePermission "..${/}..${/}test.props", "read";
permission java.net.SocketPermission "*:1024-", "connect,accept,listen";
-
- // allow exporting object with non-public remote interface
- permission java.rmi.RMIPermission "exportRemoteInterface.ActivateMe";
+ permission java.util.PropertyPermission "test.*", "read";
};
diff --git a/jdk/test/java/rmi/activation/Activatable/inactiveGroup/group.security.policy b/jdk/test/java/rmi/activation/Activatable/inactiveGroup/group.security.policy
index f1d7ad2f1a0..276768a15d1 100644
--- a/jdk/test/java/rmi/activation/Activatable/inactiveGroup/group.security.policy
+++ b/jdk/test/java/rmi/activation/Activatable/inactiveGroup/group.security.policy
@@ -4,10 +4,6 @@
grant {
permission java.io.FilePermission "..${/}..${/}test.props", "read";
-
- // allow remote objects to be exported on arbitrary ports.
permission java.net.SocketPermission "*:1024-", "connect,accept,listen";
-
- // allow exporting object with non-public remote interface
- permission java.rmi.RMIPermission "exportRemoteInterface.ActivateMe";
+ permission java.util.PropertyPermission "test.*", "read";
};
diff --git a/jdk/test/java/rmi/activation/Activatable/nestedActivate/group.security.policy b/jdk/test/java/rmi/activation/Activatable/nestedActivate/group.security.policy
index cbb1d41bfe4..276768a15d1 100644
--- a/jdk/test/java/rmi/activation/Activatable/nestedActivate/group.security.policy
+++ b/jdk/test/java/rmi/activation/Activatable/nestedActivate/group.security.policy
@@ -1,13 +1,9 @@
/*
- * security policy used by test activation groups
+ * security policy used by activation groups
*/
grant {
permission java.io.FilePermission "..${/}..${/}test.props", "read";
-
- // allow remote objects to be exported on arbitrary ports.
permission java.net.SocketPermission "*:1024-", "connect,accept,listen";
-
- // allow exporting of non-public remote interface
- permission java.rmi.RMIPermission "exportRemoteInterface.ActivateMe";
+ permission java.util.PropertyPermission "test.*", "read";
};
diff --git a/jdk/test/java/rmi/activation/Activatable/nonExistentActivatable/group.security.policy b/jdk/test/java/rmi/activation/Activatable/nonExistentActivatable/group.security.policy
index a830e95dfe0..276768a15d1 100644
--- a/jdk/test/java/rmi/activation/Activatable/nonExistentActivatable/group.security.policy
+++ b/jdk/test/java/rmi/activation/Activatable/nonExistentActivatable/group.security.policy
@@ -4,7 +4,6 @@
grant {
permission java.io.FilePermission "..${/}..${/}test.props", "read";
-
- // allow remote objects to be exported on arbitrary ports.
permission java.net.SocketPermission "*:1024-", "connect,accept,listen";
+ permission java.util.PropertyPermission "test.*", "read";
};
diff --git a/jdk/test/java/rmi/activation/Activatable/restartCrashedService/group.security.policy b/jdk/test/java/rmi/activation/Activatable/restartCrashedService/group.security.policy
index ce2fdaf45df..276768a15d1 100644
--- a/jdk/test/java/rmi/activation/Activatable/restartCrashedService/group.security.policy
+++ b/jdk/test/java/rmi/activation/Activatable/restartCrashedService/group.security.policy
@@ -1,8 +1,9 @@
/*
- * security policy used by test activation groups
+ * security policy used by activation groups
*/
grant {
- // test needs to communicate with the activation system
+ permission java.io.FilePermission "..${/}..${/}test.props", "read";
permission java.net.SocketPermission "*:1024-", "connect,accept,listen";
+ permission java.util.PropertyPermission "test.*", "read";
};
diff --git a/jdk/test/java/rmi/activation/Activatable/restartLatecomer/group.security.policy b/jdk/test/java/rmi/activation/Activatable/restartLatecomer/group.security.policy
index 67f3c249496..276768a15d1 100644
--- a/jdk/test/java/rmi/activation/Activatable/restartLatecomer/group.security.policy
+++ b/jdk/test/java/rmi/activation/Activatable/restartLatecomer/group.security.policy
@@ -3,6 +3,7 @@
*/
grant {
- // allow remote objects to be exported on arbitrary ports.
+ permission java.io.FilePermission "..${/}..${/}test.props", "read";
permission java.net.SocketPermission "*:1024-", "connect,accept,listen";
+ permission java.util.PropertyPermission "test.*", "read";
};
diff --git a/jdk/test/java/rmi/activation/Activatable/restartService/group.security.policy b/jdk/test/java/rmi/activation/Activatable/restartService/group.security.policy
index 67f3c249496..276768a15d1 100644
--- a/jdk/test/java/rmi/activation/Activatable/restartService/group.security.policy
+++ b/jdk/test/java/rmi/activation/Activatable/restartService/group.security.policy
@@ -3,6 +3,7 @@
*/
grant {
- // allow remote objects to be exported on arbitrary ports.
+ permission java.io.FilePermission "..${/}..${/}test.props", "read";
permission java.net.SocketPermission "*:1024-", "connect,accept,listen";
+ permission java.util.PropertyPermission "test.*", "read";
};
diff --git a/jdk/test/java/rmi/activation/Activatable/shutdownGracefully/group.security.policy b/jdk/test/java/rmi/activation/Activatable/shutdownGracefully/group.security.policy
index e1a3f30b029..276768a15d1 100644
--- a/jdk/test/java/rmi/activation/Activatable/shutdownGracefully/group.security.policy
+++ b/jdk/test/java/rmi/activation/Activatable/shutdownGracefully/group.security.policy
@@ -1,10 +1,9 @@
/*
- * security policy used activation groups
+ * security policy used by activation groups
*/
grant {
permission java.io.FilePermission "..${/}..${/}test.props", "read";
-
- // test needs to communicate with the activation system
permission java.net.SocketPermission "*:1024-", "connect,accept,listen";
+ permission java.util.PropertyPermission "test.*", "read";
};
diff --git a/jdk/test/java/rmi/activation/Activatable/unregisterInactive/group.security.policy b/jdk/test/java/rmi/activation/Activatable/unregisterInactive/group.security.policy
index a830e95dfe0..276768a15d1 100644
--- a/jdk/test/java/rmi/activation/Activatable/unregisterInactive/group.security.policy
+++ b/jdk/test/java/rmi/activation/Activatable/unregisterInactive/group.security.policy
@@ -4,7 +4,6 @@
grant {
permission java.io.FilePermission "..${/}..${/}test.props", "read";
-
- // allow remote objects to be exported on arbitrary ports.
permission java.net.SocketPermission "*:1024-", "connect,accept,listen";
+ permission java.util.PropertyPermission "test.*", "read";
};
diff --git a/jdk/test/java/rmi/activation/ActivateFailedException/activateFails/group.security.policy b/jdk/test/java/rmi/activation/ActivateFailedException/activateFails/group.security.policy
index 543fc1d345e..276768a15d1 100644
--- a/jdk/test/java/rmi/activation/ActivateFailedException/activateFails/group.security.policy
+++ b/jdk/test/java/rmi/activation/ActivateFailedException/activateFails/group.security.policy
@@ -1,8 +1,9 @@
/*
- * security policy used activation groups
+ * security policy used by activation groups
*/
grant {
- // test needs to communicate with the activation system
+ permission java.io.FilePermission "..${/}..${/}test.props", "read";
permission java.net.SocketPermission "*:1024-", "connect,accept,listen";
+ permission java.util.PropertyPermission "test.*", "read";
};
diff --git a/jdk/test/java/rmi/activation/ActivationGroup/downloadActivationGroup/group.security.policy b/jdk/test/java/rmi/activation/ActivationGroup/downloadActivationGroup/group.security.policy
index d4b2d5ded47..b290738202a 100644
--- a/jdk/test/java/rmi/activation/ActivationGroup/downloadActivationGroup/group.security.policy
+++ b/jdk/test/java/rmi/activation/ActivationGroup/downloadActivationGroup/group.security.policy
@@ -1,10 +1,11 @@
/*
- * security policy used by downloaded activation group
+ * security policy used by activation groups
*/
grant {
permission java.io.FilePermission "..${/}..${/}test.props", "read";
+ permission java.net.SocketPermission "*:1024-", "connect,accept,listen";
+ permission java.util.PropertyPermission "test.*", "read";
permission java.lang.RuntimePermission "accessClassInPackage.sun.rmi.server";
- permission java.net.SocketPermission "*:1024-", "connect,accept,listen";
};
diff --git a/jdk/test/java/rmi/activation/ActivationSystem/modifyDescriptor/group.security.policy b/jdk/test/java/rmi/activation/ActivationSystem/modifyDescriptor/group.security.policy
index 9f404883c86..276768a15d1 100644
--- a/jdk/test/java/rmi/activation/ActivationSystem/modifyDescriptor/group.security.policy
+++ b/jdk/test/java/rmi/activation/ActivationSystem/modifyDescriptor/group.security.policy
@@ -4,10 +4,6 @@
grant {
permission java.io.FilePermission "..${/}..${/}test.props", "read";
-
- // accomodate property used by this test.
- permission java.util.PropertyPermission "test.message", "read";
-
- // test needs to communicate with the activation system
permission java.net.SocketPermission "*:1024-", "connect,accept,listen";
+ permission java.util.PropertyPermission "test.*", "read";
};
diff --git a/jdk/test/java/rmi/activation/ActivationSystem/stubClassesPermitted/group.security.policy b/jdk/test/java/rmi/activation/ActivationSystem/stubClassesPermitted/group.security.policy
index 7876a38e1fb..c99d2e288a2 100644
--- a/jdk/test/java/rmi/activation/ActivationSystem/stubClassesPermitted/group.security.policy
+++ b/jdk/test/java/rmi/activation/ActivationSystem/stubClassesPermitted/group.security.policy
@@ -1,13 +1,11 @@
/*
- * security policy used by activation groups.
+ * security policy used by activation groups
*/
grant {
permission java.io.FilePermission "..${/}..${/}test.props", "read";
-
- // give the group permission to create a class that the main test process can not create
- permission java.lang.RuntimePermission "accessClassInPackage.sun.security.provider";
-
- // test needs to communicate with the activation system
permission java.net.SocketPermission "*:1024-", "connect,accept,listen";
+ permission java.util.PropertyPermission "test.*", "read";
+
+ permission java.lang.RuntimePermission "accessClassInPackage.sun.security.provider";
};
diff --git a/jdk/test/java/rmi/activation/ActivationSystem/unregisterGroup/group.security.policy b/jdk/test/java/rmi/activation/ActivationSystem/unregisterGroup/group.security.policy
index e596baae478..276768a15d1 100644
--- a/jdk/test/java/rmi/activation/ActivationSystem/unregisterGroup/group.security.policy
+++ b/jdk/test/java/rmi/activation/ActivationSystem/unregisterGroup/group.security.policy
@@ -4,8 +4,6 @@
grant {
permission java.io.FilePermission "..${/}..${/}test.props", "read";
-
- // test needs to communicate with the activation system
permission java.net.SocketPermission "*:1024-", "connect,accept,listen";
- permission java.util.PropertyPermission "unregisterGroup.port", "read";
+ permission java.util.PropertyPermission "test.*", "read";
};
diff --git a/jdk/test/java/rmi/activation/CommandEnvironment/group.security.policy b/jdk/test/java/rmi/activation/CommandEnvironment/group.security.policy
index 479f351a1e5..276768a15d1 100644
--- a/jdk/test/java/rmi/activation/CommandEnvironment/group.security.policy
+++ b/jdk/test/java/rmi/activation/CommandEnvironment/group.security.policy
@@ -1,8 +1,9 @@
/*
- * security policy used by activation groups.
+ * security policy used by activation groups
*/
grant {
- // test needs to communicate with the activation system
+ permission java.io.FilePermission "..${/}..${/}test.props", "read";
permission java.net.SocketPermission "*:1024-", "connect,accept,listen";
+ permission java.util.PropertyPermission "test.*", "read";
};
diff --git a/jdk/test/java/rmi/server/RMISocketFactory/useSocketFactory/activatable/group.security.policy b/jdk/test/java/rmi/server/RMISocketFactory/useSocketFactory/activatable/group.security.policy
index 810baf41d4b..276768a15d1 100644
--- a/jdk/test/java/rmi/server/RMISocketFactory/useSocketFactory/activatable/group.security.policy
+++ b/jdk/test/java/rmi/server/RMISocketFactory/useSocketFactory/activatable/group.security.policy
@@ -1,11 +1,9 @@
/*
- * security policy used by the rmid process exec'ed by a running
- * instance of the test.
+ * security policy used by activation groups
*/
grant {
permission java.io.FilePermission "..${/}..${/}test.props", "read";
-
- // test needs to communicate with the activation system
permission java.net.SocketPermission "*:1024-", "connect,accept,listen";
+ permission java.util.PropertyPermission "test.*", "read";
};
diff --git a/jdk/test/java/rmi/server/RemoteServer/setLogPermission/SetLogPermission.java b/jdk/test/java/rmi/server/RemoteServer/setLogPermission/SetLogPermission.java
index 2353dab0b4b..fd6c6ad5b62 100644
--- a/jdk/test/java/rmi/server/RemoteServer/setLogPermission/SetLogPermission.java
+++ b/jdk/test/java/rmi/server/RemoteServer/setLogPermission/SetLogPermission.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2002, 2008, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2002, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -27,7 +27,7 @@
* The RemoteServer.setLog method requires
* java.util.log.LoggingPermission("control").
* @author Ann Wollrath
- * @run main/othervm/policy=java.policy SetLogPermission
+ * @run main/othervm/policy=security.policy SetLogPermission
*/
import java.rmi.server.RemoteServer;
diff --git a/jdk/test/java/rmi/server/RemoteServer/setLogPermission/java.policy b/jdk/test/java/rmi/server/RemoteServer/setLogPermission/security.policy
similarity index 100%
rename from jdk/test/java/rmi/server/RemoteServer/setLogPermission/java.policy
rename to jdk/test/java/rmi/server/RemoteServer/setLogPermission/security.policy
diff --git a/jdk/test/java/rmi/testlibrary/ActivationLibrary.java b/jdk/test/java/rmi/testlibrary/ActivationLibrary.java
index 6a7a5b753d8..75531a97017 100644
--- a/jdk/test/java/rmi/testlibrary/ActivationLibrary.java
+++ b/jdk/test/java/rmi/testlibrary/ActivationLibrary.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1998, 2012, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1998, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -40,20 +40,6 @@ import java.rmi.registry.LocateRegistry;
* objects.
*/
public class ActivationLibrary {
- /** time safeDestroy should wait before failing on shutdown rmid */
- private static final int SAFE_WAIT_TIME;
- static {
- int slopFactor = 1;
- try {
- slopFactor = Integer.valueOf(
- TestLibrary.getExtraProperty("jcov.sleep.multiplier","1"));
- } catch (NumberFormatException ignore) {}
- SAFE_WAIT_TIME = 60000 * slopFactor;
- }
-
- private static final String SYSTEM_NAME =
- ActivationSystem.class.getName();
-
private static void mesg(Object mesg) {
System.err.println("ACTIVATION_LIBRARY: " + mesg.toString());
}
@@ -63,20 +49,19 @@ public class ActivationLibrary {
*/
public static void deactivate(Remote remote,
ActivationID id) {
- // We do as much as 50 deactivation trials, each separated by
- // at least 100 milliseconds sleep time (max sleep time of 5 secs).
- final long deactivateSleepTime = 100;
- long stopTime = System.currentTimeMillis() + deactivateSleepTime * 50;
- while (System.currentTimeMillis() < stopTime) {
+ final long POLLTIME_MS = 100L;
+ final long DEACTIVATE_TIME_MS = 30_000L;
+
+ long startTime = System.currentTimeMillis();
+ long deadline = TestLibrary.computeDeadline(startTime, DEACTIVATE_TIME_MS);
+
+ while (System.currentTimeMillis() < deadline) {
try {
if (Activatable.inactive(id) == true) {
mesg("inactive successful");
return;
} else {
- mesg("inactive trial failed. Sleeping " +
- deactivateSleepTime +
- " milliseconds before next trial");
- Thread.sleep(deactivateSleepTime);
+ Thread.sleep(POLLTIME_MS);
}
} catch (InterruptedException e) {
Thread.currentThread().interrupt();
@@ -95,7 +80,8 @@ public class ActivationLibrary {
}
}
- mesg("unable to inactivate after several attempts");
+ mesg("unable to inactivate after " +
+ (System.currentTimeMillis() - startTime) + "ms.");
mesg("unexporting object forcibly instead");
try {
diff --git a/jdk/test/java/rmi/testlibrary/JavaVM.java b/jdk/test/java/rmi/testlibrary/JavaVM.java
index b304cd25213..b0c4afd1113 100644
--- a/jdk/test/java/rmi/testlibrary/JavaVM.java
+++ b/jdk/test/java/rmi/testlibrary/JavaVM.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1998, 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1998, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -194,7 +194,7 @@ public class JavaVM {
throws InterruptedException, TimeoutException {
if (vm == null)
throw new IllegalStateException("can't wait for JavaVM that isn't running");
- long deadline = computeDeadline(System.currentTimeMillis(), timeout);
+ long deadline = TestLibrary.computeDeadline(System.currentTimeMillis(), timeout);
while (true) {
try {
@@ -218,21 +218,4 @@ public class JavaVM {
start();
return waitFor();
}
-
- /**
- * Computes a deadline from a timestamp and a timeout value.
- * Maximum timeout (before multipliers are applied) is one hour.
- */
- public static long computeDeadline(long timestamp, long timeout) {
- final long MAX_TIMEOUT_MS = 3_600_000L;
-
- if (timeout < 0L || timeout > MAX_TIMEOUT_MS) {
- throw new IllegalArgumentException("timeout " + timeout + "ms out of range");
- }
-
- // TODO apply test.timeout.factor (and possibly jcov.sleep.multiplier)
- // here instead of upstream
-
- return timestamp + timeout;
- }
}
diff --git a/jdk/test/java/rmi/testlibrary/RMID.java b/jdk/test/java/rmi/testlibrary/RMID.java
index 48fb49aa4d2..1ae6cf64bab 100644
--- a/jdk/test/java/rmi/testlibrary/RMID.java
+++ b/jdk/test/java/rmi/testlibrary/RMID.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1998, 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1998, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -249,15 +249,15 @@ public class RMID extends JavaVM {
mesg("Starting rmid on port " + port + ".");
super.start();
- int slopFactor = 1;
- try {
- slopFactor = Integer.valueOf(
- TestLibrary.getExtraProperty("jcov.sleep.multiplier","1"));
- } catch (NumberFormatException ignore) {}
- waitTime = waitTime * slopFactor;
+ // int slopFactor = 1;
+ // try {
+ // slopFactor = Integer.valueOf(
+ // TestLibrary.getExtraProperty("jcov.sleep.multiplier","1"));
+ // } catch (NumberFormatException ignore) {}
+ // waitTime = waitTime * slopFactor;
long startTime = System.currentTimeMillis();
- long deadline = computeDeadline(startTime, waitTime);
+ long deadline = TestLibrary.computeDeadline(startTime, waitTime);
while (true) {
try {
diff --git a/jdk/test/java/rmi/testlibrary/TestLibrary.java b/jdk/test/java/rmi/testlibrary/TestLibrary.java
index 7165c678e6d..a8077ed8207 100644
--- a/jdk/test/java/rmi/testlibrary/TestLibrary.java
+++ b/jdk/test/java/rmi/testlibrary/TestLibrary.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1998, 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1998, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -135,7 +135,8 @@ public class TestLibrary {
*/
public static boolean checkIfRegistryRunning(int port, int msTimeout) {
- long stopTime = System.currentTimeMillis() + msTimeout;
+ final long POLLTIME_MS = 100L;
+ long stopTime = computeDeadline(System.currentTimeMillis(), msTimeout);
do {
try {
Registry r = LocateRegistry.getRegistry(port);
@@ -145,12 +146,12 @@ public class TestLibrary {
} catch (RemoteException e) {
// problem - not ready ? Try again
try {
- Thread.sleep(500);
+ Thread.sleep(POLLTIME_MS);
} catch (InterruptedException ie) {
// not expected
}
}
- } while (stopTime > System.currentTimeMillis());
+ } while (System.currentTimeMillis() < stopTime);
return false;
}
@@ -169,6 +170,31 @@ public class TestLibrary {
}
}
+ public static double getTimeoutFactor() {
+ String prop = getProperty("test.timeout.factor", "1.0");
+ double timeoutFactor = 1.0;
+
+ try {
+ timeoutFactor = Double.parseDouble(prop);
+ } catch (NumberFormatException ignore) { }
+
+ return timeoutFactor;
+ }
+
+ /**
+ * Computes a deadline from a timestamp and a timeout value.
+ * Maximum timeout (before multipliers are applied) is one hour.
+ */
+ public static long computeDeadline(long timestamp, long timeout) {
+ final long MAX_TIMEOUT_MS = 3_600_000L;
+
+ if (timeout < 0L || timeout > MAX_TIMEOUT_MS) {
+ throw new IllegalArgumentException("timeout " + timeout + "ms out of range");
+ }
+
+ return timestamp + (long)(timeout * getTimeoutFactor());
+ }
+
/**
* Property mutators
*/
diff --git a/jdk/test/java/util/Formatter/Basic-X.java.template b/jdk/test/java/util/Formatter/Basic-X.java.template
index 47c5516be49..57d77ae887d 100644
--- a/jdk/test/java/util/Formatter/Basic-X.java.template
+++ b/jdk/test/java/util/Formatter/Basic-X.java.template
@@ -1154,6 +1154,10 @@ public class Basic$Type$ extends Basic {
test("%.5f", "0.99960", val);
test("%.6f", "0.999600", val);
+ val = new BigDecimal(BigInteger.ZERO, 6);
+ test("%.4f", "0.0000", val);
+ val = new BigDecimal(BigInteger.ZERO, -6);
+ test("%.4f", "0.0000", val);
#end[BigDecimal]
#if[float]
diff --git a/jdk/test/java/util/Formatter/Basic.java b/jdk/test/java/util/Formatter/Basic.java
index 9624def5cea..31fce5dd4e2 100644
--- a/jdk/test/java/util/Formatter/Basic.java
+++ b/jdk/test/java/util/Formatter/Basic.java
@@ -26,6 +26,7 @@
* @bug 4906370 4962433 4973103 4989961 5005818 5031150 4970931 4989491 5002937
* 5005104 5007745 5061412 5055180 5066788 5088703 6317248 6318369 6320122
* 6344623 6369500 6534606 6282094 6286592 6476425 5063507 6469160 6476168
+ * 8059175
*
* @run shell/timeout=240 Basic.sh
*/
diff --git a/jdk/test/java/util/Formatter/BasicBigDecimal.java b/jdk/test/java/util/Formatter/BasicBigDecimal.java
index 00a04f4535f..0eca6f987dd 100644
--- a/jdk/test/java/util/Formatter/BasicBigDecimal.java
+++ b/jdk/test/java/util/Formatter/BasicBigDecimal.java
@@ -1154,6 +1154,11 @@ public class BasicBigDecimal extends Basic {
test("%.5f", "0.99960", val);
test("%.6f", "0.999600", val);
+ val = new BigDecimal(BigInteger.ZERO, 6);
+ test("%.4f", "0.0000", val);
+
+ val = new BigDecimal(BigInteger.ZERO, -6);
+ test("%.4f", "0.0000", val);
diff --git a/jdk/test/javax/crypto/KeyGenerator/TestKGParity.java b/jdk/test/javax/crypto/KeyGenerator/TestKGParity.java
new file mode 100644
index 00000000000..40752152c56
--- /dev/null
+++ b/jdk/test/javax/crypto/KeyGenerator/TestKGParity.java
@@ -0,0 +1,121 @@
+/*
+ * Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+import java.io.PrintStream;
+import java.lang.String;
+import java.lang.System;
+import java.security.Provider;
+import java.security.SecureRandom;
+import java.security.Security;
+import javax.crypto.KeyGenerator;
+import static java.lang.System.out;
+
+/*
+ * @test
+ * @bug 8048607
+ * @compile ../../../com/sun/crypto/provider/Cipher/DES/TestUtility.java
+ * @summary Test key generation of DES and DESEDE
+ */
+public class TestKGParity {
+
+ private static final String[] ALGORITHM_ARR = {
+ "deS", "DesEDE"
+ };
+
+ public static void main(String argv[]) throws Exception {
+
+ TestKGParity test = new TestKGParity();
+ test.run();
+ }
+
+ private void run() throws Exception {
+ Provider[] providers = Security.getProviders();
+ for (Provider p : providers) {
+ String prvName = p.getName();
+ if (prvName.startsWith("SunJCE")
+ || prvName.startsWith("SunPKCS11-")) {
+ for (String algorithm : ALGORITHM_ARR) {
+ if (!runTest(p, algorithm)) {
+ throw new RuntimeException(
+ "Test failed with provider/algorithm:"
+ + p.getName() + "/" + algorithm);
+ } else {
+ out.println("Test passed with provider/algorithm:"
+ + p.getName() + "/" + algorithm);
+ }
+ }
+ }
+ }
+ }
+
+ public boolean runTest(Provider p, String algo) throws Exception {
+ byte[] keyValue = null;
+ try {
+ // Initialization
+ SecureRandom sRdm = new SecureRandom();
+ KeyGenerator kg = KeyGenerator.getInstance(algo, p);
+ kg.init(sRdm);
+
+ // Generate a SecretKey and retrieve its value
+ keyValue = kg.generateKey().getEncoded();
+
+ // Verify its parity in the unit of byte
+ for (int i = 0; i < keyValue.length; i++) {
+ if (!checkParity(keyValue[i])) {
+ out.println("Testing: "
+ + p.getName()
+ + "/"
+ + algo
+ + " failed when verify its parity in the unit of byte:"
+ + TestUtility.hexDump(keyValue, i));
+ return false;
+ }
+ }
+ return true;
+ } catch (Exception ex) {
+ out.println("Testing: " + p.getName() + "/" + algo
+ + " failed with unexpected exception");
+ ex.printStackTrace();
+ throw ex;
+ }
+ }
+
+ private boolean checkParity(byte keyByte) {
+ boolean even = false;
+ byte[] PARITY_BIT_MASK = {
+ (byte) 0x40, (byte) 0x20, (byte) 0x10, (byte) 0x08,
+ (byte) 0x04, (byte) 0x02, (byte) 0x01
+ };
+
+ for (int i = 0; i < 7; i++) {
+ if ((keyByte & PARITY_BIT_MASK[i]) > 0) {
+ even = !even;
+ }
+ }
+ if (keyByte < 0) {
+ even = !even;
+ }
+
+ return even;
+ }
+}
diff --git a/jdk/test/javax/management/remote/mandatory/notif/NotificationBufferDeadlockTest.java b/jdk/test/javax/management/remote/mandatory/notif/NotificationBufferDeadlockTest.java
index 79b2e970ab0..e0502079951 100644
--- a/jdk/test/javax/management/remote/mandatory/notif/NotificationBufferDeadlockTest.java
+++ b/jdk/test/javax/management/remote/mandatory/notif/NotificationBufferDeadlockTest.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2005, 2006, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2005, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -24,7 +24,8 @@
/*
* @test
* @bug 6239400
- * @summary Tests NotificationBuffer doesn't hold locks when adding listeners.
+ * @summary Tests NotificationBuffer doesn't hold locks when adding listeners,
+ * if test times out then deadlock is suspected.
* @author Eamonn McManus
* @run clean NotificationBufferDeadlockTest
* @run build NotificationBufferDeadlockTest
@@ -38,6 +39,7 @@ import java.net.MalformedURLException;
import java.util.List;
import java.util.Set;
import java.util.Vector;
+import java.util.concurrent.CountDownLatch;
import javax.management.*;
import javax.management.remote.*;
@@ -173,9 +175,7 @@ public class NotificationBufferDeadlockTest {
for (ObjectName name : names)
mbsc.invoke(name, "send", null, null);
- if (!countListener.waiting(MAX_WAITING_TIME)) {
- return "did not get " + names.size() + " notifs as expected\n";
- }
+ countListener.waiting();
if (!sources.containsAll(names))
return "missing names: " + sources;
@@ -202,13 +202,13 @@ public class NotificationBufferDeadlockTest {
}
};
t.start();
+ System.out.println("DeadlockTest-addNotificationListener waiting for the sending thread to die...");
try {
- t.join(5000L);
+ t.join(); //if times out here then deadlock is suspected
+ System.out.println("DeadlockTest-addNotificationListener OK.");
} catch (Exception e) {
thisFailure = "Join exception: " + e;
}
- if (t.isAlive())
- thisFailure = "Deadlock detected";
}
public void send() {
@@ -244,9 +244,9 @@ public class NotificationBufferDeadlockTest {
}
};
t.start();
- t.join(5000);
- if (t.isAlive())
- failure = "Query deadlock detected";
+ System.out.println("CreateDuringQueryInvocationHandler-createMBeanIfQuery waiting for the creating thread to die...");
+ t.join(); // if times out here then deadlock is suspected
+ System.out.println("CreateDuringQueryInvocationHandler-createMBeanIfQuery OK");
}
}
@@ -264,50 +264,30 @@ public class NotificationBufferDeadlockTest {
private static class MyListener implements NotificationListener {
public MyListener(int waitNB) {
- this.waitNB= waitNB;
+ count = new CountDownLatch(waitNB);
}
public void handleNotification(Notification n, Object h) {
- System.out.println("MyListener got: "+n.getSource()+" "+n.getType());
+ System.out.println("MyListener got: " + n.getSource() + " " + n.getType());
- synchronized(this) {
- if (TESTING_TYPE.equals(n.getType())) {
- sources.add((ObjectName) n.getSource());
-
- if (sources.size() == waitNB) {
- this.notifyAll();
- }
- }
+ if (TESTING_TYPE.equals(n.getType())) {
+ sources.add((ObjectName) n.getSource());
+ count.countDown();
}
}
- public boolean waiting(long timeout) {
- final long startTime = System.currentTimeMillis();
- long toWait = timeout;
-
- synchronized(this) {
- while(sources.size() < waitNB && toWait > 0) {
- try {
- this.wait(toWait);
- } catch (InterruptedException ire) {
- break;
- }
-
- toWait = timeout -
- (System.currentTimeMillis() - startTime);
- }
- }
-
- return sources.size() == waitNB;
+ public void waiting() throws InterruptedException {
+ System.out.println("MyListener-waiting ...");
+ count.await(); // if times out here then deadlock is suspected
+ System.out.println("MyListener-waiting done!");
}
- private final int waitNB;
+ private final CountDownLatch count;
}
static String thisFailure;
static String failure;
static int nextNameIndex;
- static final long MAX_WAITING_TIME = 10000;
private static MyListener countListener;
private static final List sources = new Vector();
diff --git a/jdk/test/javax/xml/crypto/dsig/GenerationTests.java b/jdk/test/javax/xml/crypto/dsig/GenerationTests.java
index 29261e2f17e..068cd2a86a2 100644
--- a/jdk/test/javax/xml/crypto/dsig/GenerationTests.java
+++ b/jdk/test/javax/xml/crypto/dsig/GenerationTests.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2005, 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2005, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -24,6 +24,7 @@
/**
* @test
* @bug 4635230 6283345 6303830 6824440 6867348 7094155 8038184 8038349 8046949
+ * 8046724
* @summary Basic unit tests for generating XML Signatures with JSR 105
* @compile -XDignore.symbol.file KeySelectors.java SignatureValidator.java
* X509KeySelector.java GenerationTests.java
@@ -45,6 +46,13 @@ import java.security.cert.X509CRL;
import java.security.spec.KeySpec;
import java.security.spec.DSAPrivateKeySpec;
import java.security.spec.DSAPublicKeySpec;
+import java.security.spec.ECField;
+import java.security.spec.ECFieldFp;
+import java.security.spec.ECParameterSpec;
+import java.security.spec.ECPoint;
+import java.security.spec.ECPrivateKeySpec;
+import java.security.spec.ECPublicKeySpec;
+import java.security.spec.EllipticCurve;
import java.security.spec.RSAPrivateKeySpec;
import java.security.spec.RSAPublicKeySpec;
import java.util.*;
@@ -81,9 +89,10 @@ public class GenerationTests {
private static DocumentBuilder db;
private static CanonicalizationMethod withoutComments;
private static SignatureMethod dsaSha1, dsaSha256, rsaSha1,
- rsaSha256, rsaSha384, rsaSha512;
+ rsaSha256, rsaSha384, rsaSha512,
+ ecdsaSha1;
private static DigestMethod sha1, sha256, sha384, sha512;
- private static KeyInfo dsa1024, dsa2048, rsa, rsa1024;
+ private static KeyInfo dsa1024, dsa2048, rsa, rsa1024, p256ki;
private static KeySelector kvks = new KeySelectors.KeyValueKeySelector();
private static KeySelector sks;
private static Key signingKey;
@@ -121,6 +130,7 @@ public class GenerationTests {
test_create_signature_enveloping_hmac_sha384();
test_create_signature_enveloping_hmac_sha512();
test_create_signature_enveloping_rsa();
+ test_create_signature_enveloping_p256_sha1();
test_create_signature_external_b64_dsa();
test_create_signature_external_dsa();
test_create_signature_keyname();
@@ -175,6 +185,8 @@ public class GenerationTests {
(kifac.newKeyValue(getPublicKey("RSA", 512))));
rsa1024 = kifac.newKeyInfo(Collections.singletonList
(kifac.newKeyValue(getPublicKey("RSA", 1024))));
+ p256ki = kifac.newKeyInfo(Collections.singletonList
+ (kifac.newKeyValue(getECPublicKey())));
rsaSha1 = fac.newSignatureMethod(SignatureMethod.RSA_SHA1, null);
rsaSha256 = fac.newSignatureMethod
("http://www.w3.org/2001/04/xmldsig-more#rsa-sha256", null);
@@ -182,6 +194,8 @@ public class GenerationTests {
("http://www.w3.org/2001/04/xmldsig-more#rsa-sha384", null);
rsaSha512 = fac.newSignatureMethod
("http://www.w3.org/2001/04/xmldsig-more#rsa-sha512", null);
+ ecdsaSha1 = fac.newSignatureMethod
+ ("http://www.w3.org/2001/04/xmldsig-more#ecdsa-sha1", null);
sks = new KeySelectors.SecretKeySelector("secret".getBytes("ASCII"));
httpUd = new HttpURIDereferencer();
@@ -342,6 +356,13 @@ public class GenerationTests {
System.out.println();
}
+ static void test_create_signature_enveloping_p256_sha1() throws Exception {
+ System.out.println("* Generating signature-enveloping-p256-sha1.xml");
+ test_create_signature_enveloping(sha1, ecdsaSha1, p256ki,
+ getECPrivateKey(), kvks, false);
+ System.out.println();
+ }
+
static void test_create_signature_external_b64_dsa() throws Exception {
System.out.println("* Generating signature-external-b64-dsa.xml");
test_create_signature_external(dsaSha1, dsa1024, signingKey, kvks, true);
@@ -1168,7 +1189,42 @@ public class GenerationTests {
"237008997971129772408397621801631622129297063463868593083106979716" +
"204903524890556839550490384015324575598723478554854070823335021842" +
"210112348400928769";
+ private static final String EC_X =
+ "335863644451761614592446380116804721648611739647823420286081723541" +
+ "6166183710";
+ private static final String EC_Y =
+ "951559601159729477487064127150143688502130342917782252098602422796" +
+ "95457910701";
+ private static final String EC_S =
+ "425976209773168452211813225517384419928639977904006759709292218082" +
+ "7440083936";
+ private static final ECParameterSpec EC_PARAMS;
+ static {
+ final String ec_sfield, ec_a, ec_b, ec_gx, ec_gy, ec_n;
+ ec_sfield =
+ "FFFFFFFF00000001000000000000000000000000FFFFFFFFFFFFFFFFFFFFFFFF";
+ ec_a =
+ "FFFFFFFF00000001000000000000000000000000FFFFFFFFFFFFFFFFFFFFFFFC";
+ ec_b =
+ "5AC635D8AA3A93E7B3EBBD55769886BC651D06B0CC53B0F63BCE3C3E27D2604B";
+ ec_gx =
+ "6B17D1F2E12C4247F8BCE6E563A440F277037D812DEB33A0F4A13945D898C296";
+ ec_gy =
+ "4FE342E2FE1A7F9B8EE7EB4A7C0F9E162BCE33576B315ECECBB6406837BF51F5";
+ ec_n =
+ "FFFFFFFF00000000FFFFFFFFFFFFFFFFBCE6FAADA7179E84F3B9CAC2FC632551";
+ final int ec_h = 1;
+ final ECField ec_field = new ECFieldFp(bigInt(ec_sfield));
+ final EllipticCurve ec_curve = new EllipticCurve(ec_field,
+ bigInt(ec_a), bigInt(ec_b));
+ final ECPoint ec_g = new ECPoint(bigInt(ec_gx), bigInt(ec_gy));
+ EC_PARAMS = new ECParameterSpec(ec_curve, ec_g, bigInt(ec_n), ec_h);
+ }
+
+ private static BigInteger bigInt(String s) {
+ return new BigInteger(s, 16);
+ }
private static PublicKey getPublicKey(String algo, int keysize)
throws Exception {
KeyFactory kf = KeyFactory.getInstance(algo);
@@ -1197,6 +1253,14 @@ public class GenerationTests {
return kf.generatePublic(kspec);
}
+ private static PublicKey getECPublicKey() throws Exception {
+ KeyFactory kf = KeyFactory.getInstance("EC");
+ KeySpec kspec = new ECPublicKeySpec(new ECPoint(new BigInteger(EC_X),
+ new BigInteger(EC_Y)),
+ EC_PARAMS);
+ return kf.generatePublic(kspec);
+ }
+
private static PrivateKey getPrivateKey(String algo, int keysize)
throws Exception {
KeyFactory kf = KeyFactory.getInstance(algo);
@@ -1223,6 +1287,12 @@ public class GenerationTests {
return kf.generatePrivate(kspec);
}
+ private static PrivateKey getECPrivateKey() throws Exception {
+ KeyFactory kf = KeyFactory.getInstance("EC");
+ KeySpec kspec = new ECPrivateKeySpec(new BigInteger(EC_S), EC_PARAMS);
+ return kf.generatePrivate(kspec);
+ }
+
private static SecretKey getSecretKey(final byte[] secret) {
return new SecretKey() {
public String getFormat() { return "RAW"; }
diff --git a/jdk/test/javax/xml/crypto/dsig/KeySelectors.java b/jdk/test/javax/xml/crypto/dsig/KeySelectors.java
index b8f4d324893..8f041f5f2a6 100644
--- a/jdk/test/javax/xml/crypto/dsig/KeySelectors.java
+++ b/jdk/test/javax/xml/crypto/dsig/KeySelectors.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2005, 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2005, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -166,7 +166,6 @@ class KeySelectors {
throw new KeySelectorException("No KeyValue element found!");
}
- //@@@FIXME: this should also work for key types other than DSA/RSA
static boolean algEquals(String algURI, String algName) {
if (algName.equalsIgnoreCase("DSA") &&
algURI.equals(SignatureMethod.DSA_SHA1) ||
@@ -181,6 +180,10 @@ class KeySelectors {
algURI.equals
("http://www.w3.org/2001/04/xmldsig-more#rsa-sha512"))) {
return true;
+ } else if (algName.equalsIgnoreCase("EC") &&
+ (algURI.equals
+ ("http://www.w3.org/2001/04/xmldsig-more#ecdsa-sha1"))) {
+ return true;
} else {
return false;
}
diff --git a/jdk/test/javax/xml/crypto/dsig/ValidationTests.java b/jdk/test/javax/xml/crypto/dsig/ValidationTests.java
index 5a86692f8c8..3480f23b2be 100644
--- a/jdk/test/javax/xml/crypto/dsig/ValidationTests.java
+++ b/jdk/test/javax/xml/crypto/dsig/ValidationTests.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2005, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2005, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -23,7 +23,7 @@
/**
* @test
- * @bug 4635230 6365103 6366054 6824440 7131084
+ * @bug 4635230 6365103 6366054 6824440 7131084 8046724
* @summary Basic unit tests for validating XML Signatures with JSR 105
* @compile -XDignore.symbol.file KeySelectors.java SignatureValidator.java
* X509KeySelector.java ValidationTests.java
@@ -90,6 +90,7 @@ public class ValidationTests {
new Test("signature-enveloping-b64-dsa.xml", KVKS),
new Test("signature-enveloping-dsa.xml", KVKS),
new Test("signature-enveloping-rsa.xml", KVKS),
+ new Test("signature-enveloping-p256-sha1.xml", KVKS),
new Test("signature-enveloping-hmac-sha1.xml", SKKS),
new Test("signature-external-dsa.xml", KVKS),
new Test("signature-external-b64-dsa.xml", KVKS),
diff --git a/jdk/test/javax/xml/crypto/dsig/data/signature-enveloping-p256-sha1.xml b/jdk/test/javax/xml/crypto/dsig/data/signature-enveloping-p256-sha1.xml
new file mode 100644
index 00000000000..0ace1157be5
--- /dev/null
+++ b/jdk/test/javax/xml/crypto/dsig/data/signature-enveloping-p256-sha1.xml
@@ -0,0 +1,3 @@
+7/XTsHaBSOnJ/jXD5v0zL6VKYsk=WiF/Hd0s7BiH36Ds/1iJcbKiXOUVBSGFteuTjXwBbezR43NAwpMmMX5c1su0A9hG9rVVzE/1DOlO
+vuDVLBBblg==BAds672US3sCYunM2k2bEQLbuRxdQlNTvq+5fitOpDMe0mBdZV4J3yZaG0taziYIuAT9GJGfds+q
+xtXOCNWe/60=
\ No newline at end of file
diff --git a/langtools/.hgtags b/langtools/.hgtags
index c7267deceed..78871157c37 100644
--- a/langtools/.hgtags
+++ b/langtools/.hgtags
@@ -287,3 +287,4 @@ f7ce2cfa4cdbec0ae0f46080484eace66be7987a jdk9-b41
23a3a063a906a91ba696d792f0eeabf157cd2f86 jdk9-b42
6a06008aec10d32898ca665685f531c681b28f5f jdk9-b43
de2ce70d907c9f227b802cea29285bece5194cd5 jdk9-b44
+73bbdcf236b297a0c1b8875f2eeba65eaf7ade60 jdk9-b45
diff --git a/langtools/make/Tools.gmk b/langtools/make/Tools.gmk
index 7e23cd122f9..ea2452387cc 100644
--- a/langtools/make/Tools.gmk
+++ b/langtools/make/Tools.gmk
@@ -39,7 +39,7 @@ $(eval $(call SetupJavaCompilation,BUILD_TOOLS_LANGTOOLS, \
DISABLE_SJAVAC := true, \
ADD_JAVAC_FLAGS := -Xprefer:source, \
SRC := $(LANGTOOLS_TOPDIR)/make/tools, \
- INCLUDES := compileproperties, \
+ INCLUDES := compileproperties propertiesparser, \
BIN := $(BUILDTOOLS_OUTPUTDIR)/langtools_tools_classes))
all: $(BUILD_TOOLS_LANGTOOLS)
diff --git a/langtools/make/build.properties b/langtools/make/build.properties
index b224a9721d2..2a12dbec711 100644
--- a/langtools/make/build.properties
+++ b/langtools/make/build.properties
@@ -54,6 +54,9 @@ jdk.compiler.dependencies=java.base:java.compiler
jdk.javadoc.dependencies=java.base:java.compiler:jdk.compiler
jdk.dev.dependencies=java.base:java.compiler:jdk.compiler
+javac.resource.includes = \
+ com/sun/tools/javac/resources/compiler.properties
+
#test configuration:
jtreg.tests=
boot.javac.tests = tools/javac
diff --git a/langtools/make/build.xml b/langtools/make/build.xml
index 8eff38083aa..bdaae283bde 100644
--- a/langtools/make/build.xml
+++ b/langtools/make/build.xml
@@ -527,7 +527,8 @@
+ compilation.kind="@{compilation.kind}"
+ resource.includes="${javac.resource.includes}" />
-
+
+
@@ -583,6 +585,12 @@
+
+
+
+
+
@@ -644,6 +652,28 @@
+
+
+
+
+
+
+
+
+
+
+
diff --git a/langtools/make/gensrc/Gensrc-jdk.compiler.gmk b/langtools/make/gensrc/Gensrc-jdk.compiler.gmk
index 8d44ea7b3e8..04a0479fad7 100644
--- a/langtools/make/gensrc/Gensrc-jdk.compiler.gmk
+++ b/langtools/make/gensrc/Gensrc-jdk.compiler.gmk
@@ -37,4 +37,7 @@ $(eval $(call SetupVersionProperties,JAVAP_VERSION,\
$(eval $(call SetupCompileProperties,COMPILE_PROPERTIES,\
$(JAVAC_VERSION) $(JAVAH_VERSION) $(JAVAP_VERSION)))
-all: $(COMPILE_PROPERTIES)
+$(eval $(call SetupParseProperties,PARSE_PROPERTIES,\
+ com/sun/tools/javac/resources/compiler.properties))
+
+all: $(COMPILE_PROPERTIES) $(PARSE_PROPERTIES)
diff --git a/langtools/make/gensrc/GensrcCommon.gmk b/langtools/make/gensrc/GensrcCommon.gmk
index efd9d23c58d..0b38117030c 100644
--- a/langtools/make/gensrc/GensrcCommon.gmk
+++ b/langtools/make/gensrc/GensrcCommon.gmk
@@ -35,6 +35,11 @@ include JavaCompilation.gmk
TOOL_COMPILEPROPS_CMD := $(JAVA) -cp $(BUILDTOOLS_OUTPUTDIR)/langtools_tools_classes \
compileproperties.CompileProperties -quiet
+################################################################################
+# The compileprops tools compiles a properties file into an enum-like class.
+TOOL_PARSEPROPS_CMD := $(JAVA) -cp $(BUILDTOOLS_OUTPUTDIR)/langtools_tools_classes \
+ propertiesparser.PropertiesParser
+
################################################################################
# Sets up a rule that creates a version.properties file in the gensrc output
@@ -93,3 +98,32 @@ define SetupCompileProperties
endef
################################################################################
+# Parse property files in given location and generate a Java-like enum in the gensrc folder.
+# Param 1 - Variable to add targets to
+# Param 2 - Extra properties files to process
+define SetupParseProperties
+ #property file to generate
+ PARSEPROPSOURCES := $$(foreach var,$2,$$(addsuffix $$(var),$(LANGTOOLS_TOPDIR)/src/$(MODULE)/share/classes/))
+
+ PARSEPROPALLDIRS := $$(patsubst $(LANGTOOLS_TOPDIR)/src/%, \
+ $(SUPPORT_OUTPUTDIR)/gensrc/%, \
+ $$(dir $$(PARSEPROPSOURCES)))
+
+ PARSEPROPDIRS := $$(sort $$(PARSEPROPALLDIRS))
+
+ PARSEPROPCMDLINE := $$(subst _SPACE_, $$(SPACE), \
+ $$(join $$(foreach var,$$(PARSEPROPSOURCES),$$(addprefix -compile_SPACE_,$$(var))), \
+ $$(addprefix _SPACE_, $$(PARSEPROPALLDIRS))))
+
+ # Now setup the rule for the generation of the resource bundles.
+ $(SUPPORT_OUTPUTDIR)/gensrc/$(MODULE)/_the_parsed_props: $(PARSEPROPSOURCES)
+ $(CP) -r $(LANGTOOLS_TOPDIR)/make/tools/propertiesparser/resources $(BUILDTOOLS_OUTPUTDIR)/langtools_tools_classes/propertiesparser/resources
+ $(MKDIR) -p $$(@D) $$(PARSEPROPDIRS)
+ $(ECHO) Parsing $$(words $$(PARSEPROPSOURCES)) properties into enum-like class for $(MODULE)
+ $(TOOL_PARSEPROPS_CMD) $$(PARSEPROPCMDLINE)
+ $(TOUCH) $$@
+
+ $$(strip $1) += $(SUPPORT_OUTPUTDIR)/gensrc/$(MODULE)/_the_parsed_props
+endef
+
+################################################################################
diff --git a/langtools/make/intellij/build.xml b/langtools/make/intellij/build.xml
index 3494aec4443..46163bbded1 100644
--- a/langtools/make/intellij/build.xml
+++ b/langtools/make/intellij/build.xml
@@ -28,7 +28,7 @@
-
+
diff --git a/langtools/make/intellij/compiler.xml b/langtools/make/intellij/compiler.xml
index 552c480a158..6edb6d2c5af 100644
--- a/langtools/make/intellij/compiler.xml
+++ b/langtools/make/intellij/compiler.xml
@@ -5,6 +5,7 @@
+
diff --git a/langtools/make/intellij/langtools.iml b/langtools/make/intellij/langtools.iml
index 57af163ce76..88c815ff523 100644
--- a/langtools/make/intellij/langtools.iml
+++ b/langtools/make/intellij/langtools.iml
@@ -1,20 +1,22 @@
-
+
-
-
+
+
+
+
+
-
diff --git a/langtools/make/intellij/misc.xml b/langtools/make/intellij/misc.xml
index aec616acb92..5039fe35f4a 100644
--- a/langtools/make/intellij/misc.xml
+++ b/langtools/make/intellij/misc.xml
@@ -3,8 +3,8 @@
-
-
+
+
diff --git a/langtools/make/netbeans/langtools/nbproject/project.xml b/langtools/make/netbeans/langtools/nbproject/project.xml
index 9f93321fb38..806e3356102 100644
--- a/langtools/make/netbeans/langtools/nbproject/project.xml
+++ b/langtools/make/netbeans/langtools/nbproject/project.xml
@@ -478,29 +478,34 @@
${root}/src/java.base/share/classes
+ ${root}/build/bootstrap/java.base/gensrc${root}/build/java.base/classes1.8${root}/src/java.compiler/share/classes
+ ${root}/build/bootstrap/java.compiler/gensrc${root}/build/java.base/classes${root}/build/java.compiler/classes1.8${root}/src/jdk.compiler/share/classes
+ ${root}/build/bootstrap/jdk.compiler/gensrc${root}/build/java.base/classes:${root}/build/java.compiler/classes${root}/build/jdk.compiler/classes1.8${root}/src/jdk.dev/share/classes
+ ${root}/build/bootstrap/jdk.dev/gensrc${root}/build/java.base/classes:${root}/build/java.compiler/classes:${root}/build/jdk.compiler/classes${root}/build/jdk.dev/classes1.8${root}/src/jdk.javadoc/share/classes
+ ${root}/build/bootstrap/jdk.javadoc/gensrc${root}/build/java.base/classes:${root}/build/java.compiler/classes:${root}/build/jdk.compiler/classes${root}/build/jdk.javadoc/classes1.8
diff --git a/langtools/make/tools/anttasks/PropertiesParserTask.java b/langtools/make/tools/anttasks/PropertiesParserTask.java
new file mode 100644
index 00000000000..ec288946b10
--- /dev/null
+++ b/langtools/make/tools/anttasks/PropertiesParserTask.java
@@ -0,0 +1,92 @@
+/*
+ * Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation. Oracle designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Oracle in the LICENSE file that accompanied this code.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+package anttasks;
+
+import java.io.File;
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.List;
+
+import propertiesparser.PropertiesParser;
+import propertiesparser.gen.ClassGenerator;
+import org.apache.tools.ant.BuildException;
+import org.apache.tools.ant.DirectoryScanner;
+import org.apache.tools.ant.Project;
+import org.apache.tools.ant.taskdefs.MatchingTask;
+import org.apache.tools.ant.types.Path;
+import org.apache.tools.ant.types.Resource;
+
+public class PropertiesParserTask extends MatchingTask {
+ public void addSrc(Path src) {
+ if (srcDirs == null)
+ srcDirs = new Path(getProject());
+ srcDirs.add(src);
+ }
+
+ public void setDestDir(File destDir) {
+ this.destDir = destDir;
+ }
+
+ @Override
+ public void execute() {
+ List mainOpts = new ArrayList();
+ int count = 0;
+ for (String dir : srcDirs.list()) {
+ File baseDir = getProject().resolveFile(dir);
+ DirectoryScanner s = getDirectoryScanner(baseDir);
+ for (String path : s.getIncludedFiles()) {
+ if (path.endsWith(".properties")) {
+ File srcFile = new File(baseDir, path);
+ String destPath =
+ path.substring(0, path.lastIndexOf(File.separator) + 1) +
+ ClassGenerator.toplevelName(srcFile) + ".java";
+ File destFile = new File(this.destDir, destPath);
+ File destDir = destFile.getParentFile();
+ // Arguably, the comparison in the next line should be ">", not ">="
+ // but that assumes the resolution of the last modified time is fine
+ // grained enough; in practice, it is better to use ">=".
+ if (destFile.exists() && destFile.lastModified() >= srcFile.lastModified())
+ continue;
+ destDir.mkdirs();
+ mainOpts.add("-compile");
+ mainOpts.add(srcFile.getPath());
+ mainOpts.add(destDir.getPath());
+ count++;
+ }
+ }
+ }
+ if (mainOpts.size() > 0) {
+ log("Generating " + count + " resource files to " + destDir, Project.MSG_INFO);
+ PropertiesParser pp = new PropertiesParser(msg -> log(msg, Project.MSG_INFO));
+ boolean ok = pp.run(mainOpts.toArray(new String[mainOpts.size()]));
+ if (!ok)
+ throw new BuildException("PropertiesParser failed.");
+ }
+ }
+
+ private Path srcDirs;
+ private File destDir;
+}
diff --git a/langtools/make/tools/propertiesparser/PropertiesParser.java b/langtools/make/tools/propertiesparser/PropertiesParser.java
new file mode 100644
index 00000000000..6ec748ef1a3
--- /dev/null
+++ b/langtools/make/tools/propertiesparser/PropertiesParser.java
@@ -0,0 +1,127 @@
+/*
+ * Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation. Oracle designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Oracle in the LICENSE file that accompanied this code.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+package propertiesparser;
+
+import propertiesparser.parser.MessageFile;
+import propertiesparser.gen.ClassGenerator;
+
+import java.io.BufferedWriter;
+import java.io.File;
+import java.io.FileInputStream;
+import java.io.FileNotFoundException;
+import java.io.FileOutputStream;
+import java.io.IOException;
+import java.io.OutputStreamWriter;
+import java.io.Writer;
+import java.lang.RuntimeException;
+import java.lang.Throwable;
+import java.text.MessageFormat;
+import java.util.ArrayList;
+import java.util.Collections;
+import java.util.HashMap;
+import java.util.Iterator;
+import java.util.List;
+import java.util.Map;
+import java.util.Properties;
+
+/** Translates a .properties file into a .java file containing an enum-like Java class
+ * which defines static factory methods for all resource keys in a given resource file.
+ *
+ * Usage: java PropertiesParser -compile [path to .properties file] [output folder where .java file will be written]
+ *
+ * @author mcimadamore
+ */
+
+public class PropertiesParser {
+
+ public Logger logger;
+
+ public PropertiesParser(Logger logger) {
+ this.logger = logger;
+ }
+
+ public static void main(String[] args) {
+ PropertiesParser pp = new PropertiesParser(msg -> System.out.println(msg));
+ boolean ok = pp.run(args);
+ if ( !ok ) {
+ System.exit(1);
+ }
+ }
+
+ public static interface Logger {
+ void info(String msg);
+ }
+
+ public void info(String msg) {
+ logger.info(msg);
+ }
+
+ public boolean run(String[] args) {
+ Map optionsMap = parseOptions(args);
+ if (optionsMap.isEmpty()) {
+ usage();
+ return false;
+ }
+ try {
+ optionsMap.forEach((propfile, outfile) -> compilePropertyFile(propfile, outfile));
+ return true;
+ } catch (RuntimeException ex) {
+ ex.printStackTrace();
+ return false;
+ }
+ }
+
+ private void compilePropertyFile(String propertyPath, String outPath) {
+ try {
+ File propertyFile = new File(propertyPath);
+ String prefix = propertyFile.getName().split("\\.")[0];
+ MessageFile messageFile = new MessageFile(propertyFile, prefix);
+ new ClassGenerator().generateFactory(messageFile, new File(outPath));
+ } catch (Throwable ex) {
+ throw new RuntimeException(ex);
+ }
+ }
+
+ private Map parseOptions(String args[]) {
+ Map optionsMap = new HashMap<>(args.length);
+ for ( int i = 0; i < args.length ; i++ ) {
+ if ( "-compile".equals(args[i]) && i+2 < args.length ) {
+ optionsMap.put(args[++i], args[++i]);
+ } else {
+ return new HashMap<>();
+ }
+ }
+ return optionsMap;
+ }
+
+ private void usage() {
+ info("usage:");
+ info(" java PropertiesParser {-compile path_to_properties_file path_to_java_output_dir}");
+ info("");
+ info("Example:");
+ info(" java PropertiesParser -compile resources/test.properties resources");
+ }
+}
diff --git a/langtools/make/tools/propertiesparser/gen/ClassGenerator.java b/langtools/make/tools/propertiesparser/gen/ClassGenerator.java
new file mode 100644
index 00000000000..f46d10a0bee
--- /dev/null
+++ b/langtools/make/tools/propertiesparser/gen/ClassGenerator.java
@@ -0,0 +1,419 @@
+package propertiesparser.gen;
+
+import propertiesparser.parser.Message;
+import propertiesparser.parser.MessageFile;
+import propertiesparser.parser.MessageInfo;
+import propertiesparser.parser.MessageLine;
+import propertiesparser.parser.MessageType;
+import propertiesparser.parser.MessageType.CompoundType;
+import propertiesparser.parser.MessageType.CustomType;
+import propertiesparser.parser.MessageType.SimpleType;
+import propertiesparser.parser.MessageType.UnionType;
+import propertiesparser.parser.MessageType.Visitor;
+
+import java.io.File;
+import java.io.FileWriter;
+import java.io.IOException;
+import java.io.InputStream;
+import java.text.MessageFormat;
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.Collections;
+import java.util.TreeSet;
+import java.util.List;
+import java.util.Map;
+import java.util.Set;
+import java.util.Properties;
+import java.util.stream.Collectors;
+import java.util.stream.Stream;
+
+public class ClassGenerator {
+
+ /** Empty string - used to generate indentation padding. */
+ private final static String INDENT_STRING = " ";
+
+ /** Default indentation step. */
+ private final static int INDENT_WIDTH = 4;
+
+ /** File-backed property file containing basic code stubs. */
+ static Properties stubs;
+
+ static {
+ //init properties from file
+ stubs = new Properties();
+ String resourcePath = "/propertiesparser/resources/templates.properties";
+ try (InputStream in = ClassGenerator.class.getResourceAsStream(resourcePath)) {
+ stubs.load(in);
+ } catch (IOException ex) {
+ throw new AssertionError(ex);
+ }
+ }
+
+ /**
+ * Supported stubs in the property file.
+ */
+ enum StubKind {
+ TOPLEVEL("toplevel.decl"),
+ FACTORY_CLASS("nested.decl"),
+ IMPORT("import.decl"),
+ FACTORY_METHOD_DECL("factory.decl.method"),
+ FACTORY_METHOD_ARG("factory.decl.method.arg"),
+ FACTORY_METHOD_BODY("factory.decl.method.body"),
+ FACTORY_FIELD("factory.decl.field"),
+ WILDCARDS_EXTENDS("wildcards.extends"),
+ SUPPRESS_WARNINGS("suppress.warnings");
+
+ /** stub key (as it appears in the property file) */
+ String key;
+
+ StubKind(String key) {
+ this.key = key;
+ }
+
+ /**
+ * Subst a list of arguments into a given stub.
+ */
+ String format(Object... args) {
+ return MessageFormat.format((String)stubs.get(key), args);
+ }
+ }
+
+ /**
+ * Nested factory class kind. There are multiple sub-factories, one for each kind of commonly used
+ * diagnostics (i.e. error, warnings, note, fragment). An additional category is defined for
+ * those resource keys whose prefix doesn't match any predefined category.
+ */
+ enum FactoryKind {
+ ERR("err", "Error", "Errors"),
+ WARN("warn", "Warning", "Warnings"),
+ NOTE("note", "Note", "Notes"),
+ MISC("misc", "Fragment", "Fragments"),
+ OTHER(null, null, null);
+
+ /** The prefix for this factory kind (i.e. 'err'). */
+ String prefix;
+
+ /** The type of the factory method/fields in this class. */
+ String keyClazz;
+
+ /** The class name to be used for this factory. */
+ String factoryClazz;
+
+ FactoryKind(String prefix, String keyClazz, String factoryClazz) {
+ this.prefix = prefix;
+ this.keyClazz = keyClazz;
+ this.factoryClazz = factoryClazz;
+ }
+
+ /**
+ * Utility method for parsing a factory kind from a resource key prefix.
+ */
+ static FactoryKind parseFrom(String prefix) {
+ for (FactoryKind k : FactoryKind.values()) {
+ if (k.prefix == null || k.prefix.equals(prefix)) {
+ return k;
+ }
+ }
+ return null;
+ }
+ }
+
+ /**
+ * Main entry-point: generate a Java enum-like set of nested factory classes into given output
+ * folder. The factories are populated as mandated by the comments in the input resource file.
+ */
+ public void generateFactory(MessageFile messageFile, File outDir) {
+ Map>> groupedEntries =
+ messageFile.messages.entrySet().stream()
+ .collect(Collectors.groupingBy(e -> FactoryKind.parseFrom(e.getKey().split("\\.")[1])));
+ //generate nested classes
+ List nestedDecls = new ArrayList<>();
+ Set importedTypes = new TreeSet<>();
+ for (Map.Entry>> entry : groupedEntries.entrySet()) {
+ if (entry.getKey() == FactoryKind.OTHER) continue;
+ //emit members
+ String members = entry.getValue().stream()
+ .flatMap(e -> generateFactoryMethodsAndFields(e.getKey(), e.getValue()).stream())
+ .collect(Collectors.joining("\n\n"));
+ //emit nested class
+ String factoryDecl =
+ StubKind.FACTORY_CLASS.format(entry.getKey().factoryClazz, indent(members, 1));
+ nestedDecls.add(indent(factoryDecl, 1));
+ //add imports
+ entry.getValue().stream().forEach(e ->
+ importedTypes.addAll(importedTypes(e.getValue().getMessageInfo().getTypes())));
+ }
+ String clazz = StubKind.TOPLEVEL.format(
+ packageName(messageFile.file),
+ String.join("\n", generateImports(importedTypes)),
+ toplevelName(messageFile.file),
+ String.join("\n", nestedDecls));
+ try (FileWriter fw = new FileWriter(new File(outDir, toplevelName(messageFile.file) + ".java"))) {
+ fw.append(clazz);
+ } catch (Throwable ex) {
+ throw new AssertionError(ex);
+ }
+ }
+
+ /**
+ * Indent a string to a given level.
+ */
+ String indent(String s, int level) {
+ return Stream.of(s.split("\n"))
+ .map(sub -> INDENT_STRING.substring(0, level * INDENT_WIDTH) + sub)
+ .collect(Collectors.joining("\n"));
+ }
+
+ /**
+ * Retrieve package part of given file object.
+ */
+ String packageName(File file) {
+ String path = file.getAbsolutePath();
+ int begin = path.indexOf("com" + File.separatorChar);
+ String packagePath = path.substring(begin, path.lastIndexOf(File.separatorChar));
+ String packageName = packagePath.replace(File.separatorChar, '.');
+ return packageName;
+ }
+
+ /**
+ * Form the name of the toplevel factory class.
+ */
+ public static String toplevelName(File file) {
+ return Stream.of(file.getName().split("\\."))
+ .map(s -> Character.toUpperCase(s.charAt(0)) + s.substring(1))
+ .collect(Collectors.joining(""));
+ }
+
+ /**
+ * Generate a list of import declarations given a set of imported types.
+ */
+ List generateImports(Set importedTypes) {
+ List importDecls = new ArrayList<>();
+ for (String it : importedTypes) {
+ importDecls.add(StubKind.IMPORT.format(it));
+ }
+ return importDecls;
+ }
+
+ /**
+ * Generate a list of factory methods/fields to be added to a given factory nested class.
+ */
+ List generateFactoryMethodsAndFields(String key, Message msg) {
+ MessageInfo msgInfo = msg.getMessageInfo();
+ List lines = msg.getLines(false);
+ String javadoc = lines.stream()
+ .filter(ml -> !ml.isInfo() && !ml.isEmptyOrComment())
+ .map(ml -> ml.text)
+ .collect(Collectors.joining("\n *"));
+ String[] keyParts = key.split("\\.");
+ FactoryKind k = FactoryKind.parseFrom(keyParts[1]);
+ String factoryName = factoryName(key);
+ if (msgInfo.getTypes().isEmpty()) {
+ //generate field
+ String factoryField = StubKind.FACTORY_FIELD.format(k.keyClazz, factoryName,
+ "\"" + keyParts[0] + "\"",
+ "\"" + Stream.of(keyParts).skip(2).collect(Collectors.joining(".")) + "\"",
+ javadoc);
+ return Collections.singletonList(factoryField);
+ } else {
+ //generate method
+ List factoryMethods = new ArrayList<>();
+ for (List msgTypes : normalizeTypes(0, msgInfo.getTypes())) {
+ List types = generateTypes(msgTypes);
+ List argNames = argNames(types.size());
+ String suppressionString = needsSuppressWarnings(msgTypes) ?
+ StubKind.SUPPRESS_WARNINGS.format() : "";
+ String factoryMethod = StubKind.FACTORY_METHOD_DECL.format(suppressionString, k.keyClazz,
+ factoryName, argDecls(types, argNames).stream().collect(Collectors.joining(", ")),
+ indent(StubKind.FACTORY_METHOD_BODY.format(k.keyClazz,
+ "\"" + keyParts[0] + "\"",
+ "\"" + Stream.of(keyParts).skip(2).collect(Collectors.joining(".")) + "\"",
+ argNames.stream().collect(Collectors.joining(", "))), 1),
+ javadoc);
+ factoryMethods.add(factoryMethod);
+ }
+ return factoryMethods;
+ }
+ }
+
+ /**
+ * Form the name of a factory method/field given a resource key.
+ */
+ String factoryName(String key) {
+ return Stream.of(key.split("[\\.-]"))
+ .skip(2)
+ .map(s -> Character.toUpperCase(s.charAt(0)) + s.substring(1))
+ .collect(Collectors.joining(""));
+ }
+
+ /**
+ * Generate a formal parameter list given a list of types and names.
+ */
+ List argDecls(List types, List args) {
+ List argNames = new ArrayList<>();
+ for (int i = 0 ; i < types.size() ; i++) {
+ argNames.add(types.get(i) + " " + args.get(i));
+ }
+ return argNames;
+ }
+
+ /**
+ * Generate a list of formal parameter names given a size.
+ */
+ List argNames(int size) {
+ List argNames = new ArrayList<>();
+ for (int i = 0 ; i < size ; i++) {
+ argNames.add(StubKind.FACTORY_METHOD_ARG.format(i));
+ }
+ return argNames;
+ }
+
+ /**
+ * Convert a (normalized) parsed type into a string-based representation of some Java type.
+ */
+ List generateTypes(List msgTypes) {
+ return msgTypes.stream().map(t -> t.accept(stringVisitor, null)).collect(Collectors.toList());
+ }
+ //where
+ Visitor stringVisitor = new Visitor() {
+ @Override
+ public String visitCustomType(CustomType t, Void aVoid) {
+ String customType = t.typeString;
+ return customType.substring(customType.lastIndexOf('.') + 1);
+ }
+
+ @Override
+ public String visitSimpleType(SimpleType t, Void aVoid) {
+ return t.clazz;
+ }
+
+ @Override
+ public String visitCompoundType(CompoundType t, Void aVoid) {
+ return StubKind.WILDCARDS_EXTENDS.format(t.kind.clazz.clazz,
+ t.elemtype.accept(this, null));
+ }
+
+ @Override
+ public String visitUnionType(UnionType t, Void aVoid) {
+ throw new AssertionError("Union types should have been denormalized!");
+ }
+ };
+
+ /**
+ * See if any of the parsed types in the given list needs warning suppression.
+ */
+ boolean needsSuppressWarnings(List msgTypes) {
+ return msgTypes.stream().anyMatch(t -> t.accept(suppressWarningsVisitor, null));
+ }
+ //where
+ Visitor suppressWarningsVisitor = new Visitor() {
+ @Override
+ public Boolean visitCustomType(CustomType t, Void aVoid) {
+ //play safe
+ return true;
+ }
+ @Override
+ public Boolean visitSimpleType(SimpleType t, Void aVoid) {
+ switch (t) {
+ case LIST:
+ case SET:
+ return true;
+ default:
+ return false;
+ }
+ }
+
+ @Override
+ public Boolean visitCompoundType(CompoundType t, Void aVoid) {
+ return t.elemtype.accept(this, null);
+ }
+
+ @Override
+ public Boolean visitUnionType(UnionType t, Void aVoid) {
+ return needsSuppressWarnings(Arrays.asList(t.choices));
+ }
+ };
+
+ /**
+ * Retrieve a list of types that need to be imported, so that the factory body can refer
+ * to the types in the given list using simple names.
+ */
+ Set importedTypes(List msgTypes) {
+ Set imports = new TreeSet<>();
+ msgTypes.forEach(t -> t.accept(importVisitor, imports));
+ return imports;
+ }
+ //where
+ Visitor> importVisitor = new Visitor>() {
+ @Override
+ public Void visitCustomType(CustomType t, Set imports) {
+ imports.add(t.typeString);
+ return null;
+ }
+
+ @Override
+ public Void visitSimpleType(SimpleType t, Set imports) {
+ if (t.qualifier != null) {
+ imports.add(t.qualifier + "." + t.clazz);
+ }
+ return null;
+ }
+
+ @Override
+ public Void visitCompoundType(CompoundType t, Set imports) {
+ visitSimpleType(t.kind.clazz, imports);
+ t.elemtype.accept(this, imports);
+ return null;
+ }
+
+ @Override
+ public Void visitUnionType(UnionType t, Set imports) {
+ Stream.of(t.choices).forEach(c -> c.accept(this, imports));
+ return null;
+ }
+ };
+
+ /**
+ * Normalize parsed types in a comment line. If one or more types in the line contains alternatives,
+ * this routine generate a list of 'overloaded' normalized signatures.
+ */
+ List> normalizeTypes(int idx, List msgTypes) {
+ if (msgTypes.size() == idx) return Collections.singletonList(Collections.emptyList());
+ MessageType head = msgTypes.get(idx);
+ List> buf = new ArrayList<>();
+ for (MessageType alternative : head.accept(normalizeVisitor, null)) {
+ for (List rest : normalizeTypes(idx + 1, msgTypes)) {
+ List temp = new ArrayList<>(rest);
+ temp.add(0, alternative);
+ buf.add(temp);
+ }
+ }
+ return buf;
+ }
+ //where
+ Visitor, Void> normalizeVisitor = new Visitor, Void>() {
+ @Override
+ public List visitCustomType(CustomType t, Void aVoid) {
+ return Collections.singletonList(t);
+ }
+
+ @Override
+ public List visitSimpleType(SimpleType t, Void aVoid) {
+ return Collections.singletonList(t);
+ }
+
+ @Override
+ public List visitCompoundType(CompoundType t, Void aVoid) {
+ return t.elemtype.accept(this, null).stream()
+ .map(nt -> new CompoundType(t.kind, nt))
+ .collect(Collectors.toList());
+ }
+
+ @Override
+ public List visitUnionType(UnionType t, Void aVoid) {
+ return Stream.of(t.choices)
+ .flatMap(t2 -> t2.accept(this, null).stream())
+ .collect(Collectors.toList());
+ }
+ };
+}
diff --git a/langtools/make/tools/propertiesparser/parser/Message.java b/langtools/make/tools/propertiesparser/parser/Message.java
new file mode 100644
index 00000000000..4bfded31285
--- /dev/null
+++ b/langtools/make/tools/propertiesparser/parser/Message.java
@@ -0,0 +1,91 @@
+/*
+ * Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+package propertiesparser.parser;
+
+import java.util.ArrayList;
+import java.util.List;
+
+/**
+ * A message within the message file.
+ * A message is a series of lines containing a "name=value" property,
+ * optionally preceded by a comment describing the use of placeholders
+ * such as {0}, {1}, etc within the property value.
+ */
+public final class Message {
+ final MessageLine firstLine;
+ private MessageInfo messageInfo;
+
+ Message(MessageLine l) {
+ firstLine = l;
+ }
+
+ /**
+ * Get the Info object for this message. It may be empty if there
+ * if no comment preceding the property specification.
+ */
+ public MessageInfo getMessageInfo() {
+ if (messageInfo == null) {
+ MessageLine l = firstLine.prev;
+ if (l != null && l.isInfo())
+ messageInfo = new MessageInfo(l.text);
+ else
+ messageInfo = MessageInfo.dummyInfo;
+ }
+ return messageInfo;
+ }
+
+ /**
+ * Get all the lines pertaining to this message.
+ */
+ public List getLines(boolean includeAllPrecedingComments) {
+ List lines = new ArrayList<>();
+ MessageLine l = firstLine;
+ if (includeAllPrecedingComments) {
+ // scan back to find end of prev message
+ while (l.prev != null && l.prev.isEmptyOrComment())
+ l = l.prev;
+ // skip leading blank lines
+ while (l.text.isEmpty())
+ l = l.next;
+ } else {
+ if (l.prev != null && l.prev.isInfo())
+ l = l.prev;
+ }
+
+ // include any preceding lines
+ for ( ; l != firstLine; l = l.next)
+ lines.add(l);
+
+ // include message lines
+ for (l = firstLine; l != null && l.hasContinuation(); l = l.next)
+ lines.add(l);
+ lines.add(l);
+
+ // include trailing blank line if present
+ l = l.next;
+ if (l != null && l.text.isEmpty())
+ lines.add(l);
+
+ return lines;
+ }
+}
diff --git a/langtools/make/tools/propertiesparser/parser/MessageFile.java b/langtools/make/tools/propertiesparser/parser/MessageFile.java
new file mode 100644
index 00000000000..45e3384ba72
--- /dev/null
+++ b/langtools/make/tools/propertiesparser/parser/MessageFile.java
@@ -0,0 +1,60 @@
+/*
+ * Copyright (c) 2010, 2014, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+package propertiesparser.parser;
+
+import java.io.*;
+import java.nio.file.Files;
+import java.nio.file.Paths;
+import java.util.*;
+
+/**
+ * Class to facilitate manipulating compiler.properties.
+ */
+public class MessageFile {
+
+ MessageLine firstLine;
+ public Map messages = new TreeMap<>();
+ public File file;
+ public String keyPrefix;
+
+ public MessageFile(File file, String keyPrefix) throws IOException {
+ this.file = file;
+ this.keyPrefix = keyPrefix;
+ read(file);
+ }
+
+ final void read(File in) throws IOException {
+ MessageLine currLine = null;
+ for (String line : Files.readAllLines(in.toPath())) {
+ if (currLine == null)
+ firstLine = currLine = new MessageLine(line);
+ else
+ currLine = currLine.append(line);
+ if (line.startsWith(keyPrefix + ".")) {
+ int eq = line.indexOf("=");
+ if (eq > 0)
+ messages.put(line.substring(0, eq), new Message(currLine));
+ }
+ }
+ }
+}
diff --git a/langtools/make/tools/propertiesparser/parser/MessageInfo.java b/langtools/make/tools/propertiesparser/parser/MessageInfo.java
new file mode 100644
index 00000000000..e822510a9f1
--- /dev/null
+++ b/langtools/make/tools/propertiesparser/parser/MessageInfo.java
@@ -0,0 +1,125 @@
+/*
+ * Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+package propertiesparser.parser;
+
+import propertiesparser.parser.MessageType.CompoundType;
+import propertiesparser.parser.MessageType.OrType;
+import propertiesparser.parser.MessageType.SimpleType;
+import propertiesparser.parser.MessageType.UnionType;
+
+import java.util.ArrayList;
+import java.util.List;
+
+/**
+ * An object to represent the comment that may precede the property
+ * specification in a Message.
+ * The comment is modelled as a list of fields, where the fields correspond
+ * to the placeholder values (e.g. {0}, {1}, etc) within the message value.
+ */
+public final class MessageInfo {
+
+ /** The fields of the Info object. */
+ List types = new ArrayList<>();
+
+ MessageInfo(String text) throws IllegalArgumentException {
+ if (text != null) {
+ if (!text.startsWith("# "))
+ throw new IllegalArgumentException();
+ String[] segs = text.substring(2).split(", ");
+ types = new ArrayList<>();
+ for (String seg : segs) {
+ types.add(parseType(seg));
+ }
+ }
+ }
+
+ public List getTypes() {
+ return types;
+ }
+
+ boolean isEmpty() {
+ return types.isEmpty();
+ }
+
+ @Override
+ public String toString() {
+ return types.toString();
+ }
+
+ /**
+ * Split the type comment into multiple alternatives (separated by 'or') - then parse each of them
+ * individually and form an 'or' type.
+ */
+ MessageType parseType(String text) {
+ int commentStart = text.indexOf("(");
+ if (commentStart != -1) {
+ //remove optional comment
+ text = text.substring(0, commentStart);
+ }
+ text = text.substring(text.indexOf(": ") + 2);
+ String[] alternatives = text.split(" " + OrType.OR_NAME + " ");
+ MessageType[] types = new MessageType[alternatives.length];
+ for (int i = 0 ; i < alternatives.length ; i++) {
+ types[i] = parseAlternative(alternatives[i].trim());
+ }
+ return types.length > 1 ?
+ new OrType(types) : types[0];
+ }
+
+ /**
+ * Parse a subset of the type comment; valid matches are simple types, compound types,
+ * union types and custom types.
+ */
+ MessageType parseAlternative(String text) {
+ //try with custom types
+ if (text.charAt(0) == '\'') {
+ int end = text.indexOf('\'', 1);
+ return new MessageType.CustomType(text.substring(1, end));
+ }
+ //try with simple types
+ for (SimpleType st : SimpleType.values()) {
+ if (text.equals(st.kindName())) {
+ return st;
+ }
+ }
+ //try with compound types
+ for (CompoundType.Kind ck : CompoundType.Kind.values()) {
+ if (text.startsWith(ck.kindName)) {
+ MessageType elemtype = parseAlternative(text.substring(ck.kindName.length() + 1).trim());
+ return new CompoundType(ck, elemtype);
+ }
+ }
+ //try with union types
+ for (UnionType.Kind uk : UnionType.Kind.values()) {
+ if (text.startsWith(uk.kindName)) {
+ return new UnionType(uk);
+ }
+ }
+ //no match - report a warning
+ System.err.println("WARNING - unrecognized type: " + text);
+ return SimpleType.UNKNOWN;
+ }
+
+ /** Dummy message info to be used when no resource key comment is available. */
+ static final MessageInfo dummyInfo = new MessageInfo(null);
+}
diff --git a/langtools/make/tools/propertiesparser/parser/MessageLine.java b/langtools/make/tools/propertiesparser/parser/MessageLine.java
new file mode 100644
index 00000000000..b7751f9978b
--- /dev/null
+++ b/langtools/make/tools/propertiesparser/parser/MessageLine.java
@@ -0,0 +1,73 @@
+/*
+ * Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+package propertiesparser.parser;
+
+import java.util.regex.Pattern;
+
+/**
+ * A line of text within the message file.
+ * The lines form a doubly linked list for simple navigation.
+ */
+public class MessageLine {
+
+ static final Pattern emptyOrCommentPattern = Pattern.compile("( *#.*)?");
+ static final Pattern typePattern = Pattern.compile("[-\\\\'A-Z\\.a-z ]+( \\([A-Za-z 0-9]+\\))?");
+ static final Pattern infoPattern = Pattern.compile(String.format("# ([0-9]+: %s, )*[0-9]+: %s",
+ typePattern.pattern(), typePattern.pattern()));
+
+ public String text;
+ MessageLine prev;
+ MessageLine next;
+
+ MessageLine(String text) {
+ this.text = text;
+ }
+
+ public boolean isEmptyOrComment() {
+ return emptyOrCommentPattern.matcher(text).matches();
+ }
+
+ public boolean isInfo() {
+ return infoPattern.matcher(text).matches();
+ }
+
+ boolean hasContinuation() {
+ return (next != null) && text.endsWith("\\");
+ }
+
+ MessageLine append(String text) {
+ MessageLine l = new MessageLine(text);
+ append(l);
+ return l;
+ }
+
+ void append(MessageLine l) {
+ assert l.prev == null && l.next == null;
+ l.prev = this;
+ l.next = next;
+ if (next != null) {
+ next.prev = l;
+ }
+ next = l;
+ }
+}
diff --git a/langtools/make/tools/propertiesparser/parser/MessageType.java b/langtools/make/tools/propertiesparser/parser/MessageType.java
new file mode 100644
index 00000000000..6c70084349c
--- /dev/null
+++ b/langtools/make/tools/propertiesparser/parser/MessageType.java
@@ -0,0 +1,250 @@
+/*
+ * Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+package propertiesparser.parser;
+
+/**
+ * Common interface to all kinds of diagnostic argument types.
+ */
+public interface MessageType {
+
+ /**
+ * Visitor method.
+ */
+ R accept(Visitor v, A a);
+
+ /**
+ * The type as mentioned in the resource file.
+ */
+ String kindName();
+
+ /**
+ * A custom type is a type for which a predefined alternative does not exist. As such, it is an
+ * handy option when prototyping - but usages of custom types should be avoided in product-quality
+ * resource file comments.
+ *
+ * Example: 'com.sun.tools.javac.code.Flags.Flag'
+ */
+ public static class CustomType implements MessageType {
+
+ /** The string-based representation of this type. */
+ public String typeString;
+
+ public CustomType(String typeString) {
+ this.typeString = typeString;
+ }
+
+ @Override
+ public String kindName() {
+ return typeString;
+ }
+
+ @Override
+ public R accept(Visitor v, A a) {
+ return v.visitCustomType(this, a);
+ }
+ }
+
+ /**
+ * A predefined type. All common types mentioned in the resource file comments are meant to
+ * be included here.
+ */
+ public enum SimpleType implements MessageType {
+
+ BOOLEAN("boolean", "boolean", null),
+ FRAGMENT("fragment", "Fragment", null),
+ DIAGNOSTIC("diagnostic", "JCDiagnostic", "com.sun.tools.javac.util"),
+ MODIFIER("modifier", "Modifier", "javax.lang.model.element"),
+ FILE("file", "File", "java.io"),
+ FILE_OBJECT("file object", "JavaFileObject", "javax.tools"),
+ NAME("name", "Name", "com.sun.tools.javac.util"),
+ NUMBER("number", "int", null),
+ OPTION_NAME("option name", "Option", "com.sun.tools.javac.main"),
+ SOURCE_VERSION("source version", "Source", "com.sun.tools.javac.code"),
+ STRING("string", "String", null),
+ SYMBOL("symbol", "Symbol", "com.sun.tools.javac.code"),
+ SYMBOL_KIND("symbol kind", "Kind", "com.sun.tools.javac.code.Kinds"),
+ KIND_NAME("kind name", "KindName", "com.sun.tools.javac.code.Kinds"),
+ TOKEN("token", "TokenKind", "com.sun.tools.javac.parser.Tokens"),
+ TYPE("type", "Type", "com.sun.tools.javac.code"),
+ SET("set", "Set", "java.util"),
+ LIST("list", "List", "java.util"),
+ OBJECT("object", "Object", null),
+ UNUSED("unused", "Void", null),
+ UNKNOWN("", "UnknownType", null);
+
+ /** name of the predefined type as mentioned in the resource file. */
+ public final String kindName;
+
+ /** string-based representation of the type */
+ public final String clazz;
+
+ /** type qualifier (might be null) */
+ public final String qualifier;
+
+ SimpleType(String kindName, String clazz, String qualifier) {
+ this.kindName = kindName;
+ this.clazz = clazz;
+ this.qualifier = qualifier;
+ }
+
+ @Override
+ public String kindName() {
+ return kindName;
+ }
+
+ @Override
+ public R accept(Visitor v, A a) {
+ return v.visitSimpleType(this, a);
+ }
+ }
+
+ /**
+ * A compound type is a collection of some element type.
+ *
+ * Example: list of string
+ */
+ public static class CompoundType implements MessageType {
+
+ /**
+ * Compound type kind.
+ */
+ public enum Kind {
+ LIST("list of", SimpleType.LIST),
+ SET("set of", SimpleType.SET);
+
+ public final String kindName;
+ public final SimpleType clazz;
+
+ Kind(String kindName, SimpleType clazz) {
+ this.kindName = kindName;
+ this.clazz = clazz;
+ }
+ }
+
+ /** The compound type kind. */
+ public final Kind kind;
+
+ /** The element type. */
+ public final MessageType elemtype;
+
+ public CompoundType(Kind kind, MessageType elemtype) {
+ this.kind = kind;
+ this.elemtype = elemtype;
+ }
+
+ @Override
+ public String kindName() {
+ return kind.kindName;
+ }
+
+ @Override
+ public R accept(Visitor v, A a) {
+ return v.visitCompoundType(this, a);
+ }
+ }
+
+ /**
+ * A union type represents an alternative between two (or more) types. It can be useful to
+ * define the type of an argument which can assume multiple (unrelated) values; union types
+ * are only meant to be used in cases where the alternative comes up frequently enough in the
+ * resource file comments - in order to avoid cluttered comments.
+ *
+ * Example: message segment
+ */
+ public static class UnionType implements MessageType {
+
+ /**
+ * Union type kind.
+ */
+ public enum Kind {
+ MESSAGE_SEGMENT("message segment", SimpleType.DIAGNOSTIC, SimpleType.FRAGMENT),
+ FILE_NAME("file name", SimpleType.FILE, SimpleType.FILE_OBJECT);
+
+ final String kindName;
+ final SimpleType[] choices;
+
+ Kind(String kindName, SimpleType... choices) {
+ this.kindName = kindName;
+ this.choices = choices;
+ }
+ }
+
+ /** The union type kind. */
+ public final Kind kind;
+
+ /** The union type alternatives. */
+ public final MessageType[] choices;
+
+ UnionType(Kind kind) {
+ this(kind, kind.choices);
+ }
+
+ protected UnionType(Kind kind, MessageType[] choices) {
+ this.choices = choices;
+ this.kind = kind;
+ }
+
+ @Override
+ public String kindName() {
+ return kind.kindName;
+ }
+
+ @Override
+ public R accept(Visitor v, A a) {
+ return v.visitUnionType(this, a);
+ }
+ }
+
+ /**
+ * A subclass of union type representing 'explicit' alternatives in the resource file comments.
+ * Note: as the token 'or' is parsed with lowest priority, it is not possible, for instance,
+ * to form a compound type out of an 'or' type. In such cases a plain union type should be used
+ * instead.
+ *
+ * Examples: symbol or type
+ */
+ public static class OrType extends UnionType {
+
+ public static final String OR_NAME = "or";
+
+ @Override
+ public String kindName() {
+ return OR_NAME;
+ }
+
+ public OrType(MessageType... choices) {
+ super(null, choices);
+ }
+ }
+
+ /**
+ * Visitor class.
+ */
+ public static abstract class Visitor {
+ public abstract R visitCustomType(CustomType t, A a);
+ public abstract R visitSimpleType(SimpleType t, A a);
+ public abstract R visitCompoundType(CompoundType t, A a);
+ public abstract R visitUnionType(UnionType t, A a);
+ }
+}
diff --git a/langtools/make/tools/propertiesparser/resources/templates.properties b/langtools/make/tools/propertiesparser/resources/templates.properties
new file mode 100644
index 00000000000..f4715a5a839
--- /dev/null
+++ b/langtools/make/tools/propertiesparser/resources/templates.properties
@@ -0,0 +1,48 @@
+toplevel.decl=\
+ package {0};\n\
+ \n\
+ {1}\n\
+ import com.sun.tools.javac.util.JCDiagnostic.Error;\n\
+ import com.sun.tools.javac.util.JCDiagnostic.Warning;\n\
+ import com.sun.tools.javac.util.JCDiagnostic.Note;\n\
+ import com.sun.tools.javac.util.JCDiagnostic.Fragment;\n\
+ \n\
+ public class {2} '{'\n\
+ {3}\n\
+ '}'\n
+
+import.decl=\
+ import {0};
+
+nested.decl =\
+ public static class {0} '{'\n\
+ {1}\n\
+ '}'
+
+factory.decl.method=\
+ /**\n\
+ ' '* {5}\n\
+ ' '*/\n\
+ {0}public static {1} {2}({3}) '{'\n\
+ {4}\n\
+ '}'
+
+factory.decl.method.arg=\
+ arg{0}
+
+factory.decl.method.body=\
+ return new {0}({1}, {2}, {3});
+
+factory.decl.field=\
+ /**\n\
+ ' '* {4}\n\
+ ' '*/\n\
+ public static final {0} {1} = new {0}({2}, {3});
+
+wildcards.extends=\
+ {0} extends {1}>
+
+suppress.warnings=\
+ @SuppressWarnings("rawtypes")\n
+
+
diff --git a/langtools/src/java.compiler/share/classes/javax/tools/FileManagerUtils.java b/langtools/src/java.compiler/share/classes/javax/tools/FileManagerUtils.java
new file mode 100644
index 00000000000..fe8f6589c5d
--- /dev/null
+++ b/langtools/src/java.compiler/share/classes/javax/tools/FileManagerUtils.java
@@ -0,0 +1,76 @@
+/*
+ * Copyright (c) 2014, 2015, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation. Oracle designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Oracle in the LICENSE file that accompanied this code.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+package javax.tools;
+
+import java.io.File;
+import java.nio.file.Path;
+import java.util.Iterator;
+
+/**
+ * Package-private utility methods to convert between files and paths.
+ *
+ * @since 1.9
+ */
+class FileManagerUtils {
+ private FileManagerUtils() { }
+
+ static Iterable asPaths(final Iterable extends File> files) {
+ return () -> new Iterator() {
+ Iterator extends File> iter = files.iterator();
+
+ @Override
+ public boolean hasNext() {
+ return iter.hasNext();
+ }
+
+ @Override
+ public Path next() {
+ return iter.next().toPath();
+ }
+ };
+ }
+
+ static Iterable asFiles(final Iterable extends Path> paths) {
+ return () -> new Iterator() {
+ Iterator extends Path> iter = paths.iterator();
+
+ @Override
+ public boolean hasNext() {
+ return iter.hasNext();
+ }
+
+ @Override
+ public File next() {
+ Path p = iter.next();
+ try {
+ return p.toFile();
+ } catch (UnsupportedOperationException e) {
+ throw new IllegalArgumentException(p.toString(), e);
+ }
+ }
+ };
+ }
+}
diff --git a/langtools/src/java.compiler/share/classes/javax/tools/StandardJavaFileManager.java b/langtools/src/java.compiler/share/classes/javax/tools/StandardJavaFileManager.java
index 2b1ad4b7303..9701584805c 100644
--- a/langtools/src/java.compiler/share/classes/javax/tools/StandardJavaFileManager.java
+++ b/langtools/src/java.compiler/share/classes/javax/tools/StandardJavaFileManager.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2006, 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2006, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -27,13 +27,16 @@ package javax.tools;
import java.io.File;
import java.io.IOException;
-import java.util.*;
+import java.nio.file.Path;
+import java.util.Arrays;
+
+import static javax.tools.FileManagerUtils.*;
/**
- * File manager based on {@linkplain File java.io.File}. A common way
- * to obtain an instance of this class is using {@linkplain
- * JavaCompiler#getStandardFileManager
- * getStandardFileManager}, for example:
+ * File manager based on {@linkplain File java.io.File} and {@linkplain Path java.nio.file.Path}.
+ *
+ * A common way to obtain an instance of this class is using
+ * {@linkplain JavaCompiler#getStandardFileManager getStandardFileManager}, for example:
*
*
*
* Whereas these are not (reason in parentheses):
@@ -120,7 +123,7 @@ import java.util.*;
* and depend on the current directory)
*
*
- * jar:lib/vendorA.jar!com/vendora/LibraryClass.class
+ * jar:lib/vendorA.jar!/com/vendora/LibraryClass.class
* (the first half of the path depends on the current directory,
* whereas the component after ! is legal)
*
All implementations of this interface must support Path objects representing
+ * files in the {@linkplain java.nio.file.FileSystems#getDefault() default file system.}
+ * It is recommended that implementations should support Path objects from any filesystem.
+ *
* @author Peter von der Ahé
* @since 1.6
*/
@@ -147,11 +154,12 @@ public interface StandardJavaFileManager extends JavaFileManager {
* @param a a file object
* @param b a file object
* @return true if the given file objects represent the same
- * canonical file or zip file entry; false otherwise
+ * canonical file, zip file entry or path; false otherwise
*
* @throws IllegalArgumentException if either of the arguments
* were created with another file manager implementation
*/
+ @Override
boolean isSameFile(FileObject a, FileObject b);
/**
@@ -165,6 +173,27 @@ public interface StandardJavaFileManager extends JavaFileManager {
Iterable extends JavaFileObject> getJavaFileObjectsFromFiles(
Iterable extends File> files);
+ /**
+ * Returns file objects representing the given paths.
+ *
+ *
The default implementation converts each path to a file and calls
+ * {@link #getJavaFileObjectsFromFiles getJavaObjectsFromFiles}.
+ * IllegalArgumentException will be thrown if any of the paths
+ * cannot be converted to a file.
+ *
+ * @param paths a list of paths
+ * @return a list of file objects
+ * @throws IllegalArgumentException if the list of paths includes
+ * a directory or if this file manager does not support any of the
+ * given paths.
+ *
+ * @since 1.9
+ */
+ default Iterable extends JavaFileObject> getJavaFileObjectsFromPaths(
+ Iterable extends Path> paths) {
+ return getJavaFileObjectsFromFiles(asFiles(paths));
+ }
+
/**
* Returns file objects representing the given files.
* Convenience method equivalent to:
@@ -182,6 +211,27 @@ public interface StandardJavaFileManager extends JavaFileManager {
*/
Iterable extends JavaFileObject> getJavaFileObjects(File... files);
+ /**
+ * Returns file objects representing the given paths.
+ * Convenience method equivalent to:
+ *
+ *
+ *
+ * @param paths an array of paths
+ * @return a list of file objects
+ * @throws IllegalArgumentException if the array of files includes
+ * a directory
+ * @throws NullPointerException if the given array contains null
+ * elements
+ *
+ * @since 1.9
+ */
+ default Iterable extends JavaFileObject> getJavaFileObjects(Path... paths) {
+ return getJavaFileObjectsFromPaths(Arrays.asList(paths));
+ }
+
/**
* Returns file objects representing the given file names.
*
@@ -211,29 +261,94 @@ public interface StandardJavaFileManager extends JavaFileManager {
Iterable extends JavaFileObject> getJavaFileObjects(String... names);
/**
- * Associates the given path with the given location. Any
+ * Associates the given search path with the given location. Any
* previous value will be discarded.
*
* @param location a location
- * @param path a list of files, if {@code null} use the default
- * path for this location
+ * @param files a list of files, if {@code null} use the default
+ * search path for this location
* @see #getLocation
- * @throws IllegalArgumentException if location is an output
- * location and path does not contain exactly one element
- * @throws IOException if location is an output location and path
+ * @throws IllegalArgumentException if {@code location} is an output
+ * location and {@code files} does not contain exactly one element
+ * @throws IOException if {@code location} is an output location and
* does not represent an existing directory
*/
- void setLocation(Location location, Iterable extends File> path)
+ void setLocation(Location location, Iterable extends File> files)
throws IOException;
/**
- * Returns the path associated with the given location.
+ * Associates the given search path with the given location. Any
+ * previous value will be discarded.
+ *
+ *
The default implementation converts each path to a file and calls
+ * {@link #getJavaFileObjectsFromFiles getJavaObjectsFromFiles}.
+ * IllegalArgumentException will be thrown if any of the paths
+ * cannot be converted to a file.
+ *
+ * @param location a location
+ * @param paths a list of paths, if {@code null} use the default
+ * search path for this location
+ * @see #getLocation
+ * @throws IllegalArgumentException if {@code location} is an output
+ * location and {@code paths} does not contain exactly one element
+ * or if this file manager does not support any of the given paths
+ * @throws IOException if {@code location} is an output location and
+ * {@code paths} does not represent an existing directory
+ *
+ * @since 1.9
+ */
+ default void setLocationFromPaths(Location location, Iterable extends Path> paths)
+ throws IOException {
+ setLocation(location, asFiles(paths));
+ }
+
+ /**
+ * Returns the search path associated with the given location.
*
* @param location a location
* @return a list of files or {@code null} if this location has no
- * associated path
+ * associated search path
+ * @throws IllegalStateException if any element of the search path
+ * cannot be converted to a {@linkplain File}.
+ *
* @see #setLocation
+ * @see Path#toFile
*/
Iterable extends File> getLocation(Location location);
+ /**
+ * Returns the search path associated with the given location.
+ *
+ * @param location a location
+ * @return a list of paths or {@code null} if this location has no
+ * associated search path
+ *
+ * @see #setLocationFromPaths
+ * @since 1.9
+ */
+ default Iterable extends Path> getLocationAsPaths(Location location) {
+ return asPaths(getLocation(location));
+ }
+
+ /**
+ * Returns the path, if any, underlying this file object (optional operation).
+ * File objects derived from a {@link java.nio.file.FileSystem FileSystem},
+ * including the default file system, typically have a corresponding underlying
+ * {@link java.nio.file.Path Path} object. In such cases, this method may be
+ * used to access that object.
+ *
+ *
The default implementation throws {@link UnsupportedOperationException}
+ * for all files.
+ *
+ * @param file a file object
+ * @return a path representing the same underlying file system artifact
+ * @throws IllegalArgumentException if the file object does not have an underlying path
+ * @throws UnsupportedOperationException if the operation is not supported by this file manager
+ *
+ * @since 1.9
+ */
+ default Path asPath(FileObject file) {
+ throw new UnsupportedOperationException();
+ }
+
}
diff --git a/langtools/src/java.compiler/share/classes/javax/tools/ToolProvider.java b/langtools/src/java.compiler/share/classes/javax/tools/ToolProvider.java
index 46ab0c4a415..85da537519f 100644
--- a/langtools/src/java.compiler/share/classes/javax/tools/ToolProvider.java
+++ b/langtools/src/java.compiler/share/classes/javax/tools/ToolProvider.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2005, 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2005, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -92,6 +92,10 @@ public class ToolProvider {
/**
* Returns the Java™ programming language compiler provided
* with this platform.
+ *
The file manager returned by calling
+ * {@link JavaCompiler#getStandardFileManager getStandardFileManager}
+ * on this compiler supports paths provided by any
+ * {@linkplain java.nio.file.FileSystem filesystem}.
* @return the compiler provided with this platform or
* {@code null} if no compiler is provided
*/
@@ -105,6 +109,10 @@ public class ToolProvider {
/**
* Returns the Java™ programming language documentation tool provided
* with this platform.
+ *
The file manager returned by calling
+ * {@link DocumentationTool#getStandardFileManager getStandardFileManager}
+ * on this tool supports paths provided by any
+ * {@linkplain java.nio.file.FileSystem filesystem}.
* @return the documentation tool provided with this platform or
* {@code null} if no documentation tool is provided
*/
diff --git a/langtools/src/jdk.compiler/share/classes/com/sun/tools/javac/code/AnnoConstruct.java b/langtools/src/jdk.compiler/share/classes/com/sun/tools/javac/code/AnnoConstruct.java
index 58762a724f2..899cf827655 100644
--- a/langtools/src/jdk.compiler/share/classes/com/sun/tools/javac/code/AnnoConstruct.java
+++ b/langtools/src/jdk.compiler/share/classes/com/sun/tools/javac/code/AnnoConstruct.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2005, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2005, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -26,6 +26,7 @@ package com.sun.tools.javac.code;
import java.lang.annotation.Annotation;
import java.lang.annotation.Inherited;
+import java.lang.annotation.Repeatable;
import java.lang.reflect.InvocationTargetException;
import java.lang.reflect.Method;
@@ -183,65 +184,12 @@ public abstract class AnnoConstruct implements AnnotatedConstruct {
return c == null ? null : AnnotationProxyMaker.generateAnnotation(c, annoType);
}
- // Needed to unpack the runtime view of containing annotations
- private static final Class extends Annotation> REPEATABLE_CLASS = initRepeatable();
- private static final Method VALUE_ELEMENT_METHOD = initValueElementMethod();
-
- private static Class extends Annotation> initRepeatable() {
- try {
- // Repeatable will not be available when bootstrapping on
- // JDK 7 so use a reflective lookup instead of a class
- // literal for Repeatable.class.
- return Class.forName("java.lang.annotation.Repeatable").asSubclass(Annotation.class);
- } catch (ClassNotFoundException | SecurityException e) {
- return null;
- }
- }
-
- private static Method initValueElementMethod() {
- if (REPEATABLE_CLASS == null)
- return null;
-
- Method m = null;
- try {
- m = REPEATABLE_CLASS.getMethod("value");
- if (m != null)
- m.setAccessible(true);
- return m;
- } catch (NoSuchMethodException e) {
- return null;
- }
- }
-
-
// Helper to getAnnotationsByType
private static Class extends Annotation> getContainer(Class extends Annotation> annoType) {
- // Since we can not refer to java.lang.annotation.Repeatable until we are
- // bootstrapping with java 8 we need to get the Repeatable annotation using
- // reflective invocations instead of just using its type and element method.
- if (REPEATABLE_CLASS != null &&
- VALUE_ELEMENT_METHOD != null) {
- // Get the Repeatable instance on the annotations declaration
- Annotation repeatable = (Annotation)annoType.getAnnotation(REPEATABLE_CLASS);
- if (repeatable != null) {
- try {
- // Get the value element, it should be a class
- // indicating the containing annotation type
- @SuppressWarnings("unchecked")
- Class extends Annotation> containerType = (Class)VALUE_ELEMENT_METHOD.invoke(repeatable);
- if (containerType == null)
- return null;
-
- return containerType;
- } catch (ClassCastException | IllegalAccessException | InvocationTargetException e) {
- return null;
- }
- }
- }
- return null;
+ Repeatable repeatable = annoType.getAnnotation(Repeatable.class);
+ return (repeatable == null) ? null : repeatable.value();
}
-
// Helper to getAnnotationsByType
private static Attribute[] unpackAttributes(Attribute.Compound container) {
// We now have an instance of the container,
diff --git a/langtools/src/jdk.compiler/share/classes/com/sun/tools/javac/comp/Attr.java b/langtools/src/jdk.compiler/share/classes/com/sun/tools/javac/comp/Attr.java
index 7ea795423d0..815371baaa9 100644
--- a/langtools/src/jdk.compiler/share/classes/com/sun/tools/javac/comp/Attr.java
+++ b/langtools/src/jdk.compiler/share/classes/com/sun/tools/javac/comp/Attr.java
@@ -207,6 +207,7 @@ public class Attr extends JCTree.Visitor {
* are correct.
*
* @param tree The tree whose kind and type is checked
+ * @param found The computed type of the tree
* @param ownkind The computed kind of the tree
* @param resultInfo The expected result of the tree
*/
diff --git a/langtools/src/jdk.compiler/share/classes/com/sun/tools/javac/comp/Resolve.java b/langtools/src/jdk.compiler/share/classes/com/sun/tools/javac/comp/Resolve.java
index 65e166ff4c1..e327e286c67 100644
--- a/langtools/src/jdk.compiler/share/classes/com/sun/tools/javac/comp/Resolve.java
+++ b/langtools/src/jdk.compiler/share/classes/com/sun/tools/javac/comp/Resolve.java
@@ -39,7 +39,6 @@ import com.sun.tools.javac.comp.DeferredAttr.DeferredType;
import com.sun.tools.javac.comp.Infer.InferenceContext;
import com.sun.tools.javac.comp.Infer.FreeTypeListener;
import com.sun.tools.javac.comp.Resolve.MethodResolutionContext.Candidate;
-import com.sun.tools.javac.comp.Resolve.MethodResolutionDiagHelper.DiagnosticRewriter;
import com.sun.tools.javac.comp.Resolve.MethodResolutionDiagHelper.Template;
import com.sun.tools.javac.jvm.*;
import com.sun.tools.javac.main.Option;
@@ -55,11 +54,12 @@ import com.sun.tools.javac.util.JCDiagnostic.DiagnosticType;
import java.util.Arrays;
import java.util.Collection;
-import java.util.EnumMap;
import java.util.EnumSet;
import java.util.Iterator;
import java.util.LinkedHashMap;
import java.util.Map;
+import java.util.function.BiPredicate;
+import java.util.stream.Stream;
import javax.lang.model.element.ElementVisitor;
@@ -1008,7 +1008,7 @@ public class Resolve {
DeferredType dt = (DeferredType)found;
return dt.check(this);
} else {
- Type uResult = U(found.baseType());
+ Type uResult = U(found);
Type capturedType = pos == null || pos.getTree() == null ?
types.capture(uResult) :
checkContext.inferenceContext()
@@ -2546,17 +2546,7 @@ public class Resolve {
final JCDiagnostic details = sym.kind == WRONG_MTH ?
((InapplicableSymbolError)sym.baseSymbol()).errCandidate().snd :
null;
- sym = new InapplicableSymbolError(sym.kind, "diamondError", currentResolutionContext) {
- @Override
- JCDiagnostic getDiagnostic(DiagnosticType dkind, DiagnosticPosition pos,
- Symbol location, Type site, Name name, List argtypes, List typeargtypes) {
- String key = details == null ?
- "cant.apply.diamond" :
- "cant.apply.diamond.1";
- return diags.create(dkind, log.currentSource(), pos, key,
- diags.fragment("diamond", site.tsym), details);
- }
- };
+ sym = new DiamondError(sym, currentResolutionContext);
sym = accessMethod(sym, pos, site, names.init, true, argtypes, typeargtypes);
env.info.pendingResolutionPhase = currentResolutionContext.step;
}
@@ -3724,15 +3714,10 @@ public class Resolve {
else {
Pair c = errCandidate();
if (compactMethodDiags) {
- for (Map.Entry _entry :
- MethodResolutionDiagHelper.rewriters.entrySet()) {
- if (_entry.getKey().matches(c.snd)) {
- JCDiagnostic simpleDiag =
- _entry.getValue().rewriteDiagnostic(diags, pos,
- log.currentSource(), dkind, c.snd);
- simpleDiag.setFlag(DiagnosticFlag.COMPRESSED);
- return simpleDiag;
- }
+ JCDiagnostic simpleDiag =
+ MethodResolutionDiagHelper.rewrite(diags, pos, log.currentSource(), dkind, c.snd);
+ if (simpleDiag != null) {
+ return simpleDiag;
}
}
Symbol ws = c.fst.asMemberOf(site, types);
@@ -3765,9 +3750,8 @@ public class Resolve {
}
/**
- * ResolveError error class indicating that a set of symbols
- * (either methods, constructors or operands) is not applicable
- * given an actual arguments/type argument list.
+ * ResolveError error class indicating that a symbol (either methods, constructors or operand)
+ * is not applicable given an actual arguments/type argument list.
*/
class InapplicableSymbolsError extends InapplicableSymbolError {
@@ -3863,6 +3847,44 @@ public class Resolve {
}
}
+ /**
+ * DiamondError error class indicating that a constructor symbol is not applicable
+ * given an actual arguments/type argument list using diamond inference.
+ */
+ class DiamondError extends InapplicableSymbolError {
+
+ Symbol sym;
+
+ public DiamondError(Symbol sym, MethodResolutionContext context) {
+ super(sym.kind, "diamondError", context);
+ this.sym = sym;
+ }
+
+ JCDiagnostic getDetails() {
+ return (sym.kind == WRONG_MTH) ?
+ ((InapplicableSymbolError)sym.baseSymbol()).errCandidate().snd :
+ null;
+ }
+
+ @Override
+ JCDiagnostic getDiagnostic(DiagnosticType dkind, DiagnosticPosition pos,
+ Symbol location, Type site, Name name, List argtypes, List typeargtypes) {
+ JCDiagnostic details = getDetails();
+ if (details != null && compactMethodDiags) {
+ JCDiagnostic simpleDiag =
+ MethodResolutionDiagHelper.rewrite(diags, pos, log.currentSource(), dkind, details);
+ if (simpleDiag != null) {
+ return simpleDiag;
+ }
+ }
+ String key = details == null ?
+ "cant.apply.diamond" :
+ "cant.apply.diamond.1";
+ return diags.create(dkind, log.currentSource(), pos, key,
+ diags.fragment("diamond", site.tsym), details);
+ }
+ }
+
/**
* An InvalidSymbolError error class indicating that a symbol is not
* accessible from a given site
@@ -4146,6 +4168,28 @@ public class Resolve {
}
}
+ /**
+ * Common rewriter for all argument mismatch simplifications.
+ */
+ static class ArgMismatchRewriter implements DiagnosticRewriter {
+
+ /** the index of the subdiagnostic to be used as primary. */
+ int causeIndex;
+
+ public ArgMismatchRewriter(int causeIndex) {
+ this.causeIndex = causeIndex;
+ }
+
+ @Override
+ public JCDiagnostic rewriteDiagnostic(JCDiagnostic.Factory diags,
+ DiagnosticPosition preferedPos, DiagnosticSource preferredSource,
+ DiagnosticType preferredKind, JCDiagnostic d) {
+ JCDiagnostic cause = (JCDiagnostic)d.getArgs()[causeIndex];
+ return diags.create(preferredKind, preferredSource, d.getDiagnosticPosition(),
+ "prob.found.req", cause);
+ }
+ }
+
/** a dummy template that match any diagnostic argument */
static final Template skip = new Template("") {
@Override
@@ -4154,22 +4198,61 @@ public class Resolve {
}
};
+ /** template for matching inference-free arguments mismatch failures */
+ static final Template argMismatchTemplate = new Template(MethodCheckDiag.ARG_MISMATCH.regex(), skip);
+
+ /** template for matching inference related arguments mismatch failures */
+ static final Template inferArgMismatchTemplate = new Template(MethodCheckDiag.ARG_MISMATCH.regex(), skip, skip) {
+ @Override
+ boolean matches(Object o) {
+ if (!super.matches(o)) {
+ return false;
+ }
+ JCDiagnostic d = (JCDiagnostic)o;
+ @SuppressWarnings("unchecked")
+ List tvars = (List)d.getArgs()[0];
+ return !containsAny(d, tvars);
+ }
+
+ BiPredicate