aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEdward Nevill edward.nevill@linaro.org <Edward Nevill edward.nevill@linaro.org>2014-02-06 16:10:35 +0000
committerEdward Nevill edward.nevill@linaro.org <Edward Nevill edward.nevill@linaro.org>2014-02-06 16:10:35 +0000
commit720e3ba657fbfefacf83d5eb1e36a642244cb361 (patch)
tree96714e0deff684ac766ffd5ed82f38dbad2790db
parentab4882343f07ba0d214e63efec5764e35c4268c5 (diff)
parentc2d37d73537fc3b8bee585eb757a57e704f1fbba (diff)
Merge up to jdk8-b128jdk8_b128_aarch64_rc1
--HG-- rename : makefiles/BuildJaxws.gmk => make/BuildJaxws.gmk
-rw-r--r--.hgtags11
-rw-r--r--THIRD_PARTY_README1312
-rw-r--r--make/BuildJaxws.gmk (renamed from makefiles/BuildJaxws.gmk)0
-rw-r--r--make/Makefile181
-rw-r--r--make/jprt.properties46
-rw-r--r--make/scripts/update_src.sh90
-rw-r--r--makefiles/Makefile49
-rw-r--r--src/share/jaxws_classes/com/sun/tools/internal/jxc/model/nav/ApNavigator.java9
-rw-r--r--src/share/jaxws_classes/com/sun/tools/internal/xjc/model/nav/EagerNType.java3
-rw-r--r--src/share/jaxws_classes/com/sun/tools/internal/xjc/model/nav/NavigatorImpl.java10
-rw-r--r--src/share/jaxws_classes/com/sun/tools/internal/xjc/model/nav/Utils.java82
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/bind/api/JAXBRIContext.java3
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/bind/api/TypeReference.java7
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/bind/api/Utils.java82
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/bind/v2/model/impl/ModelBuilder.java13
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/bind/v2/model/impl/RuntimeAnyTypeImpl.java2
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/bind/v2/model/impl/RuntimeBuiltinLeafInfoImpl.java15
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/bind/v2/model/impl/RuntimeElementInfoImpl.java4
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/bind/v2/model/impl/RuntimeModelBuilder.java7
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/bind/v2/model/impl/RuntimeTypeInfoSetImpl.java7
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/bind/v2/model/impl/Utils.java82
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/bind/v2/model/nav/Navigator.java12
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/bind/v2/model/nav/ReflectionNavigator.java33
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/bind/v2/model/runtime/RuntimeTypeInfoSet.java2
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/ClassBeanInfoImpl.java3
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/ElementBeanInfoImpl.java5
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/JAXBContextImpl.java11
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/Utils.java82
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/property/ArrayProperty.java3
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/property/SingleMapNodeProperty.java65
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/property/Utils.java82
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/reflect/Accessor.java3
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/reflect/Lister.java7
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/reflect/TransducedAccessor.java4
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/reflect/Utils.java82
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/ws/fault/SOAPFaultBuilder.java45
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/ws/model/RuntimeModeler.java11
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/ws/model/Utils.java85
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/ws/model/WrapperBeanGenerator.java2
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/ws/spi/db/BindingHelper.java4
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/ws/spi/db/TypeInfo.java9
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/ws/spi/db/Utils.java85
-rw-r--r--src/share/jaxws_classes/javax/xml/bind/TypeConstraintException.java1
43 files changed, 1587 insertions, 1064 deletions
diff --git a/.hgtags b/.hgtags
index 76c1e977..f90aabbb 100644
--- a/.hgtags
+++ b/.hgtags
@@ -242,3 +242,14 @@ dbdd5c76250928582cb5342bcf7b299a6007d538 jdk8-b112
9ad289610fc6effe9076280b7920d0f16470709f jdk8-b114
e126d8eca69b83a1cc159c2375b7c33140346d2b jdk8-b115
587560c222a2476066852224ed02d39b5090a299 jdk8-b116
+fe56ba456fd32758c72db629938d69067468d89c jdk8-b117
+76a598cf50c4e1dc1fc8adc08b451943aa1a3179 jdk8-b118
+172b8e056ff259044ca48c5425d643dc8e2e05c8 jdk8-b119
+6c152deb600d8a11bc46149ace317b1c9fce1482 jdk8-b120
+32050ab53c8a8e4cb09f04b88db78258a480fb61 jdk8-b121
+bc622ba563f9316f981c11c3a260f4c3fdc5ef07 jdk8-b122
+91f5c542ccad330efc0d281362dd6f33f2039746 jdk8-b123
+ef71ecbcd7bc014b1be39a6d1b3a1fb663772c14 jdk8-b124
+ef71ecbcd7bc014b1be39a6d1b3a1fb663772c14 jdk8-b125
+7193a007a159ef9401b672af5c36c5b95e6e2943 jdk8-b126
+8e46fe36e17595c24ccdbde7b34e3cbfb6056b42 jdk8-b127
diff --git a/THIRD_PARTY_README b/THIRD_PARTY_README
index ee5463a9..a93b35b9 100644
--- a/THIRD_PARTY_README
+++ b/THIRD_PARTY_README
@@ -2,11 +2,12 @@ DO NOT TRANSLATE OR LOCALIZE.
-----------------------------
%% This notice is provided with respect to ASM Bytecode Manipulation
-Framework v3.1, which is included with JRE 7, JDK 7, and OpenJDK 7.
+Framework v5.0, which may be included with JRE 8, and JDK 8, and
+OpenJDK 8.
--- begin of LICENSE ---
-Copyright (c) 2000-2005 INRIA, France Telecom
+Copyright (c) 2000-2011 France Télécom
All rights reserved.
Redistribution and use in source and binary forms, with or without
@@ -40,8 +41,41 @@ THE POSSIBILITY OF SUCH DAMAGE.
--------------------------------------------------------------------------------
-%% This notice is provided with respect to CodeViewer 1.0, which is included
-with JDK 7.
+%% This notice is provided with respect to BSDiff v4.3, which may be
+included with JRE 8, JDK 8, and OpenJDK 8.
+
+--- begin of LICENSE ---
+
+Copyright 2003-2005 Colin Percival
+All rights reserved
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted providing that the following conditions
+are met:
+1. Redistributions of source code must retain the above copyright
+notice, this list of conditions and the following disclaimer.
+2. Redistributions in binary form must reproduce the above copyright
+notice, this list of conditions and the following disclaimer in the
+documentation and/or other materials provided with the distribution.
+
+THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
+IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY
+DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
+STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING
+IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+POSSIBILITY OF SUCH DAMAGE.
+
+--- end of LICENSE ---
+
+-------------------------------------------------------------------------------
+
+%% This notice is provided with respect to CodeViewer 1.0, which may be
+included with JDK 8.
--- begin of LICENSE ---
@@ -81,8 +115,8 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
-------------------------------------------------------------------------------
-%% This notice is provided with respect to Cryptix AES 3.2.0, which is
-included with JRE 7, JDK 7, and OpenJDK 7.
+%% This notice is provided with respect to Cryptix AES 3.2.0, which may be
+included with JRE 8, JDK 8, and OpenJDK 8.
--- begin of LICENSE ---
@@ -121,7 +155,7 @@ IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-------------------------------------------------------------------------------
%% This notice is provided with respect to CUP Parser Generator for
-Java 0.10k, which is included with JRE 7, JDK 7, and OpenJDK 7.
+Java 0.10k, which may be included with JRE 8, JDK 8, and OpenJDK 8.
--- begin of LICENSE ---
@@ -148,7 +182,7 @@ performance of this software.
-------------------------------------------------------------------------------
%% This notice is provided with respect to Document Object Model (DOM) Level 2
-& 3, which is included with JRE 7, JDK 7, and OpenJDK 7.
+& 3, which may be included with JRE 8, JDK 8, and OpenJDK 8.
--- begin of LICENSE ---
@@ -212,19 +246,52 @@ site-policy@w3.org.
-------------------------------------------------------------------------------
+%% This notice is provided with respect to Dynalink v0.5, which may be
+included with JRE 8, JDK 8, and OpenJDK 8.
+
+--- begin of LICENSE ---
+
+Copyright (c) 2009-2013, Attila Szegedi
+
+All rights reserved.Redistribution and use in source and binary forms, with or
+without modification, are permitted provided that the following conditions are
+met:* Redistributions of source code must retain the above copyright notice,
+this list of conditions and the following disclaimer. * Redistributions in
+binary form must reproduce the above copyright notice, this list of
+conditions and the following disclaimer in the documentation and/or other
+materials provided with the distribution. * Neither the name of Attila
+Szegedi nor the names of its contributors may be used to endorse or promote
+products derived from this software without specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"AND
+ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
+FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+OF THIS SOFTWARE, EVEN IF ADVISED OF THEPOSSIBILITY OF SUCH DAMAGE.
+
+--- end of LICENSE ---
+
+-------------------------------------------------------------------------------
+
%% This notice is provided with respect to Elliptic Curve Cryptography, which
-is included with JRE 7, JDK 7, and OpenJDK 7.
+may be included with JRE 8, JDK 8, and OpenJDK 8.
You are receiving a copy of the Elliptic Curve Cryptography library in source
-form with the JDK 7 source distribution and object code in the JRE 7 & JDK 7
-runtime.
+form with the JDK 8 and OpenJDK 8 source distributions, and as object code in
+the JRE 8 & JDK 8 runtimes.
+
+In the case of the JRE 8 & JDK 8 runtimes, the terms of the Oracle license do
+NOT apply to the Elliptic Curve Cryptography library; it is licensed under the
+following license, separately from Oracle's JDK & JRE. If you do not wish to
+install the Elliptic Curve Cryptography library, you may delete the library
+named libsunec.so (on Solaris and Linux systems) or sunec.dll (on Windows
+systems) from the JRE bin directory reserved for native libraries.
-The terms of the Oracle license do NOT apply to the Elliptic Curve
-Cryptography library program; it is licensed under the following license,
-separately from the Oracle programs you receive. If you do not wish to install
-this program, you may delete the library named libsunec.so (on Solaris and
-Linux systems) or sunec.dll (on Windows systems) from the JRE bin directory
-reserved for native libraries.
--- begin of LICENSE ---
@@ -735,13 +802,138 @@ That's all there is to it!
-------------------------------------------------------------------------------
-%% This notice is provided with respect to FontConfig 2.5, which is
-included with JRE 7, JDK 7, and OpenJDK 7 source distributions on
+%% This notice is provided with respect to ECMAScript Language
+Specification ECMA-262 Edition 5.1 which may be included with
+JRE 8, JDK 8, and OpenJDK 8.
+
+--- begin of LICENSE ---
+
+Copyright notice
+Copyright © 2011 Ecma International
+Ecma International
+Rue du Rhone 114
+CH-1204 Geneva
+Tel: +41 22 849 6000
+Fax: +41 22 849 6001
+Web: http://www.ecma-international.org
+
+This document and possible translations of it may be copied and furnished to
+others, and derivative works that comment on or otherwise explain it or assist
+in its implementation may be prepared, copied, published, and distributed, in
+whole or in part, without restriction of any kind, provided that the above
+copyright notice and this section are included on all such copies and derivative
+works. However, this document itself may not be modified in any way, including
+by removing the copyright notice or references to Ecma International, except as
+needed for the purpose of developing any document or deliverable produced by
+Ecma International (in which case the rules applied to copyrights must be
+followed) or as required to translate it into languages other than English. The
+limited permissions granted above are perpetual and will not be revoked by Ecma
+International or its successors or assigns. This document and the information
+contained herein is provided on an "AS IS" basis and ECMA INTERNATIONAL
+DISCLAIMS ALL WARRANTIES, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY
+WARRANTY THAT THE USE OF THE INFORMATION HEREIN WILL NOT INFRINGE ANY OWNERSHIP
+RIGHTS OR ANY IMPLIED WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR
+PURPOSE." Software License
+
+All Software contained in this document ("Software)" is protected by copyright
+and is being made available under the "BSD License", included below. This
+Software may be subject to third party rights (rights from parties other than
+Ecma International), including patent rights, and no licenses under such third
+party rights are granted under this license even if the third party concerned is
+a member of Ecma International. SEE THE ECMA CODE OF CONDUCT IN PATENT MATTERS
+AVAILABLE AT http://www.ecma-international.org/memento/codeofconduct.htm FOR
+INFORMATION REGARDING THE LICENSING OF PATENT CLAIMS THAT ARE REQUIRED TO
+IMPLEMENT ECMA INTERNATIONAL STANDARDS*. Redistribution and use in source and
+binary forms, with or without modification, are permitted provided that the
+following conditions are met:
+
+1. Redistributions of source code must retain the above copyright notice, this
+list of conditions and the following disclaimer.
+
+2. Redistributions in binary form must reproduce the above copyright notice,
+this list of conditions and the following disclaimer in the documentation and/or
+other materials provided with the distribution.
+
+3. Neither the name of the authors nor Ecma International may be used to endorse
+or promote products derived from this software without specific prior written
+permission.
+
+THIS SOFTWARE IS PROVIDED BY THE ECMA INTERNATIONAL "AS IS" AND ANY EXPRESS OR
+IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT
+SHALL ECMA INTERNATIONAL BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
+BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING
+IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY
+OF SUCH DAMAGE.
+--- end of LICENSE ---
+
+%% This notice is provided with respect to Dynalink library which is included
+with the Nashorn technology.
+
+--- begin of LICENSE ---
+Copyright (c) 2009-2013, Attila Szegedi
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are
+met:
+* Redistributions of source code must retain the above copyright
+ notice, this list of conditions and the following disclaimer.
+* Redistributions in binary form must reproduce the above copyright
+ notice, this list of conditions and the following disclaimer in the
+ documentation and/or other materials provided with the distribution.
+* Neither the name of the copyright holder nor the names of
+ contributors may be used to endorse or promote products derived from
+ this software without specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS
+IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
+TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
+PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL COPYRIGHT HOLDER
+BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
+BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
+OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+--- end of LICENSE ---
+
+%% This notice is provided with respect to Joni library which is included
+with the Nashorn technology.
+
+--- begin of LICENSE ---
+Permission is hereby granted, free of charge, to any person obtaining a copy of
+this software and associated documentation files (the "Software"), to deal in
+the Software without restriction, including without limitation the rights to
+use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
+of the Software, and to permit persons to whom the Software is furnished to do
+so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in all
+copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+SOFTWARE.
+
+--- end of LICENSE ---
+
+-------------------------------------------------------------------------------
+
+%% This notice is provided with respect to FontConfig 2.5, which may be
+included with JRE 8, JDK 8, and OpenJDK 8 source distributions on
Linux and Solaris.
--- begin of LICENSE ---
-Copyright © 2001,2003 Keith Packard
+Copyright © 2001,2003 Keith Packard
Permission to use, copy, modify, distribute, and sell this software and its
documentation for any purpose is hereby granted without fee, provided that the
@@ -765,7 +957,7 @@ CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
-------------------------------------------------------------------------------
%% This notice is provided with respect to IAIK PKCS#11 Wrapper,
-which is included with JRE 7, JDK 7, and OpenJDK 7.
+which may be included with JRE 8, JDK 8, and OpenJDK 8.
--- begin of LICENSE ---
@@ -816,7 +1008,7 @@ POSSIBILITY OF SUCH DAMAGE.
-------------------------------------------------------------------------------
%% This notice is provided with respect to ICU4C 4.0.1 and ICU4J 4.4, which
-is included with JRE 7, JDK 7, and OpenJDK 7.
+may be included with JRE 8, JDK 8, and OpenJDK 8.
--- begin of LICENSE ---
@@ -852,8 +1044,8 @@ their respective owners.
-------------------------------------------------------------------------------
-%% This notice is provided with respect to IJG JPEG 6b, which is
-included with JRE 7, JDK 7, and OpenJDK 7.
+%% This notice is provided with respect to IJG JPEG 6b, which may be
+included with JRE 8, JDK 8, and OpenJDK 8.
--- begin of LICENSE ---
@@ -891,8 +1083,35 @@ assumed by the product vendor.
--------------------------------------------------------------------------------
-%% This notice is provided with respect to JOpt-Simple v3.0, which is
-included with JRE 7, JDK 7, and OpenJDK 7.
+%% This notice is provided with respect to Joni v1.1.9, which may be
+included with JRE 8, JDK 8, and OpenJDK 8.
+
+--- begin of LICENSE ---
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in all
+copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+SOFTWARE.
+
+--- end of LICENSE ---
+
+-------------------------------------------------------------------------------
+
+%% This notice is provided with respect to JOpt-Simple v3.0, which may be
+included with JRE 8, JDK 8, and OpenJDK 8.
--- begin of LICENSE ---
@@ -921,8 +1140,39 @@ included with JRE 7, JDK 7, and OpenJDK 7.
--------------------------------------------------------------------------------
+%% This notice is provided with respect to JSON, which may be included
+with JRE 8 & JDK 8.
+
+--- begin of LICENSE ---
+
+Copyright (c) 2002 JSON.org
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in all
+copies or substantial portions of the Software.
+
+The Software shall be used for Good, not Evil.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+SOFTWARE.
+
+--- end of LICENSE ---
+
+-------------------------------------------------------------------------------
+
%% This notice is provided with respect to Kerberos functionality, which
-which is included with JRE 7, JDK 7, and OpenJDK 7.
+which may be included with JRE 8, JDK 8, and OpenJDK 8.
--- begin of LICENSE ---
@@ -934,7 +1184,7 @@ which is included with JRE 7, JDK 7, and OpenJDK 7.
-------------------------------------------------------------------------------
%% This notice is provided with respect to Kerberos functionality from
-FundsXpress, INC., which is included with JRE 7, JDK 7, and OpenJDK 7.
+FundsXpress, INC., which may be included with JRE 8, JDK 8, and OpenJDK 8.
--- begin of LICENSE ---
@@ -967,8 +1217,8 @@ FundsXpress, INC., which is included with JRE 7, JDK 7, and OpenJDK 7.
-------------------------------------------------------------------------------
-%% This notice is provided with respect to Kronos OpenGL headers, which is
-included with JDK 7 and OpenJDK 7 source distributions.
+%% This notice is provided with respect to Kronos OpenGL headers, which may be
+included with JDK 8 and OpenJDK 8 source distributions.
--- begin of LICENSE ---
@@ -1000,8 +1250,8 @@ included with JDK 7 and OpenJDK 7 source distributions.
-------------------------------------------------------------------------------
-%% This notice is provided with respect to libpng 1.2.18, which is
-included with JRE 7, JDK 7, and OpenJDK 7.
+%% This notice is provided with respect to libpng 1.5.4, which may be
+included with JRE 8, JDK 8, and OpenJDK 8.
--- begin of LICENSE ---
@@ -1014,8 +1264,10 @@ COPYRIGHT NOTICE, DISCLAIMER, and LICENSE:
If you modify libpng you may insert additional notices immediately following
this sentence.
-libpng versions 1.2.6, August 15, 2004, through 1.2.18, May 15, 2007, are
-Copyright (c) 2004, 2006-2007 Glenn Randers-Pehrson, and are
+This code is released under the libpng license.
+
+libpng versions 1.2.6, August 15, 2004, through 1.5.4, July 7, 2011, are
+Copyright (c) 2004, 2006-2011 Glenn Randers-Pehrson, and are
distributed according to the same disclaimer and license as libpng-1.2.5
with the following individual added to the list of Contributing Authors
@@ -1112,14 +1364,14 @@ certification mark of the Open Source Initiative.
Glenn Randers-Pehrson
glennrp at users.sourceforge.net
-May 15, 2007
+July 7, 2011
--- end of LICENSE ---
-------------------------------------------------------------------------------
-%% This notice is provided with respect to libungif 4.1.3, which is
-included with JRE 7, JDK 7, and OpenJDK 7.
+%% This notice is provided with respect to libungif 4.1.3, which may be
+included with JRE 8, JDK 8, and OpenJDK 8.
--- begin of LICENSE ---
@@ -1147,8 +1399,8 @@ THE SOFTWARE.
-------------------------------------------------------------------------------
-%% This notice is provided with respect to Little CMS 2.0, which is
-included with OpenJDK 7.
+%% This notice is provided with respect to Little CMS 2.4, which may be
+included with JRE 8, JDK 8, and OpenJDK 8.
--- begin of LICENSE ---
@@ -1183,7 +1435,7 @@ U.S. and other countries.
-------------------------------------------------------------------------------
%% This notice is provided with respect to Mesa 3D Graphics Library v4.1,
-which is included with JRE 7, JDK 7, and OpenJDK 7 source distributions.
+which may be included with JRE 8, JDK 8, and OpenJDK 8 source distributions.
--- begin of LICENSE ---
@@ -1213,8 +1465,402 @@ which is included with JRE 7, JDK 7, and OpenJDK 7 source distributions.
-------------------------------------------------------------------------------
+%% This notice is provided with respect to Mozilla Network Security
+Services (NSS), which is supplied with the JDK test suite in the OpenJDK
+source code repository. It is licensed under Mozilla Public License (MPL),
+version 2.0.
+
+The NSS libraries are supplied in executable form, built from unmodified
+NSS source code labeled with the "NSS_3.13.1_RTM" release tag.
+
+The NSS source code is available in the OpenJDK source code repository at:
+ jdk/test/sun/security/pkcs11/nss/src
+
+The NSS libraries are available in the OpenJDK source code repository at:
+ jdk/test/sun/security/pkcs11/nss/lib
+
+--- begin of LICENSE ---
+
+Mozilla Public License Version 2.0
+==================================
+
+1. Definitions
+--------------
+
+1.1. "Contributor"
+ means each individual or legal entity that creates, contributes to
+ the creation of, or owns Covered Software.
+
+1.2. "Contributor Version"
+ means the combination of the Contributions of others (if any) used
+ by a Contributor and that particular Contributor's Contribution.
+
+1.3. "Contribution"
+ means Covered Software of a particular Contributor.
+
+1.4. "Covered Software"
+ means Source Code Form to which the initial Contributor has attached
+ the notice in Exhibit A, the Executable Form of such Source Code
+ Form, and Modifications of such Source Code Form, in each case
+ including portions thereof.
+
+1.5. "Incompatible With Secondary Licenses"
+ means
+
+ (a) that the initial Contributor has attached the notice described
+ in Exhibit B to the Covered Software; or
+
+ (b) that the Covered Software was made available under the terms of
+ version 1.1 or earlier of the License, but not also under the
+ terms of a Secondary License.
+
+1.6. "Executable Form"
+ means any form of the work other than Source Code Form.
+
+1.7. "Larger Work"
+ means a work that combines Covered Software with other material, in
+ a separate file or files, that is not Covered Software.
+
+1.8. "License"
+ means this document.
+
+1.9. "Licensable"
+ means having the right to grant, to the maximum extent possible,
+ whether at the time of the initial grant or subsequently, any and
+ all of the rights conveyed by this License.
+
+1.10. "Modifications"
+ means any of the following:
+
+ (a) any file in Source Code Form that results from an addition to,
+ deletion from, or modification of the contents of Covered
+ Software; or
+
+ (b) any new file in Source Code Form that contains any Covered
+ Software.
+
+1.11. "Patent Claims" of a Contributor
+ means any patent claim(s), including without limitation, method,
+ process, and apparatus claims, in any patent Licensable by such
+ Contributor that would be infringed, but for the grant of the
+ License, by the making, using, selling, offering for sale, having
+ made, import, or transfer of either its Contributions or its
+ Contributor Version.
+
+1.12. "Secondary License"
+ means either the GNU General Public License, Version 2.0, the GNU
+ Lesser General Public License, Version 2.1, the GNU Affero General
+ Public License, Version 3.0, or any later versions of those
+ licenses.
+
+1.13. "Source Code Form"
+ means the form of the work preferred for making modifications.
+
+1.14. "You" (or "Your")
+ means an individual or a legal entity exercising rights under this
+ License. For legal entities, "You" includes any entity that
+ controls, is controlled by, or is under common control with You. For
+ purposes of this definition, "control" means (a) the power, direct
+ or indirect, to cause the direction or management of such entity,
+ whether by contract or otherwise, or (b) ownership of more than
+ fifty percent (50%) of the outstanding shares or beneficial
+ ownership of such entity.
+
+2. License Grants and Conditions
+--------------------------------
+
+2.1. Grants
+
+Each Contributor hereby grants You a world-wide, royalty-free,
+non-exclusive license:
+
+(a) under intellectual property rights (other than patent or trademark)
+ Licensable by such Contributor to use, reproduce, make available,
+ modify, display, perform, distribute, and otherwise exploit its
+ Contributions, either on an unmodified basis, with Modifications, or
+ as part of a Larger Work; and
+
+(b) under Patent Claims of such Contributor to make, use, sell, offer
+ for sale, have made, import, and otherwise transfer either its
+ Contributions or its Contributor Version.
+
+2.2. Effective Date
+
+The licenses granted in Section 2.1 with respect to any Contribution
+become effective for each Contribution on the date the Contributor first
+distributes such Contribution.
+
+2.3. Limitations on Grant Scope
+
+The licenses granted in this Section 2 are the only rights granted under
+this License. No additional rights or licenses will be implied from the
+distribution or licensing of Covered Software under this License.
+Notwithstanding Section 2.1(b) above, no patent license is granted by a
+Contributor:
+
+(a) for any code that a Contributor has removed from Covered Software;
+ or
+
+(b) for infringements caused by: (i) Your and any other third party's
+ modifications of Covered Software, or (ii) the combination of its
+ Contributions with other software (except as part of its Contributor
+ Version); or
+
+(c) under Patent Claims infringed by Covered Software in the absence of
+ its Contributions.
+
+This License does not grant any rights in the trademarks, service marks,
+or logos of any Contributor (except as may be necessary to comply with
+the notice requirements in Section 3.4).
+
+2.4. Subsequent Licenses
+
+No Contributor makes additional grants as a result of Your choice to
+distribute the Covered Software under a subsequent version of this
+License (see Section 10.2) or under the terms of a Secondary License (if
+permitted under the terms of Section 3.3).
+
+2.5. Representation
+
+Each Contributor represents that the Contributor believes its
+Contributions are its original creation(s) or it has sufficient rights
+to grant the rights to its Contributions conveyed by this License.
+
+2.6. Fair Use
+
+This License is not intended to limit any rights You have under
+applicable copyright doctrines of fair use, fair dealing, or other
+equivalents.
+
+2.7. Conditions
+
+Sections 3.1, 3.2, 3.3, and 3.4 are conditions of the licenses granted
+in Section 2.1.
+
+3. Responsibilities
+-------------------
+
+3.1. Distribution of Source Form
+
+All distribution of Covered Software in Source Code Form, including any
+Modifications that You create or to which You contribute, must be under
+the terms of this License. You must inform recipients that the Source
+Code Form of the Covered Software is governed by the terms of this
+License, and how they can obtain a copy of this License. You may not
+attempt to alter or restrict the recipients' rights in the Source Code
+Form.
+
+3.2. Distribution of Executable Form
+
+If You distribute Covered Software in Executable Form then:
+
+(a) such Covered Software must also be made available in Source Code
+ Form, as described in Section 3.1, and You must inform recipients of
+ the Executable Form how they can obtain a copy of such Source Code
+ Form by reasonable means in a timely manner, at a charge no more
+ than the cost of distribution to the recipient; and
+
+(b) You may distribute such Executable Form under the terms of this
+ License, or sublicense it under different terms, provided that the
+ license for the Executable Form does not attempt to limit or alter
+ the recipients' rights in the Source Code Form under this License.
+
+3.3. Distribution of a Larger Work
+
+You may create and distribute a Larger Work under terms of Your choice,
+provided that You also comply with the requirements of this License for
+the Covered Software. If the Larger Work is a combination of Covered
+Software with a work governed by one or more Secondary Licenses, and the
+Covered Software is not Incompatible With Secondary Licenses, this
+License permits You to additionally distribute such Covered Software
+under the terms of such Secondary License(s), so that the recipient of
+the Larger Work may, at their option, further distribute the Covered
+Software under the terms of either this License or such Secondary
+License(s).
+
+3.4. Notices
+
+You may not remove or alter the substance of any license notices
+(including copyright notices, patent notices, disclaimers of warranty,
+or limitations of liability) contained within the Source Code Form of
+the Covered Software, except that You may alter any license notices to
+the extent required to remedy known factual inaccuracies.
+
+3.5. Application of Additional Terms
+
+You may choose to offer, and to charge a fee for, warranty, support,
+indemnity or liability obligations to one or more recipients of Covered
+Software. However, You may do so only on Your own behalf, and not on
+behalf of any Contributor. You must make it absolutely clear that any
+such warranty, support, indemnity, or liability obligation is offered by
+You alone, and You hereby agree to indemnify every Contributor for any
+liability incurred by such Contributor as a result of warranty, support,
+indemnity or liability terms You offer. You may include additional
+disclaimers of warranty and limitations of liability specific to any
+jurisdiction.
+
+4. Inability to Comply Due to Statute or Regulation
+---------------------------------------------------
+
+If it is impossible for You to comply with any of the terms of this
+License with respect to some or all of the Covered Software due to
+statute, judicial order, or regulation then You must: (a) comply with
+the terms of this License to the maximum extent possible; and (b)
+describe the limitations and the code they affect. Such description must
+be placed in a text file included with all distributions of the Covered
+Software under this License. Except to the extent prohibited by statute
+or regulation, such description must be sufficiently detailed for a
+recipient of ordinary skill to be able to understand it.
+
+5. Termination
+--------------
+
+5.1. The rights granted under this License will terminate automatically
+if You fail to comply with any of its terms. However, if You become
+compliant, then the rights granted under this License from a particular
+Contributor are reinstated (a) provisionally, unless and until such
+Contributor explicitly and finally terminates Your grants, and (b) on an
+ongoing basis, if such Contributor fails to notify You of the
+non-compliance by some reasonable means prior to 60 days after You have
+come back into compliance. Moreover, Your grants from a particular
+Contributor are reinstated on an ongoing basis if such Contributor
+notifies You of the non-compliance by some reasonable means, this is the
+first time You have received notice of non-compliance with this License
+from such Contributor, and You become compliant prior to 30 days after
+Your receipt of the notice.
+
+5.2. If You initiate litigation against any entity by asserting a patent
+infringement claim (excluding declaratory judgment actions,
+counter-claims, and cross-claims) alleging that a Contributor Version
+directly or indirectly infringes any patent, then the rights granted to
+You by any and all Contributors for the Covered Software under Section
+2.1 of this License shall terminate.
+
+5.3. In the event of termination under Sections 5.1 or 5.2 above, all
+end user license agreements (excluding distributors and resellers) which
+have been validly granted by You or Your distributors under this License
+prior to termination shall survive termination.
+
+************************************************************************
+* *
+* 6. Disclaimer of Warranty *
+* ------------------------- *
+* *
+* Covered Software is provided under this License on an "as is" *
+* basis, without warranty of any kind, either expressed, implied, or *
+* statutory, including, without limitation, warranties that the *
+* Covered Software is free of defects, merchantable, fit for a *
+* particular purpose or non-infringing. The entire risk as to the *
+* quality and performance of the Covered Software is with You. *
+* Should any Covered Software prove defective in any respect, You *
+* (not any Contributor) assume the cost of any necessary servicing, *
+* repair, or correction. This disclaimer of warranty constitutes an *
+* essential part of this License. No use of any Covered Software is *
+* authorized under this License except under this disclaimer. *
+* *
+************************************************************************
+
+************************************************************************
+* *
+* 7. Limitation of Liability *
+* -------------------------- *
+* *
+* Under no circumstances and under no legal theory, whether tort *
+* (including negligence), contract, or otherwise, shall any *
+* Contributor, or anyone who distributes Covered Software as *
+* permitted above, be liable to You for any direct, indirect, *
+* special, incidental, or consequential damages of any character *
+* including, without limitation, damages for lost profits, loss of *
+* goodwill, work stoppage, computer failure or malfunction, or any *
+* and all other commercial damages or losses, even if such party *
+* shall have been informed of the possibility of such damages. This *
+* limitation of liability shall not apply to liability for death or *
+* personal injury resulting from such party's negligence to the *
+* extent applicable law prohibits such limitation. Some *
+* jurisdictions do not allow the exclusion or limitation of *
+* incidental or consequential damages, so this exclusion and *
+* limitation may not apply to You. *
+* *
+************************************************************************
+
+8. Litigation
+-------------
+
+Any litigation relating to this License may be brought only in the
+courts of a jurisdiction where the defendant maintains its principal
+place of business and such litigation shall be governed by laws of that
+jurisdiction, without reference to its conflict-of-law provisions.
+Nothing in this Section shall prevent a party's ability to bring
+cross-claims or counter-claims.
+
+9. Miscellaneous
+----------------
+
+This License represents the complete agreement concerning the subject
+matter hereof. If any provision of this License is held to be
+unenforceable, such provision shall be reformed only to the extent
+necessary to make it enforceable. Any law or regulation which provides
+that the language of a contract shall be construed against the drafter
+shall not be used to construe this License against a Contributor.
+
+10. Versions of the License
+---------------------------
+
+10.1. New Versions
+
+Mozilla Foundation is the license steward. Except as provided in Section
+10.3, no one other than the license steward has the right to modify or
+publish new versions of this License. Each version will be given a
+distinguishing version number.
+
+10.2. Effect of New Versions
+
+You may distribute the Covered Software under the terms of the version
+of the License under which You originally received the Covered Software,
+or under the terms of any subsequent version published by the license
+steward.
+
+10.3. Modified Versions
+
+If you create software not governed by this License, and you want to
+create a new license for such software, you may create and use a
+modified version of this License if you rename the license and remove
+any references to the name of the license steward (except to note that
+such modified license differs from this License).
+
+10.4. Distributing Source Code Form that is Incompatible With Secondary
+Licenses
+
+If You choose to distribute Source Code Form that is Incompatible With
+Secondary Licenses under the terms of this version of the License, the
+notice described in Exhibit B of this License must be attached.
+
+Exhibit A - Source Code Form License Notice
+-------------------------------------------
+
+ This Source Code Form is subject to the terms of the Mozilla Public
+ License, v. 2.0. If a copy of the MPL was not distributed with this
+ file, You can obtain one at http://mozilla.org/MPL/2.0/.
+
+If it is not possible or desirable to put the notice in a particular
+file, then You may include the notice in a location (such as a LICENSE
+file in a relevant directory) where a recipient would be likely to look
+for such a notice.
+
+You may add additional accurate notices of copyright ownership.
+
+Exhibit B - "Incompatible With Secondary Licenses" Notice
+---------------------------------------------------------
+
+ This Source Code Form is "Incompatible With Secondary Licenses", as
+ defined by the Mozilla Public License, v. 2.0.
+
+--- end of LICENSE ---
+
+-------------------------------------------------------------------------------
+
%% This notice is provided with respect to PC/SC Lite for Suse Linux v.1.1.1,
-which is included with JRE 7, JDK 7, and OpenJDK 7 on Linux and Solaris.
+which may be included with JRE 8, JDK 8, and OpenJDK 8 on Linux and Solaris.
--- begin of LICENSE ---
@@ -1257,8 +1903,30 @@ THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-------------------------------------------------------------------------------
+%% This notice is provided with respect to PorterStemmer v4, which may be
+included with JRE 8, JDK 8, and OpenJDK 8.
+
+--- begin of LICENSE ---
+
+See: http://tartarus.org/~martin/PorterStemmer
+
+The software is completely free for any purpose, unless notes at the head of
+the program text indicates otherwise (which is rare). In any case, the notes
+about licensing are never more restrictive than the BSD License.
+
+In every case where the software is not written by me (Martin Porter), this
+licensing arrangement has been endorsed by the contributor, and it is
+therefore unnecessary to ask the contributor again to confirm it.
+
+I have not asked any contributors (or their employers, if they have them) for
+proofs that they have the right to distribute their software in this way.
+
+--- end of LICENSE ---
+
+-------------------------------------------------------------------------------
+
%% This notice is provided with respect to Relax NG Object/Parser v.20050510,
-which is included with JRE 7, JDK 7, and OpenJDK 7.
+which may be included with JRE 8, JDK 8, and OpenJDK 8.
--- begin of LICENSE ---
@@ -1285,8 +1953,8 @@ SOFTWARE.
-------------------------------------------------------------------------------
-%% This notice is provided with respect to RelaxNGCC v1.12, which is
-included with JRE 7, JDK 7, and OpenJDK 7.
+%% This notice is provided with respect to RelaxNGCC v1.12, which may be
+included with JRE 8, JDK 8, and OpenJDK 8.
--- begin of LICENSE ---
@@ -1335,487 +2003,8 @@ EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-------------------------------------------------------------------------------
-%% This notice is provided with respect to Mozilla Rhino v1.7R3, which
-is included with JRE 7, JDK 7, and OpenJDK 7
-
---- begin of LICENSE ---
-
- MOZILLA PUBLIC LICENSE
- Version 1.1
-
- ---------------
-
-1. Definitions.
-
- 1.0.1. "Commercial Use" means distribution or otherwise making the
- Covered Code available to a third party.
-
- 1.1. "Contributor" means each entity that creates or contributes to
- the creation of Modifications.
-
- 1.2. "Contributor Version" means the combination of the Original
- Code, prior Modifications used by a Contributor, and the Modifications
- made by that particular Contributor.
-
- 1.3. "Covered Code" means the Original Code or Modifications or the
- combination of the Original Code and Modifications, in each case
- including portions thereof.
-
- 1.4. "Electronic Distribution Mechanism" means a mechanism generally
- accepted in the software development community for the electronic
- transfer of data.
-
- 1.5. "Executable" means Covered Code in any form other than Source
- Code.
-
- 1.6. "Initial Developer" means the individual or entity identified
- as the Initial Developer in the Source Code notice required by Exhibit
- A.
-
- 1.7. "Larger Work" means a work which combines Covered Code or
- portions thereof with code not governed by the terms of this License.
-
- 1.8. "License" means this document.
-
- 1.8.1. "Licensable" means having the right to grant, to the maximum
- extent possible, whether at the time of the initial grant or
- subsequently acquired, any and all of the rights conveyed herein.
-
- 1.9. "Modifications" means any addition to or deletion from the
- substance or structure of either the Original Code or any previous
- Modifications. When Covered Code is released as a series of files, a
- Modification is:
- A. Any addition to or deletion from the contents of a file
- containing Original Code or previous Modifications.
-
- B. Any new file that contains any part of the Original Code or
- previous Modifications.
-
- 1.10. "Original Code" means Source Code of computer software code
- which is described in the Source Code notice required by Exhibit A as
- Original Code, and which, at the time of its release under this
- License is not already Covered Code governed by this License.
-
- 1.10.1. "Patent Claims" means any patent claim(s), now owned or
- hereafter acquired, including without limitation, method, process,
- and apparatus claims, in any patent Licensable by grantor.
-
- 1.11. "Source Code" means the preferred form of the Covered Code for
- making modifications to it, including all modules it contains, plus
- any associated interface definition files, scripts used to control
- compilation and installation of an Executable, or source code
- differential comparisons against either the Original Code or another
- well known, available Covered Code of the Contributor's choice. The
- Source Code can be in a compressed or archival form, provided the
- appropriate decompression or de-archiving software is widely available
- for no charge.
-
- 1.12. "You" (or "Your") means an individual or a legal entity
- exercising rights under, and complying with all of the terms of, this
- License or a future version of this License issued under Section 6.1.
- For legal entities, "You" includes any entity which controls, is
- controlled by, or is under common control with You. For purposes of
- this definition, "control" means (a) the power, direct or indirect,
- to cause the direction or management of such entity, whether by
- contract or otherwise, or (b) ownership of more than fifty percent
- (50%) of the outstanding shares or beneficial ownership of such
- entity.
-
-2. Source Code License.
-
- 2.1. The Initial Developer Grant.
- The Initial Developer hereby grants You a world-wide, royalty-free,
- non-exclusive license, subject to third party intellectual property
- claims:
- (a) under intellectual property rights (other than patent or
- trademark) Licensable by Initial Developer to use, reproduce,
- modify, display, perform, sublicense and distribute the Original
- Code (or portions thereof) with or without Modifications, and/or
- as part of a Larger Work; and
-
- (b) under Patents Claims infringed by the making, using or
- selling of Original Code, to make, have made, use, practice,
- sell, and offer for sale, and/or otherwise dispose of the
- Original Code (or portions thereof).
-
- (c) the licenses granted in this Section 2.1(a) and (b) are
- effective on the date Initial Developer first distributes
- Original Code under the terms of this License.
-
- (d) Notwithstanding Section 2.1(b) above, no patent license is
- granted: 1) for code that You delete from the Original Code; 2)
- separate from the Original Code; or 3) for infringements caused
- by: i) the modification of the Original Code or ii) the
- combination of the Original Code with other software or devices.
-
- 2.2. Contributor Grant.
- Subject to third party intellectual property claims, each Contributor
- hereby grants You a world-wide, royalty-free, non-exclusive license
-
- (a) under intellectual property rights (other than patent or
- trademark) Licensable by Contributor, to use, reproduce, modify,
- display, perform, sublicense and distribute the Modifications
- created by such Contributor (or portions thereof) either on an
- unmodified basis, with other Modifications, as Covered Code
- and/or as part of a Larger Work; and
-
- (b) under Patent Claims infringed by the making, using, or
- selling of Modifications made by that Contributor either alone
- and/or in combination with its Contributor Version (or portions
- of such combination), to make, use, sell, offer for sale, have
- made, and/or otherwise dispose of: 1) Modifications made by that
- Contributor (or portions thereof); and 2) the combination of
- Modifications made by that Contributor with its Contributor
- Version (or portions of such combination).
-
- (c) the licenses granted in Sections 2.2(a) and 2.2(b) are
- effective on the date Contributor first makes Commercial Use of
- the Covered Code.
-
- (d) Notwithstanding Section 2.2(b) above, no patent license is
- granted: 1) for any code that Contributor has deleted from the
- Contributor Version; 2) separate from the Contributor Version;
- 3) for infringements caused by: i) third party modifications of
- Contributor Version or ii) the combination of Modifications made
- by that Contributor with other software (except as part of the
- Contributor Version) or other devices; or 4) under Patent Claims
- infringed by Covered Code in the absence of Modifications made by
- that Contributor.
-
-3. Distribution Obligations.
-
- 3.1. Application of License.
- The Modifications which You create or to which You contribute are
- governed by the terms of this License, including without limitation
- Section 2.2. The Source Code version of Covered Code may be
- distributed only under the terms of this License or a future version
- of this License released under Section 6.1, and You must include a
- copy of this License with every copy of the Source Code You
- distribute. You may not offer or impose any terms on any Source Code
- version that alters or restricts the applicable version of this
- License or the recipients' rights hereunder. However, You may include
- an additional document offering the additional rights described in
- Section 3.5.
-
- 3.2. Availability of Source Code.
- Any Modification which You create or to which You contribute must be
- made available in Source Code form under the terms of this License
- either on the same media as an Executable version or via an accepted
- Electronic Distribution Mechanism to anyone to whom you made an
- Executable version available; and if made available via Electronic
- Distribution Mechanism, must remain available for at least twelve (12)
- months after the date it initially became available, or at least six
- (6) months after a subsequent version of that particular Modification
- has been made available to such recipients. You are responsible for
- ensuring that the Source Code version remains available even if the
- Electronic Distribution Mechanism is maintained by a third party.
-
- 3.3. Description of Modifications.
- You must cause all Covered Code to which You contribute to contain a
- file documenting the changes You made to create that Covered Code and
- the date of any change. You must include a prominent statement that
- the Modification is derived, directly or indirectly, from Original
- Code provided by the Initial Developer and including the name of the
- Initial Developer in (a) the Source Code, and (b) in any notice in an
- Executable version or related documentation in which You describe the
- origin or ownership of the Covered Code.
-
- 3.4. Intellectual Property Matters
- (a) Third Party Claims.
- If Contributor has knowledge that a license under a third party's
- intellectual property rights is required to exercise the rights
- granted by such Contributor under Sections 2.1 or 2.2,
- Contributor must include a text file with the Source Code
- distribution titled "LEGAL" which describes the claim and the
- party making the claim in sufficient detail that a recipient will
- know whom to contact. If Contributor obtains such knowledge after
- the Modification is made available as described in Section 3.2,
- Contributor shall promptly modify the LEGAL file in all copies
- Contributor makes available thereafter and shall take other steps
- (such as notifying appropriate mailing lists or newsgroups)
- reasonably calculated to inform those who received the Covered
- Code that new knowledge has been obtained.
-
- (b) Contributor APIs.
- If Contributor's Modifications include an application programming
- interface and Contributor has knowledge of patent licenses which
- are reasonably necessary to implement that API, Contributor must
- also include this information in the LEGAL file.
-
- (c) Representations.
- Contributor represents that, except as disclosed pursuant to
- Section 3.4(a) above, Contributor believes that Contributor's
- Modifications are Contributor's original creation(s) and/or
- Contributor has sufficient rights to grant the rights conveyed by
- this License.
-
- 3.5. Required Notices.
- You must duplicate the notice in Exhibit A in each file of the Source
- Code. If it is not possible to put such notice in a particular Source
- Code file due to its structure, then You must include such notice in a
- location (such as a relevant directory) where a user would be likely
- to look for such a notice. If You created one or more Modification(s)
- You may add your name as a Contributor to the notice described in
- Exhibit A. You must also duplicate this License in any documentation
- for the Source Code where You describe recipients' rights or ownership
- rights relating to Covered Code. You may choose to offer, and to
- charge a fee for, warranty, support, indemnity or liability
- obligations to one or more recipients of Covered Code. However, You
- may do so only on Your own behalf, and not on behalf of the Initial
- Developer or any Contributor. You must make it absolutely clear than
- any such warranty, support, indemnity or liability obligation is
- offered by You alone, and You hereby agree to indemnify the Initial
- Developer and every Contributor for any liability incurred by the
- Initial Developer or such Contributor as a result of warranty,
- support, indemnity or liability terms You offer.
-
- 3.6. Distribution of Executable Versions.
- You may distribute Covered Code in Executable form only if the
- requirements of Section 3.1-3.5 have been met for that Covered Code,
- and if You include a notice stating that the Source Code version of
- the Covered Code is available under the terms of this License,
- including a description of how and where You have fulfilled the
- obligations of Section 3.2. The notice must be conspicuously included
- in any notice in an Executable version, related documentation or
- collateral in which You describe recipients' rights relating to the
- Covered Code. You may distribute the Executable version of Covered
- Code or ownership rights under a license of Your choice, which may
- contain terms different from this License, provided that You are in
- compliance with the terms of this License and that the license for the
- Executable version does not attempt to limit or alter the recipient's
- rights in the Source Code version from the rights set forth in this
- License. If You distribute the Executable version under a different
- license You must make it absolutely clear that any terms which differ
- from this License are offered by You alone, not by the Initial
- Developer or any Contributor. You hereby agree to indemnify the
- Initial Developer and every Contributor for any liability incurred by
- the Initial Developer or such Contributor as a result of any such
- terms You offer.
-
- 3.7. Larger Works.
- You may create a Larger Work by combining Covered Code with other code
- not governed by the terms of this License and distribute the Larger
- Work as a single product. In such a case, You must make sure the
- requirements of this License are fulfilled for the Covered Code.
-
-4. Inability to Comply Due to Statute or Regulation.
-
- If it is impossible for You to comply with any of the terms of this
- License with respect to some or all of the Covered Code due to
- statute, judicial order, or regulation then You must: (a) comply with
- the terms of this License to the maximum extent possible; and (b)
- describe the limitations and the code they affect. Such description
- must be included in the LEGAL file described in Section 3.4 and must
- be included with all distributions of the Source Code. Except to the
- extent prohibited by statute or regulation, such description must be
- sufficiently detailed for a recipient of ordinary skill to be able to
- understand it.
-
-5. Application of this License.
-
- This License applies to code to which the Initial Developer has
- attached the notice in Exhibit A and to related Covered Code.
-
-6. Versions of the License.
-
- 6.1. New Versions.
- Netscape Communications Corporation ("Netscape") may publish revised
- and/or new versions of the License from time to time. Each version
- will be given a distinguishing version number.
-
- 6.2. Effect of New Versions.
- Once Covered Code has been published under a particular version of the
- License, You may always continue to use it under the terms of that
- version. You may also choose to use such Covered Code under the terms
- of any subsequent version of the License published by Netscape. No one
- other than Netscape has the right to modify the terms applicable to
- Covered Code created under this License.
-
- 6.3. Derivative Works.
- If You create or use a modified version of this License (which you may
- only do in order to apply it to code which is not already Covered Code
- governed by this License), You must (a) rename Your license so that
- the phrases "Mozilla", "MOZILLAPL", "MOZPL", "Netscape",
- "MPL", "NPL" or any confusingly similar phrase do not appear in your
- license (except to note that your license differs from this License)
- and (b) otherwise make it clear that Your version of the license
- contains terms which differ from the Mozilla Public License and
- Netscape Public License. (Filling in the name of the Initial
- Developer, Original Code or Contributor in the notice described in
- Exhibit A shall not of themselves be deemed to be modifications of
- this License.)
-
-7. DISCLAIMER OF WARRANTY.
-
- COVERED CODE IS PROVIDED UNDER THIS LICENSE ON AN "AS IS" BASIS,
- WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
- WITHOUT LIMITATION, WARRANTIES THAT THE COVERED CODE IS FREE OF
- DEFECTS, MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE OR NON-INFRINGING.
- THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE COVERED CODE
- IS WITH YOU. SHOULD ANY COVERED CODE PROVE DEFECTIVE IN ANY RESPECT,
- YOU (NOT THE INITIAL DEVELOPER OR ANY OTHER CONTRIBUTOR) ASSUME THE
- COST OF ANY NECESSARY SERVICING, REPAIR OR CORRECTION. THIS DISCLAIMER
- OF WARRANTY CONSTITUTES AN ESSENTIAL PART OF THIS LICENSE. NO USE OF
- ANY COVERED CODE IS AUTHORIZED HEREUNDER EXCEPT UNDER THIS DISCLAIMER.
-
-8. TERMINATION.
-
- 8.1. This License and the rights granted hereunder will terminate
- automatically if You fail to comply with terms herein and fail to cure
- such breach within 30 days of becoming aware of the breach. All
- sublicenses to the Covered Code which are properly granted shall
- survive any termination of this License. Provisions which, by their
- nature, must remain in effect beyond the termination of this License
- shall survive.
-
- 8.2. If You initiate litigation by asserting a patent infringement
- claim (excluding declatory judgment actions) against Initial Developer
- or a Contributor (the Initial Developer or Contributor against whom
- You file such action is referred to as "Participant") alleging that:
-
- (a) such Participant's Contributor Version directly or indirectly
- infringes any patent, then any and all rights granted by such
- Participant to You under Sections 2.1 and/or 2.2 of this License
- shall, upon 60 days notice from Participant terminate prospectively,
- unless if within 60 days after receipt of notice You either: (i)
- agree in writing to pay Participant a mutually agreeable reasonable
- royalty for Your past and future use of Modifications made by such
- Participant, or (ii) withdraw Your litigation claim with respect to
- the Contributor Version against such Participant. If within 60 days
- of notice, a reasonable royalty and payment arrangement are not
- mutually agreed upon in writing by the parties or the litigation claim
- is not withdrawn, the rights granted by Participant to You under
- Sections 2.1 and/or 2.2 automatically terminate at the expiration of
- the 60 day notice period specified above.
-
- (b) any software, hardware, or device, other than such Participant's
- Contributor Version, directly or indirectly infringes any patent, then
- any rights granted to You by such Participant under Sections 2.1(b)
- and 2.2(b) are revoked effective as of the date You first made, used,
- sold, distributed, or had made, Modifications made by that
- Participant.
-
- 8.3. If You assert a patent infringement claim against Participant
- alleging that such Participant's Contributor Version directly or
- indirectly infringes any patent where such claim is resolved (such as
- by license or settlement) prior to the initiation of patent
- infringement litigation, then the reasonable value of the licenses
- granted by such Participant under Sections 2.1 or 2.2 shall be taken
- into account in determining the amount or value of any payment or
- license.
-
- 8.4. In the event of termination under Sections 8.1 or 8.2 above,
- all end user license agreements (excluding distributors and resellers)
- which have been validly granted by You or any distributor hereunder
- prior to termination shall survive termination.
-
-9. LIMITATION OF LIABILITY.
-
- UNDER NO CIRCUMSTANCES AND UNDER NO LEGAL THEORY, WHETHER TORT
- (INCLUDING NEGLIGENCE), CONTRACT, OR OTHERWISE, SHALL YOU, THE INITIAL
- DEVELOPER, ANY OTHER CONTRIBUTOR, OR ANY DISTRIBUTOR OF COVERED CODE,
- OR ANY SUPPLIER OF ANY OF SUCH PARTIES, BE LIABLE TO ANY PERSON FOR
- ANY INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES OF ANY
- CHARACTER INCLUDING, WITHOUT LIMITATION, DAMAGES FOR LOSS OF GOODWILL,
- WORK STOPPAGE, COMPUTER FAILURE OR MALFUNCTION, OR ANY AND ALL OTHER
- COMMERCIAL DAMAGES OR LOSSES, EVEN IF SUCH PARTY SHALL HAVE BEEN
- INFORMED OF THE POSSIBILITY OF SUCH DAMAGES. THIS LIMITATION OF
- LIABILITY SHALL NOT APPLY TO LIABILITY FOR DEATH OR PERSONAL INJURY
- RESULTING FROM SUCH PARTY'S NEGLIGENCE TO THE EXTENT APPLICABLE LAW
- PROHIBITS SUCH LIMITATION. SOME JURISDICTIONS DO NOT ALLOW THE
- EXCLUSION OR LIMITATION OF INCIDENTAL OR CONSEQUENTIAL DAMAGES, SO
- THIS EXCLUSION AND LIMITATION MAY NOT APPLY TO YOU.
-
-10. U.S. GOVERNMENT END USERS.
-
- The Covered Code is a "commercial item," as that term is defined in
- 48 C.F.R. 2.101 (Oct. 1995), consisting of "commercial computer
- software" and "commercial computer software documentation," as such
- terms are used in 48 C.F.R. 12.212 (Sept. 1995). Consistent with 48
- C.F.R. 12.212 and 48 C.F.R. 227.7202-1 through 227.7202-4 (June 1995),
- all U.S. Government End Users acquire Covered Code with only those
- rights set forth herein.
-
-11. MISCELLANEOUS.
-
- This License represents the complete agreement concerning subject
- matter hereof. If any provision of this License is held to be
- unenforceable, such provision shall be reformed only to the extent
- necessary to make it enforceable. This License shall be governed by
- California law provisions (except to the extent applicable law, if
- any, provides otherwise), excluding its conflict-of-law provisions.
- With respect to disputes in which at least one party is a citizen of,
- or an entity chartered or registered to do business in the United
- States of America, any litigation relating to this License shall be
- subject to the jurisdiction of the Federal Courts of the Northern
- District of California, with venue lying in Santa Clara County,
- California, with the losing party responsible for costs, including
- without limitation, court costs and reasonable attorneys' fees and
- expenses. The application of the United Nations Convention on
- Contracts for the International Sale of Goods is expressly excluded.
- Any law or regulation which provides that the language of a contract
- shall be construed against the drafter shall not apply to this
- License.
-
-12. RESPONSIBILITY FOR CLAIMS.
-
- As between Initial Developer and the Contributors, each party is
- responsible for claims and damages arising, directly or indirectly,
- out of its utilization of rights under this License and You agree to
- work with Initial Developer and Contributors to distribute such
- responsibility on an equitable basis. Nothing herein is intended or
- shall be deemed to constitute any admission of liability.
-
-13. MULTIPLE-LICENSED CODE.
-
- Initial Developer may designate portions of the Covered Code as
- "Multiple-Licensed". "Multiple-Licensed" means that the Initial
- Developer permits you to utilize portions of the Covered Code under
- Your choice of the NPL or the alternative licenses, if any, specified
- by the Initial Developer in the file described in Exhibit A.
-
-EXHIBIT A - Mozilla Public License.
-
- ``The contents of this file are subject to the Mozilla Public License
- Version 1.1 (the "License"); you may not use this file except in
- compliance with the License. You may obtain a copy of the License at
- http://www.mozilla.org/MPL/
-
- Software distributed under the License is distributed on an "AS IS"
- basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the
- License for the specific language governing rights and limitations
- under the License.
-
- The Original Code is ______________________________________.
-
- The Initial Developer of the Original Code is ________________________.
- Portions created by ______________________ are Copyright (C) ______
- _______________________. All Rights Reserved.
-
- Contributor(s): ______________________________________.
-
- Alternatively, the contents of this file may be used under the terms
- of the _____ license (the "[___] License"), in which case the
- provisions of [______] License are applicable instead of those
- above. If you wish to allow use of your version of this file only
- under the terms of the [____] License and not to allow others to use
- your version of this file under the MPL, indicate your decision by
- deleting the provisions above and replace them with the notice and
- other provisions required by the [___] License. If you do not delete
- the provisions above, a recipient may use your version of this file
- under either the MPL or the [___] License."
-
- [NOTE: The text of this Exhibit A may differ slightly from the text of
- the notices in the Source Code files of the Original Code. You should
- use the text of this Exhibit A rather than the text found in the
- Original Code Source Code for Your Modifications.]
-
---- end of LICENSE ---
-
--------------------------------------------------------------------------------
-
-%% This notice is provided with respect to SAX 2.0.1, which is included
-with JRE 7, JDK 7, and OpenJDK 7.
+%% This notice is provided with respect to SAX 2.0.1, which may be included
+with JRE 8, JDK 8, and OpenJDK 8.
--- begin of LICENSE ---
@@ -1876,8 +2065,8 @@ with JRE 7, JDK 7, and OpenJDK 7.
-------------------------------------------------------------------------------
-%% This notice is provided with respect to SoftFloat version 2b, which is
-included with JRE 7, JDK 7, and OpenJDK 7 on Linux/ARM.
+%% This notice is provided with respect to SoftFloat version 2b, which may be
+included with JRE 8, JDK 8, and OpenJDK 8 on Linux/ARM.
--- begin of LICENSE ---
@@ -1909,12 +2098,41 @@ satisfied.
-------------------------------------------------------------------------------
+%% This notice is provided with respect to Sparkle 1.5,
+which may be included with JRE 8 on Mac OS X.
+
+--- begin of LICENSE ---
+
+Copyright (c) 2012 Sparkle.org and Andy Matuschak
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in all
+copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+SOFTWARE.
+
+--- end of LICENSE ---
+
+-------------------------------------------------------------------------------
+
%% Portions licensed from Taligent, Inc.
-------------------------------------------------------------------------------
-%% This notice is provided with respect to Thai Dictionary, which is
-included with JRE 7, JDK 7, and OpenJDK 7.
+%% This notice is provided with respect to Thai Dictionary, which may be
+included with JRE 8, JDK 8, and OpenJDK 8.
--- begin of LICENSE ---
@@ -1947,8 +2165,8 @@ SOFTWARE.
-------------------------------------------------------------------------------
-%% This notice is provided with respect to Unicode 6.0.0, CLDR v1.4.1, & CLDR
-v1.9, which is included with JRE 7, JDK 7, and OpenJDK 7.
+%% This notice is provided with respect to Unicode 6.2.0 & CLDR 21.0.1
+which may be included with JRE 8, JDK 8, and OpenJDK 8.
--- begin of LICENSE ---
@@ -1959,7 +2177,7 @@ Privacy Policy. For trademark usage, see the Unicode® Consortium Name and
Trademark Usage Policy.
A. Unicode Copyright.
- 1. Copyright © 1991-2011 Unicode, Inc. All rights reserved.
+ 1. Copyright © 1991-2013 Unicode, Inc. All rights reserved.
2. Certain documents and files on this website contain a legend indicating
that "Modification is permitted." Any person is hereby authorized,
@@ -2094,7 +2312,7 @@ SOFTWARE.
COPYRIGHT AND PERMISSION NOTICE
-Copyright © 1991-2011 Unicode, Inc. All rights reserved. Distributed under the
+Copyright © 1991-2012 Unicode, Inc. All rights reserved. Distributed under the
Terms of Use in http://www.unicode.org/copyright.html.
Permission is hereby granted, free of charge, to any person obtaining a copy
@@ -2134,8 +2352,8 @@ the property of their respective owners.
-------------------------------------------------------------------------------
-%% This notice is provided with respect to UPX v3.01, which is included
-with JRE 7 on Windows.
+%% This notice is provided with respect to UPX v3.01, which may be included
+with JRE 8 on Windows.
--- begin of LICENSE ---
@@ -2274,7 +2492,7 @@ The UPX license file is at http://upx.sourceforge.net/upx-license.html.
-------------------------------------------------------------------------------
%% This notice is provided with respect to Xfree86-VidMode Extension 1.0,
-which is included with JRE 7, JDK 7, and OpenJDK 7 on Linux and Solaris.
+which may be included with JRE 8, JDK 8, and OpenJDK 8 on Linux and Solaris.
--- begin of LICENSE ---
@@ -2326,8 +2544,8 @@ to do so,subject to the following conditions:
-------------------------------------------------------------------------------
-%% This notice is provided with respect to X Window System 6.8.2, which is
-included with JRE 7, JDK 7, and OpenJDK 7 on Linux and Solaris.
+%% This notice is provided with respect to X Window System 6.8.2, which may be
+included with JRE 8, JDK 8, and OpenJDK 8 on Linux and Solaris.
--- begin of LICENSE ---
@@ -3131,12 +3349,12 @@ info@urwpp.de or design@bigelowandholmes.com
-------------------------------------------------------------------------------
-%% This notice is provided with respect to zlib v1.2.3, which is included
-with JRE 7, JDK 7, and OpenJDK 7
+%% This notice is provided with respect to zlib v1.2.5, which may be included
+with JRE 8, JDK 8, and OpenJDK 8.
--- begin of LICENSE ---
- version 1.2.3, July 18th, 2005
+ version 1.2.5, July 18th, 2005
Copyright (C) 1995-2005 Jean-loup Gailly and Mark Adler
@@ -3163,16 +3381,18 @@ with JRE 7, JDK 7, and OpenJDK 7
-------------------------------------------------------------------------------
-%% This notice is provided with respect to the following which is
-included with JRE 7, JDK 7, and OpenJDK 7, except where noted:
+%% This notice is provided with respect to the following which may be
+included with JRE 8, JDK 8, and OpenJDK 8, except where noted:
- Apache Derby 10.8.1.2 [included with JDK 7 only]
+ Apache Commons Math 2.2
+ Apache Derby 10.10.1.2 [included with JDK 8]
Apache Jakarta BCEL 5.2
Apache Jakarta Regexp 1.4
- Apache Santuario XMLSec-Java 1.4.2
+ Apache Santuario XML Security for Java 1.5.4
Apache Xalan-Java 2.7.1
- Apache Xerces2 Java 2.10.0
+ Apache Xerces Java 2.10.0
Apache XML Resolver 1.1
+ Dynalink 0.5
--- begin of LICENSE ---
diff --git a/makefiles/BuildJaxws.gmk b/make/BuildJaxws.gmk
index 204dd47f..204dd47f 100644
--- a/makefiles/BuildJaxws.gmk
+++ b/make/BuildJaxws.gmk
diff --git a/make/Makefile b/make/Makefile
index 12f13281..4570070f 100644
--- a/make/Makefile
+++ b/make/Makefile
@@ -1,5 +1,5 @@
#
-# Copyright (c) 2007, 2011, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2012, 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,172 +23,27 @@
# questions.
#
-# Makefile wrapper around Ant build.xml file
-
-#
-# On Solaris, the 'make' utility from Sun will not work with these makefiles.
-# This little rule is only understood by Sun's make, and is harmless
-# when seen by the GNU make tool. If using Sun's make, this causes the
-# make command to fail.
-#
-SUN_MAKE_TEST:sh = @echo "ERROR: PLEASE USE GNU VERSION OF MAKE"; exit 33
-
-ifdef QUIET
- ANT_OPTIONS += -quiet
-endif
-
-ifdef VERBOSE
- ANT_OPTIONS += -verbose
-endif
-
-ifeq ($(VARIANT), OPT)
- ifneq ($(DEBUG_CLASSFILES), true)
- ANT_OPTIONS += -Djavac.debug=false
- endif
-endif
-
-# Note: jdk/make/common/Defs.gmk uses LANGUAGE_VERSION (-source NN)
-# and the somewhat misnamed CLASS_VERSION (-target NN)
-ifdef TARGET_CLASS_VERSION
- ANT_OPTIONS += -Djavac.target=$(TARGET_CLASS_VERSION)
-else
- ifdef JAVAC_TARGET_ARG
- ANT_OPTIONS += -Djavac.target=$(JAVAC_TARGET_ARG)
- endif
-endif
-
-ifdef SOURCE_LANGUAGE_VERSION
- ANT_OPTIONS += -Djavac.source=$(SOURCE_LANGUAGE_VERSION)
+# Locate this Makefile
+ifeq ($(filter /%, $(lastword $(MAKEFILE_LIST))), )
+ makefile_path := $(CURDIR)/$(lastword $(MAKEFILE_LIST))
else
- ifdef JAVAC_SOURCE_ARG
- ANT_OPTIONS += -Djavac.source=$(JAVAC_SOURCE_ARG)
- endif
-endif
-
-# If downloads are allowed
-ifeq ($(ALLOW_DOWNLOADS),true)
- ANT_OPTIONS += -Dallow.downloads=true
+ makefile_path := $(lastword $(MAKEFILE_LIST))
endif
+repo_dir := $(patsubst %/make/Makefile, %, $(makefile_path))
-# Figure out the platform we are using
-_SYSTEM_UNAME := $(shell uname)
-_PLATFORM_KIND = unix
-ifeq ($(_SYSTEM_UNAME), Windows_NT)
- _PLATFORM_KIND = windows
-endif
-ifneq (,$(findstring CYGWIN,$(_SYSTEM_UNAME)))
- _PLATFORM_KIND = windows
-endif
+# What is the name of this subsystem (langtools, corba, etc)?
+subsystem_name := $(notdir $(repo_dir))
-# Where is /java in case we need it
-ifdef ALT_SLASH_JAVA
- _SLASHJAVA = $(ALT_SLASH_JAVA)
+# Try to locate top-level makefile
+top_level_makefile := $(repo_dir)/../Makefile
+ifneq ($(wildcard $(top_level_makefile)), )
+ $(info Will run $(subsystem_name) target on top-level Makefile)
+ $(info WARNING: This is a non-recommended way of building!)
+ $(info ===================================================)
else
- ifeq ($(_PLATFORM_KIND), windows)
- _SLASHJAVA=J:/
- else
- _SLASHJAVA=/java
- endif
+ $(info Cannot locate top-level Makefile. Is this repo not checked out as part of a complete forest?)
+ $(error Build from top-level Makefile instead)
endif
-ifdef ALT_OUTPUTDIR
- OUTPUTDIR = $(ALT_OUTPUTDIR)
- ANT_OPTIONS += -Doutput.dir=$(ALT_OUTPUTDIR)
-else
- OUTPUTDIR = ..
-endif
-
-ifdef ALT_LANGTOOLS_DIST
- ifdef ALT_BOOTDIR
- ANT_JAVA_HOME = JAVA_HOME=$(ALT_BOOTDIR)
- ANT_OPTIONS += -Djdk.home=$(ALT_BOOTDIR)
- endif
- ANT_OPTIONS += -Dbootstrap.dir=$(ALT_LANGTOOLS_DIST)/bootstrap
-else
- ifdef ALT_JDK_IMPORT_PATH
- ANT_JAVA_HOME = JAVA_HOME=$(ALT_JDK_IMPORT_PATH)
- ANT_OPTIONS += -Djdk.home=$(ALT_JDK_IMPORT_PATH)
- endif
-endif
-
-ifdef ANT_HOME
- ANT = $(ANT_HOME)/bin/ant
- ifneq ($(shell test -x $(ANT); echo $$?), 0)
- $(error "$(ANT) not found; please update ANT_HOME")
- endif
-else
- ANT = ant
- ifneq ($(shell which $(ANT) > /dev/null; echo $$?), 0)
- $(error "'ant' not found; please set ANT_HOME or put 'ant' on your PATH")
- endif
-endif
-
-# Default target and expected 'do everything' target
-default: all
-
-# All ant targets of interest
-ANT_TARGETS = all build dist clobber clean sanity
-
-# Create a make target for each
-$(ANT_TARGETS):
- cd .. && $(ANT_JAVA_HOME) $(ANT) $(ANT_OPTIONS) -version
- cd .. && $(ANT_JAVA_HOME) $(ANT) $(ANT_OPTIONS) $@
-
-# Just for compat reasons, delete in future.
-drop_included:
-source:
-
-# Help target
-define helpenvline
-@echo " $1";echo " $2"
-endef
-help:
- @echo "----------------------------------------------------------"
- @echo " "
- @echo "Help information for this Makefile:"
- @echo " "
- @echo " Targets (see ant project information for descriptions):"
- @echo " $(ANT_TARGETS)"
- @echo " "
- @echo " Environment or command line variables (all optional):"
- $(call helpenvline, ALT_BOOTDIR,\
- "JAVA_HOME to use when running ant")
- $(call helpenvline, ALT_LANGTOOLS_DIST,\
- "path to langtools repository dist directory")
- $(call helpenvline, ALT_OUTPUTDIR,\
- "path to root of output")
- $(call helpenvline, DEBUG_CLASSFILES,\
- "if set makes sure ant property javac.debug is true")
- $(call helpenvline, JAVAC_SOURCE_ARG,\
- "if SOURCE_LANGUAGE_VERSION not set uses this to set ant property javac.source")
- $(call helpenvline, JAVAC_TARGET_ARG,\
- "if TARGET_CLASS_VERSION not set uses this to set ant property javac.target")
- $(call helpenvline, SOURCE_LANGUAGE_VERSION,\
- "if set uses this to set ant property javac.source")
- $(call helpenvline, QUIET,\
- "if set will pass -quiet to ant")
- $(call helpenvline, TARGET_CLASS_VERSION,\
- "JAVA_HOME to use when running ant")
- $(call helpenvline, VARIANT,\
- "if set to OPT means optimized build will set javac.debug to false")
- $(call helpenvline, VERBOSE,\
- "if set will pass -verbose to ant")
- @echo " "
- @echo "----------------------------------------------------------"
- @echo " "
- @echo "Ant project file help information:"
- @echo " "
- @$(ANT_JAVA_HOME) cd .. && $(ANT) $(ANT_OPTIONS) -p
- @echo " "
- @echo "----------------------------------------------------------"
-
-# Targets for Sun's internal JPRT build system
-JPRT_ARCHIVE_BUNDLE=$(OUTPUTDIR)/jprt.zip
-jprt_build_product jprt_build_debug jprt_build_fastdebug: all
- $(RM) $(JPRT_ARCHIVE_BUNDLE)
- ( cd $(OUTPUTDIR)/dist && \
- zip -q -r $(JPRT_ARCHIVE_BUNDLE) . )
-
-# Declare these phony (not filenames)
-.PHONY: $(ANT_TARGETS) \
- jprt_build_product jprt_build_debug jprt_build_fastdebug
+all:
+ @$(MAKE) -f $(top_level_makefile) $(subsystem_name)
diff --git a/make/jprt.properties b/make/jprt.properties
deleted file mode 100644
index 8afa5316..00000000
--- a/make/jprt.properties
+++ /dev/null
@@ -1,46 +0,0 @@
-#
-# Copyright (c) 2006, 2013, Oracle and/or its affiliates. All rights reserved.
-# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-#
-# This code is free software; you can redistribute it and/or modify it
-# under the terms of the GNU General Public License version 2 only, as
-# published by the Free Software Foundation. Oracle designates this
-# particular file as subject to the "Classpath" exception as provided
-# by Oracle in the LICENSE file that accompanied this code.
-#
-# This code is distributed in the hope that it will be useful, but WITHOUT
-# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
-# version 2 for more details (a copy is included in the LICENSE file that
-# accompanied this code).
-#
-# You should have received a copy of the GNU General Public License version
-# 2 along with this work; if not, write to the Free Software Foundation,
-# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
-#
-# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
-# or visit www.oracle.com if you need additional information or have any
-# questions.
-#
-
-# Properties for jprt
-
-# Locked down to jdk8
-jprt.tools.default.release=jdk8
-
-# The different build flavors we want, we override here so we just get these 2
-jprt.build.flavors=product,fastdebug
-
-# Standard list of jprt build targets for this source tree
-jprt.build.targets= \
- solaris_sparcv9_5.10-{product|fastdebug}, \
- solaris_x64_5.10-{product|fastdebug}, \
- linux_i586_2.6-{product|fastdebug}, \
- linux_x64_2.6-{product|fastdebug}, \
- macosx_x64_10.7-{product|fastdebug}, \
- windows_i586_6.1-{product|fastdebug}, \
- windows_x64_6.1-{product|fastdebug}
-
-# Directories to be excluded from the source bundles
-jprt.bundle.exclude.src.dirs=build dist webrev
-
diff --git a/make/scripts/update_src.sh b/make/scripts/update_src.sh
deleted file mode 100644
index 6a642fb9..00000000
--- a/make/scripts/update_src.sh
+++ /dev/null
@@ -1,90 +0,0 @@
-#
-# Copyright (c) 2012, 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.
-#
-
-# This script was used to copy the former drop source bundle source into
-# the repository. Exists as a form of documentation.
-
-curdir="`(cd . && pwd)`"
-
-# Whitespace normalizer script is in the top repository.
-normalizer="perl ${curdir}/../make/scripts/normalizer.pl"
-
-# Locations for bundle and root of source tree
-tmp=/tmp
-srcroot=${curdir}/src
-mkdir -p ${srcroot}
-
-# Bundle information
-drops_dir="/java/devtools/share/jdk8-drops"
-url1="http://download.java.net/glassfish/components/jax-ws/openjdk/jdk8"
-bundle1="jdk8-jaxws-2_2-SNAPSHOT-2012_01_11-patched.zip"
-srcdir1="${srcroot}/share/jaxws_classes"
-url2="http://download.java.net/glassfish/components/jax-ws/openjdk/jdk8"
-bundle2="jdk8-jaf-2011_07_22.zip"
-srcdir2="${srcroot}/share/jaf_classes"
-
-# Function to get a bundle and explode it and normalize the source files.
-getBundle() # drops_dir url bundlename bundledestdir srcrootdir
-{
- # Get the bundle from drops_dir or downloaded
- mkdir -p $4
- rm -f $4/$3
- if [ -f $1/$3 ] ; then
- echo "Copy over bundle: $1/$3"
- cp $1/$3 $4
- else
- echo "Downloading bundle: $2/$3"
- (cd $4 && wget $2/$3)
- fi
- # Fail if it does not exist
- if [ ! -f $4/$3 ] ; then
- echo "ERROR: Could not get $3"
- exit 1
- fi
- # Wipe it out completely
- echo "Cleaning up $5"
- rm -f -r $5
- mkdir -p $5
- echo "Unzipping $4/$3"
- ( cd $5 && unzip -q $4/$3 && mv src/* . && rmdir src && rm LICENSE )
- # Run whitespace normalizer
- echo "Normalizing the sources in $5"
- ( cd $5 && ${normalizer} . )
- # Delete the bundle and leftover files
- rm -f $4/$3 $5/filelist
-}
-
-# Process the bundles.
-getBundle "${drops_dir}" "${url1}" "${bundle1}" ${tmp} ${srcdir1}
-getBundle "${drops_dir}" "${url2}" "${bundle2}" ${tmp} ${srcdir2}
-echo "Completed bundle extraction."
-echo " "
-
-# Appropriate Mercurial commands needed to run:
-echo "Run: hg addremove src"
-echo "Run: ksh ../make/scripts/webrev.ksh -N -o ${HOME}/webrev"
-echo "Get reviewer, get CR, then..."
-echo "Run: hg commit"
-
diff --git a/makefiles/Makefile b/makefiles/Makefile
deleted file mode 100644
index c7d0dd00..00000000
--- a/makefiles/Makefile
+++ /dev/null
@@ -1,49 +0,0 @@
-#
-# Copyright (c) 2012, 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.
-#
-
-# Locate this Makefile
-ifeq ($(filter /%, $(lastword $(MAKEFILE_LIST))), )
- makefile_path := $(CURDIR)/$(lastword $(MAKEFILE_LIST))
-else
- makefile_path := $(lastword $(MAKEFILE_LIST))
-endif
-repo_dir := $(patsubst %/makefiles/Makefile, %, $(makefile_path))
-
-# What is the name of this subsystem (langtools, corba, etc)?
-subsystem_name := $(notdir $(repo_dir))
-
-# Try to locate top-level makefile
-top_level_makefile := $(repo_dir)/../common/makefiles/Makefile
-ifneq ($(wildcard $(top_level_makefile)), )
- $(info Will run $(subsystem_name) target on top-level Makefile)
- $(info WARNING: This is a non-recommended way of building!)
- $(info ===================================================)
-else
- $(info Cannot locate top-level Makefile. Is this repo not checked out as part of a complete forest?)
- $(error Build from top-level Makefile instead)
-endif
-
-all:
- @$(MAKE) -f $(top_level_makefile) $(subsystem_name)
diff --git a/src/share/jaxws_classes/com/sun/tools/internal/jxc/model/nav/ApNavigator.java b/src/share/jaxws_classes/com/sun/tools/internal/jxc/model/nav/ApNavigator.java
index 8ffebd2a..803d3297 100644
--- a/src/share/jaxws_classes/com/sun/tools/internal/jxc/model/nav/ApNavigator.java
+++ b/src/share/jaxws_classes/com/sun/tools/internal/jxc/model/nav/ApNavigator.java
@@ -65,7 +65,7 @@ import java.util.Map;
*
* @author Kohsuke Kawaguchi (kk@kohsuke.org)
*/
-public class ApNavigator implements Navigator<TypeMirror, TypeElement, VariableElement, ExecutableElement> {
+public final class ApNavigator implements Navigator<TypeMirror, TypeElement, VariableElement, ExecutableElement> {
private final ProcessingEnvironment env;
@@ -236,7 +236,7 @@ public class ApNavigator implements Navigator<TypeMirror, TypeElement, VariableE
}
public boolean isFinal(TypeElement clazz) {
- return hasModifier(clazz,Modifier.FINAL);
+ return hasModifier(clazz, Modifier.FINAL);
}
public VariableElement[] getEnumConstants(TypeElement clazz) {
@@ -258,8 +258,9 @@ public class ApNavigator implements Navigator<TypeMirror, TypeElement, VariableE
return env.getElementUtils().getPackageOf(clazz).getQualifiedName().toString();
}
- public TypeElement findClass(String className, TypeElement referencePoint) {
- return env.getElementUtils().getTypeElement(className);
+ @Override
+ public TypeElement loadObjectFactory(TypeElement referencePoint, String packageName) {
+ return env.getElementUtils().getTypeElement(packageName + ".ObjectFactory");
}
public boolean isBridgeMethod(ExecutableElement method) {
diff --git a/src/share/jaxws_classes/com/sun/tools/internal/xjc/model/nav/EagerNType.java b/src/share/jaxws_classes/com/sun/tools/internal/xjc/model/nav/EagerNType.java
index 14af2da4..2b6be6a9 100644
--- a/src/share/jaxws_classes/com/sun/tools/internal/xjc/model/nav/EagerNType.java
+++ b/src/share/jaxws_classes/com/sun/tools/internal/xjc/model/nav/EagerNType.java
@@ -30,7 +30,6 @@ import java.lang.reflect.Type;
import com.sun.codemodel.internal.JType;
import com.sun.tools.internal.xjc.outline.Aspect;
import com.sun.tools.internal.xjc.outline.Outline;
-import com.sun.xml.internal.bind.v2.model.nav.Navigator;
/**
* @author Kohsuke Kawaguchi
@@ -69,6 +68,6 @@ class EagerNType implements NType {
}
public String fullName() {
- return Navigator.REFLECTION.getTypeName(t);
+ return Utils.REFLECTION_NAVIGATOR.getTypeName(t);
}
}
diff --git a/src/share/jaxws_classes/com/sun/tools/internal/xjc/model/nav/NavigatorImpl.java b/src/share/jaxws_classes/com/sun/tools/internal/xjc/model/nav/NavigatorImpl.java
index f5f24e57..f83aa643 100644
--- a/src/share/jaxws_classes/com/sun/tools/internal/xjc/model/nav/NavigatorImpl.java
+++ b/src/share/jaxws_classes/com/sun/tools/internal/xjc/model/nav/NavigatorImpl.java
@@ -56,7 +56,7 @@ public final class NavigatorImpl implements Navigator<NType,NClass,Void,Void> {
EagerNType ent = (EagerNType) nt;
if (base instanceof EagerNClass) {
EagerNClass enc = (EagerNClass) base;
- return create(REFLECTION.getBaseClass(ent.t, enc.c));
+ return create(Utils.REFLECTION_NAVIGATOR.getBaseClass(ent.t, enc.c));
}
// lazy class can never be a base type of an eager type
return null;
@@ -176,7 +176,7 @@ public final class NavigatorImpl implements Navigator<NType,NClass,Void,Void> {
public NType getTypeArgument(NType nt, int i) {
if (nt instanceof EagerNType) {
EagerNType ent = (EagerNType) nt;
- return create(REFLECTION.getTypeArgument(ent.t,i));
+ return create(Utils.REFLECTION_NAVIGATOR.getTypeArgument(ent.t,i));
}
if (nt instanceof NClassByJClass) {
NClassByJClass nnt = (NClassByJClass) nt;
@@ -189,7 +189,7 @@ public final class NavigatorImpl implements Navigator<NType,NClass,Void,Void> {
public boolean isParameterizedType(NType nt) {
if (nt instanceof EagerNType) {
EagerNType ent = (EagerNType) nt;
- return REFLECTION.isParameterizedType(ent.t);
+ return Utils.REFLECTION_NAVIGATOR.isParameterizedType(ent.t);
}
if (nt instanceof NClassByJClass) {
NClassByJClass nnt = (NClassByJClass) nt;
@@ -304,8 +304,8 @@ public final class NavigatorImpl implements Navigator<NType,NClass,Void,Void> {
throw new UnsupportedOperationException();
}
- public NClass findClass(String className, NClass referencePoint) {
- // TODO: implement this method later
+ @Override
+ public NClass loadObjectFactory(NClass referencePoint, String pkg) {
throw new UnsupportedOperationException();
}
diff --git a/src/share/jaxws_classes/com/sun/tools/internal/xjc/model/nav/Utils.java b/src/share/jaxws_classes/com/sun/tools/internal/xjc/model/nav/Utils.java
new file mode 100644
index 00000000..945f3fd0
--- /dev/null
+++ b/src/share/jaxws_classes/com/sun/tools/internal/xjc/model/nav/Utils.java
@@ -0,0 +1,82 @@
+/*
+ * Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation. Oracle designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Oracle in the LICENSE file that accompanied this code.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+package com.sun.tools.internal.xjc.model.nav;
+
+import com.sun.xml.internal.bind.v2.model.nav.Navigator;
+
+import java.lang.reflect.Field;
+import java.lang.reflect.InvocationTargetException;
+import java.lang.reflect.Method;
+import java.lang.reflect.Type;
+import java.util.logging.Level;
+import java.util.logging.Logger;
+
+/**
+ * Utils class.
+ * Has *package private* access to avoid inappropriate usage.
+ */
+/* package */ final class Utils {
+
+ private static final Logger LOGGER = Logger.getLogger(Utils.class.getName());
+
+ /**
+ * static ReflectionNavigator field to avoid usage of reflection every time we use it.
+ */
+ /* package */ static final Navigator<Type, Class, Field, Method> REFLECTION_NAVIGATOR;
+
+ static { // we statically initializing REFLECTION_NAVIGATOR property
+ Class refNav = null;
+ try {
+ refNav = Class.forName("com.sun.xml.internal.bind.v2.model.nav.ReflectionNavigator");
+ //noinspection unchecked
+ Method getInstance = refNav.getDeclaredMethod("getInstance");
+ getInstance.setAccessible(true);
+ //noinspection unchecked
+ REFLECTION_NAVIGATOR = (Navigator<Type, Class, Field, Method>) getInstance.invoke(null);
+ } catch (ClassNotFoundException e) {
+ e.printStackTrace();
+ throw new IllegalStateException("Can't find ReflectionNavigator class");
+ } catch (InvocationTargetException e) {
+ e.printStackTrace();
+ throw new IllegalStateException("ReflectionNavigator.getInstance throws the exception");
+ } catch (NoSuchMethodException e) {
+ e.printStackTrace();
+ throw new IllegalStateException("ReflectionNavigator.getInstance can't be found");
+ } catch (IllegalAccessException e) {
+ e.printStackTrace();
+ throw new IllegalStateException("ReflectionNavigator.getInstance method is inaccessible");
+ } catch (SecurityException e) {
+ LOGGER.log(Level.FINE, "Unable to access ReflectionNavigator.getInstance", e);
+ throw e;
+ }
+ }
+
+ /**
+ * private constructor to avoid util class instantiating
+ */
+ private Utils() {
+ }
+}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/bind/api/JAXBRIContext.java b/src/share/jaxws_classes/com/sun/xml/internal/bind/api/JAXBRIContext.java
index 57fb608f..704eaf17 100644
--- a/src/share/jaxws_classes/com/sun/xml/internal/bind/api/JAXBRIContext.java
+++ b/src/share/jaxws_classes/com/sun/xml/internal/bind/api/JAXBRIContext.java
@@ -45,7 +45,6 @@ import com.sun.istack.internal.Nullable;
import com.sun.xml.internal.bind.api.impl.NameConverter;
import com.sun.xml.internal.bind.v2.ContextFactory;
import com.sun.xml.internal.bind.v2.model.annotation.RuntimeAnnotationReader;
-import com.sun.xml.internal.bind.v2.model.nav.Navigator;
import com.sun.xml.internal.bind.v2.model.runtime.RuntimeTypeInfoSet;
import java.util.HashMap;
@@ -417,7 +416,7 @@ public abstract class JAXBRIContext extends JAXBContext {
* @since 2.0 FCS
*/
public static @Nullable Type getBaseType(@NotNull Type type, @NotNull Class baseType) {
- return Navigator.REFLECTION.getBaseClass(type,baseType);
+ return Utils.REFLECTION_NAVIGATOR.getBaseClass(type, baseType);
}
/**
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/bind/api/TypeReference.java b/src/share/jaxws_classes/com/sun/xml/internal/bind/api/TypeReference.java
index bc2db614..c414c84c 100644
--- a/src/share/jaxws_classes/com/sun/xml/internal/bind/api/TypeReference.java
+++ b/src/share/jaxws_classes/com/sun/xml/internal/bind/api/TypeReference.java
@@ -32,8 +32,6 @@ import java.util.Collection;
import javax.xml.namespace.QName;
-import com.sun.xml.internal.bind.v2.model.nav.Navigator;
-
/**
* A reference to a JAXB-bound type.
*
@@ -105,12 +103,11 @@ public final class TypeReference {
// if we are to reinstitute this check, check JAXB annotations only
// assert annotations.length==0; // not designed to work with adapters.
- Type base = Navigator.REFLECTION.getBaseClass(type, Collection.class);
+ Type base = Utils.REFLECTION_NAVIGATOR.getBaseClass(type, Collection.class);
if(base==null)
return this; // not a collection
- return new TypeReference(tagName,
- Navigator.REFLECTION.getTypeArgument(base,0));
+ return new TypeReference(tagName, Utils.REFLECTION_NAVIGATOR.getTypeArgument(base,0));
}
@Override
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/bind/api/Utils.java b/src/share/jaxws_classes/com/sun/xml/internal/bind/api/Utils.java
new file mode 100644
index 00000000..350062f1
--- /dev/null
+++ b/src/share/jaxws_classes/com/sun/xml/internal/bind/api/Utils.java
@@ -0,0 +1,82 @@
+/*
+ * Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation. Oracle designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Oracle in the LICENSE file that accompanied this code.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+package com.sun.xml.internal.bind.api;
+
+import com.sun.xml.internal.bind.v2.model.nav.Navigator;
+
+import java.lang.reflect.Field;
+import java.lang.reflect.InvocationTargetException;
+import java.lang.reflect.Method;
+import java.lang.reflect.Type;
+import java.util.logging.Level;
+import java.util.logging.Logger;
+
+/**
+ * Utils class.
+ * Has *package private* access to avoid inappropriate usage.
+ */
+/* package */ final class Utils {
+
+ private static final Logger LOGGER = Logger.getLogger(Utils.class.getName());
+
+ /**
+ * static ReflectionNavigator field to avoid usage of reflection every time we use it.
+ */
+ /* package */ static final Navigator<Type, Class, Field, Method> REFLECTION_NAVIGATOR;
+
+ static { // we statically initializing REFLECTION_NAVIGATOR property
+ Class refNav = null;
+ try {
+ refNav = Class.forName("com.sun.xml.internal.bind.v2.model.nav.ReflectionNavigator");
+ //noinspection unchecked
+ Method getInstance = refNav.getDeclaredMethod("getInstance");
+ getInstance.setAccessible(true);
+ //noinspection unchecked
+ REFLECTION_NAVIGATOR = (Navigator<Type, Class, Field, Method>) getInstance.invoke(null);
+ } catch (ClassNotFoundException e) {
+ e.printStackTrace();
+ throw new IllegalStateException("Can't find ReflectionNavigator class");
+ } catch (InvocationTargetException e) {
+ e.printStackTrace();
+ throw new IllegalStateException("ReflectionNavigator.getInstance throws the exception");
+ } catch (NoSuchMethodException e) {
+ e.printStackTrace();
+ throw new IllegalStateException("ReflectionNavigator.getInstance can't be found");
+ } catch (IllegalAccessException e) {
+ e.printStackTrace();
+ throw new IllegalStateException("ReflectionNavigator.getInstance method is inaccessible");
+ } catch (SecurityException e) {
+ LOGGER.log(Level.FINE, "Unable to access ReflectionNavigator.getInstance", e);
+ throw e;
+ }
+ }
+
+ /**
+ * private constructor to avoid util class instantiating
+ */
+ private Utils() {
+ }
+}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/model/impl/ModelBuilder.java b/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/model/impl/ModelBuilder.java
index 243bc587..29ce0466 100644
--- a/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/model/impl/ModelBuilder.java
+++ b/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/model/impl/ModelBuilder.java
@@ -289,23 +289,12 @@ public class ModelBuilder<T,C,F,M> implements ModelBuilderI<T,C,F,M> {
String pkg = nav.getPackageName(clazz);
if (!registries.containsKey(pkg)) {
// insert the package's object factory
- C c = loadObjectFactory(clazz, pkg);
+ C c = nav.loadObjectFactory(clazz, pkg);
if (c != null)
addRegistry(c, p);
}
}
- private C loadObjectFactory(C clazz, String pkg) {
- C c;
- try {
- c = nav.findClass(pkg + ".ObjectFactory", clazz);
- } catch (SecurityException ignored) {
- // treat SecurityException in same way as ClassNotFoundException in this case
- c = null;
- }
- return c;
- }
-
/**
* Getting parametrized classes of {@code JAXBElement<...>} property
* @param p property which parametrized types we will try to get
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/model/impl/RuntimeAnyTypeImpl.java b/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/model/impl/RuntimeAnyTypeImpl.java
index 5ce588a5..1d6c5247 100644
--- a/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/model/impl/RuntimeAnyTypeImpl.java
+++ b/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/model/impl/RuntimeAnyTypeImpl.java
@@ -36,7 +36,7 @@ import com.sun.xml.internal.bind.v2.runtime.Transducer;
*/
final class RuntimeAnyTypeImpl extends AnyTypeImpl<Type,Class> implements RuntimeNonElement {
private RuntimeAnyTypeImpl() {
- super(Navigator.REFLECTION);
+ super(Utils.REFLECTION_NAVIGATOR);
}
public <V> Transducer<V> getTransducer() {
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/model/impl/RuntimeBuiltinLeafInfoImpl.java b/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/model/impl/RuntimeBuiltinLeafInfoImpl.java
index 4a2c160f..f1a28b6a 100644
--- a/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/model/impl/RuntimeBuiltinLeafInfoImpl.java
+++ b/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/model/impl/RuntimeBuiltinLeafInfoImpl.java
@@ -91,9 +91,6 @@ import com.sun.xml.internal.bind.v2.runtime.unmarshaller.Base64Data;
import com.sun.xml.internal.bind.v2.runtime.unmarshaller.UnmarshallingContext;
import com.sun.xml.internal.bind.v2.util.ByteArrayOutputStreamEx;
import com.sun.xml.internal.bind.v2.util.DataSourceSource;
-import java.util.logging.Logger;
-import com.sun.xml.internal.bind.Util;
-import java.util.logging.Level;
import org.xml.sax.SAXException;
@@ -108,8 +105,6 @@ import org.xml.sax.SAXException;
public abstract class RuntimeBuiltinLeafInfoImpl<T> extends BuiltinLeafInfoImpl<Type,Class>
implements RuntimeBuiltinLeafInfo, Transducer<T> {
- private static final Logger logger = Util.getClassLogger();
-
private RuntimeBuiltinLeafInfoImpl(Class type, QName... typeNames) {
super(type, typeNames);
LEAVES.put(type,this);
@@ -201,7 +196,6 @@ public abstract class RuntimeBuiltinLeafInfoImpl<T> extends BuiltinLeafInfoImpl<
public static final List<RuntimeBuiltinLeafInfoImpl<?>> builtinBeanInfos;
public static final String MAP_ANYURI_TO_URI = "mapAnyUriToUri";
- public static final String USE_OLD_GMONTH_MAPPING = "jaxb.ri.useOldGmonthMapping";
static {
@@ -966,14 +960,7 @@ public abstract class RuntimeBuiltinLeafInfoImpl<T> extends BuiltinLeafInfoImpl<
m.put(DatatypeConstants.DATETIME, "%Y-%M-%DT%h:%m:%s"+ "%z");
m.put(DatatypeConstants.DATE, "%Y-%M-%D" +"%z");
m.put(DatatypeConstants.TIME, "%h:%m:%s"+ "%z");
- if (System.getProperty(USE_OLD_GMONTH_MAPPING) == null) {
- m.put(DatatypeConstants.GMONTH, "--%M%z"); // E2-12 Error. http://www.w3.org/2001/05/xmlschema-errata#e2-12
- } else { // backw. compatibility
- if (logger.isLoggable(Level.FINE)) {
- logger.log(Level.FINE, "Old GMonth mapping used.");
- }
- m.put(DatatypeConstants.GMONTH, "--%M--%z");
- }
+ m.put(DatatypeConstants.GMONTH, "--%M--%z");
m.put(DatatypeConstants.GDAY, "---%D" + "%z");
m.put(DatatypeConstants.GYEAR, "%Y" + "%z");
m.put(DatatypeConstants.GYEARMONTH, "%Y-%M" + "%z");
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/model/impl/RuntimeElementInfoImpl.java b/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/model/impl/RuntimeElementInfoImpl.java
index 032e7315..9bc98962 100644
--- a/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/model/impl/RuntimeElementInfoImpl.java
+++ b/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/model/impl/RuntimeElementInfoImpl.java
@@ -42,7 +42,6 @@ import com.sun.xml.internal.bind.v2.model.runtime.RuntimeElementPropertyInfo;
import com.sun.xml.internal.bind.v2.model.runtime.RuntimeNonElement;
import com.sun.xml.internal.bind.v2.model.runtime.RuntimePropertyInfo;
import com.sun.xml.internal.bind.v2.model.runtime.RuntimeTypeRef;
-import com.sun.xml.internal.bind.v2.model.nav.Navigator;
import com.sun.xml.internal.bind.v2.runtime.IllegalAnnotationException;
import com.sun.xml.internal.bind.v2.runtime.Transducer;
import com.sun.xml.internal.bind.v2.runtime.reflect.Accessor;
@@ -122,7 +121,8 @@ final class RuntimeElementInfoImpl extends ElementInfoImpl<Type,Class,Field,Meth
}
public Class<? extends JAXBElement> getType() {
- return Navigator.REFLECTION.erasure(super.getType());
+ //noinspection unchecked
+ return (Class<? extends JAXBElement>) Utils.REFLECTION_NAVIGATOR.erasure(super.getType());
}
public RuntimeClassInfo getScope() {
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/model/impl/RuntimeModelBuilder.java b/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/model/impl/RuntimeModelBuilder.java
index 2167e08f..a1a9c4dc 100644
--- a/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/model/impl/RuntimeModelBuilder.java
+++ b/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/model/impl/RuntimeModelBuilder.java
@@ -38,7 +38,6 @@ import com.sun.xml.internal.bind.v2.model.annotation.Locatable;
import com.sun.xml.internal.bind.v2.model.annotation.RuntimeAnnotationReader;
import com.sun.xml.internal.bind.v2.model.core.ID;
import com.sun.xml.internal.bind.v2.model.nav.Navigator;
-import com.sun.xml.internal.bind.v2.model.nav.ReflectionNavigator;
import com.sun.xml.internal.bind.v2.model.runtime.RuntimeNonElement;
import com.sun.xml.internal.bind.v2.model.runtime.RuntimeNonElementRef;
import com.sun.xml.internal.bind.v2.model.runtime.RuntimePropertyInfo;
@@ -75,7 +74,7 @@ public class RuntimeModelBuilder extends ModelBuilder<Type,Class,Field,Method> {
public final @Nullable JAXBContextImpl context;
public RuntimeModelBuilder(JAXBContextImpl context, RuntimeAnnotationReader annotationReader, Map<Class, Class> subclassReplacements, String defaultNamespaceRemap) {
- super(annotationReader, Navigator.REFLECTION, subclassReplacements, defaultNamespaceRemap);
+ super(annotationReader, Utils.REFLECTION_NAVIGATOR, subclassReplacements, defaultNamespaceRemap);
this.context = context;
}
@@ -109,10 +108,6 @@ public class RuntimeModelBuilder extends ModelBuilder<Type,Class,Field,Method> {
return new RuntimeArrayInfoImpl(this, upstream, (Class)arrayType);
}
- public ReflectionNavigator getNavigator() {
- return (ReflectionNavigator)nav;
- }
-
@Override
protected RuntimeTypeInfoSetImpl createTypeInfoSet() {
return new RuntimeTypeInfoSetImpl(reader);
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/model/impl/RuntimeTypeInfoSetImpl.java b/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/model/impl/RuntimeTypeInfoSetImpl.java
index b4454e3b..5079a5d8 100644
--- a/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/model/impl/RuntimeTypeInfoSetImpl.java
+++ b/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/model/impl/RuntimeTypeInfoSetImpl.java
@@ -35,7 +35,6 @@ import javax.xml.namespace.QName;
import com.sun.xml.internal.bind.v2.model.annotation.AnnotationReader;
import com.sun.xml.internal.bind.v2.model.core.TypeInfoSet;
import com.sun.xml.internal.bind.v2.model.nav.Navigator;
-import com.sun.xml.internal.bind.v2.model.nav.ReflectionNavigator;
import com.sun.xml.internal.bind.v2.model.runtime.RuntimeNonElement;
import com.sun.xml.internal.bind.v2.model.runtime.RuntimeTypeInfoSet;
@@ -46,7 +45,7 @@ import com.sun.xml.internal.bind.v2.model.runtime.RuntimeTypeInfoSet;
*/
final class RuntimeTypeInfoSetImpl extends TypeInfoSetImpl<Type,Class,Field,Method> implements RuntimeTypeInfoSet {
public RuntimeTypeInfoSetImpl(AnnotationReader<Type,Class,Field,Method> reader) {
- super(Navigator.REFLECTION,reader,RuntimeBuiltinLeafInfoImpl.LEAVES);
+ super(Utils.REFLECTION_NAVIGATOR,reader,RuntimeBuiltinLeafInfoImpl.LEAVES);
}
@Override
@@ -54,10 +53,6 @@ final class RuntimeTypeInfoSetImpl extends TypeInfoSetImpl<Type,Class,Field,Meth
return RuntimeAnyTypeImpl.theInstance;
}
- public ReflectionNavigator getNavigator() {
- return (ReflectionNavigator)super.getNavigator();
- }
-
public RuntimeNonElement getTypeInfo( Type type ) {
return (RuntimeNonElement)super.getTypeInfo(type);
}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/model/impl/Utils.java b/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/model/impl/Utils.java
new file mode 100644
index 00000000..84b7f0cc
--- /dev/null
+++ b/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/model/impl/Utils.java
@@ -0,0 +1,82 @@
+/*
+ * Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation. Oracle designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Oracle in the LICENSE file that accompanied this code.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+package com.sun.xml.internal.bind.v2.model.impl;
+
+import com.sun.xml.internal.bind.v2.model.nav.Navigator;
+
+import java.lang.reflect.Field;
+import java.lang.reflect.InvocationTargetException;
+import java.lang.reflect.Method;
+import java.lang.reflect.Type;
+import java.util.logging.Level;
+import java.util.logging.Logger;
+
+/**
+ * Utils class.
+ * Has *package private* access to avoid inappropriate usage.
+ */
+/* package */ final class Utils {
+
+ private static final Logger LOGGER = Logger.getLogger(Utils.class.getName());
+
+ /**
+ * static ReflectionNavigator field to avoid usage of reflection every time we use it.
+ */
+ /* package */ static final Navigator<Type, Class, Field, Method> REFLECTION_NAVIGATOR;
+
+ static { // we statically initializing REFLECTION_NAVIGATOR property
+ Class refNav = null;
+ try {
+ refNav = Class.forName("com.sun.xml.internal.bind.v2.model.nav.ReflectionNavigator");
+ //noinspection unchecked
+ Method getInstance = refNav.getDeclaredMethod("getInstance");
+ getInstance.setAccessible(true);
+ //noinspection unchecked
+ REFLECTION_NAVIGATOR = (Navigator<Type, Class, Field, Method>) getInstance.invoke(null);
+ } catch (ClassNotFoundException e) {
+ e.printStackTrace();
+ throw new IllegalStateException("Can't find ReflectionNavigator class");
+ } catch (InvocationTargetException e) {
+ e.printStackTrace();
+ throw new IllegalStateException("ReflectionNavigator.getInstance throws the exception");
+ } catch (NoSuchMethodException e) {
+ e.printStackTrace();
+ throw new IllegalStateException("ReflectionNavigator.getInstance can't be found");
+ } catch (IllegalAccessException e) {
+ e.printStackTrace();
+ throw new IllegalStateException("ReflectionNavigator.getInstance method is inaccessible");
+ } catch (SecurityException e) {
+ LOGGER.log(Level.FINE, "Unable to access ReflectionNavigator.getInstance", e);
+ throw e;
+ }
+ }
+
+ /**
+ * private constructor to avoid util class instantiating
+ */
+ private Utils() {
+ }
+}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/model/nav/Navigator.java b/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/model/nav/Navigator.java
index fbbca826..3c671f6d 100644
--- a/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/model/nav/Navigator.java
+++ b/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/model/nav/Navigator.java
@@ -25,6 +25,10 @@
package com.sun.xml.internal.bind.v2.model.nav;
+import java.lang.reflect.Field;
+import java.lang.reflect.Method;
+import java.lang.reflect.Proxy;
+import java.lang.reflect.Type;
import java.util.Collection;
import com.sun.xml.internal.bind.v2.runtime.Location;
@@ -240,10 +244,6 @@ public interface Navigator<T,C,F,M> {
*/
T getComponentType(T t);
-
- /** The singleton instance. */
- public static final ReflectionNavigator REFLECTION = new ReflectionNavigator();
-
/**
* Gets the i-th type argument from a parameterized type.
*
@@ -357,14 +357,14 @@ public interface Navigator<T,C,F,M> {
String getPackageName(C clazz);
/**
- * Finds the class/interface/enum/annotation of the given name.
+ * Finds ObjectFactory for the given referencePoint.
*
* @param referencePoint
* The class that refers to the specified class.
* @return
* null if not found.
*/
- C findClass(String className, C referencePoint);
+ C loadObjectFactory(C referencePoint, String packageName);
/**
* Returns true if this method is a bridge method as defined in JLS.
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/model/nav/ReflectionNavigator.java b/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/model/nav/ReflectionNavigator.java
index fe2af1d6..665001f8 100644
--- a/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/model/nav/ReflectionNavigator.java
+++ b/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/model/nav/ReflectionNavigator.java
@@ -44,15 +44,18 @@ import com.sun.xml.internal.bind.v2.runtime.Location;
* {@link Navigator} implementation for {@code java.lang.reflect}.
*
*/
-public final class ReflectionNavigator implements Navigator<Type, Class, Field, Method> {
+/*package*/final class ReflectionNavigator implements Navigator<Type, Class, Field, Method> {
- /**
- * Singleton.
- *
- * Use {@link Navigator#REFLECTION}
- */
- ReflectionNavigator() {
+// ---------- Singleton -----------------
+ private static final ReflectionNavigator INSTANCE = new ReflectionNavigator();
+
+ /*package*/static ReflectionNavigator getInstance() {
+ return INSTANCE;
+ }
+
+ private ReflectionNavigator() {
}
+// ---------------------------------------
public Class getSuperClass(Class clazz) {
if (clazz == Object.class) {
@@ -64,6 +67,7 @@ public final class ReflectionNavigator implements Navigator<Type, Class, Field,
}
return sc;
}
+
private static final TypeVisitor<Type, Class> baseClassFinder = new TypeVisitor<Type, Class>() {
public Type onClass(Class c, Class sup) {
@@ -496,7 +500,7 @@ public final class ReflectionNavigator implements Navigator<Type, Class, Field,
c.getDeclaredConstructor();
return true;
} catch (NoSuchMethodException e) {
- return false;
+ return false; // todo: do this WITHOUT exception throw
}
}
@@ -544,13 +548,14 @@ public final class ReflectionNavigator implements Navigator<Type, Class, Field,
}
}
- public Class findClass(String className, Class referencePoint) {
+ @Override
+ public Class loadObjectFactory(Class referencePoint, String pkg) {
+ ClassLoader cl= SecureLoader.getClassClassLoader(referencePoint);
+ if (cl == null)
+ cl = SecureLoader.getSystemClassLoader();
+
try {
- ClassLoader cl = SecureLoader.getClassClassLoader(referencePoint);
- if (cl == null) {
- cl = SecureLoader.getSystemClassLoader();
- }
- return cl.loadClass(className);
+ return cl.loadClass(pkg + ".ObjectFactory");
} catch (ClassNotFoundException e) {
return null;
}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/model/runtime/RuntimeTypeInfoSet.java b/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/model/runtime/RuntimeTypeInfoSet.java
index ab94c05a..fe7596b1 100644
--- a/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/model/runtime/RuntimeTypeInfoSet.java
+++ b/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/model/runtime/RuntimeTypeInfoSet.java
@@ -33,7 +33,6 @@ import java.util.Map;
import javax.xml.namespace.QName;
import com.sun.xml.internal.bind.v2.model.core.TypeInfoSet;
-import com.sun.xml.internal.bind.v2.model.nav.ReflectionNavigator;
/**
* {@link TypeInfoSet} refined for runtime.
@@ -51,5 +50,4 @@ public interface RuntimeTypeInfoSet extends TypeInfoSet<Type,Class,Field,Method>
RuntimeElementInfo getElementInfo( Class scope, QName name );
Map<QName,? extends RuntimeElementInfo> getElementMappings( Class scope );
Iterable<? extends RuntimeElementInfo> getAllElements();
- ReflectionNavigator getNavigator();
}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/ClassBeanInfoImpl.java b/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/ClassBeanInfoImpl.java
index e9819e40..bd6f6cd8 100644
--- a/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/ClassBeanInfoImpl.java
+++ b/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/ClassBeanInfoImpl.java
@@ -48,7 +48,6 @@ import com.sun.xml.internal.bind.api.AccessorException;
import com.sun.xml.internal.bind.v2.ClassFactory;
import com.sun.xml.internal.bind.v2.WellKnownNamespace;
import com.sun.xml.internal.bind.v2.model.core.ID;
-import com.sun.xml.internal.bind.v2.model.nav.Navigator;
import com.sun.xml.internal.bind.v2.model.runtime.RuntimeClassInfo;
import com.sun.xml.internal.bind.v2.model.runtime.RuntimePropertyInfo;
import com.sun.xml.internal.bind.v2.runtime.property.AttributeProperty;
@@ -347,7 +346,7 @@ public final class ClassBeanInfoImpl<BeanT> extends JaxBeanInfo<BeanT> implement
} else if (isThereAnOverridingProperty) {
// need to double check the override - it should be safe to do after the model has been created because it's targeted to override properties only
Class beanClass = bean.getClass();
- if (Navigator.REFLECTION.getDeclaredField(beanClass, p.getFieldName()) == null) {
+ if (Utils.REFLECTION_NAVIGATOR.getDeclaredField(beanClass, p.getFieldName()) == null) {
p.serializeBody(bean, target, null);
}
}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/ElementBeanInfoImpl.java b/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/ElementBeanInfoImpl.java
index 8d946867..a2b96889 100644
--- a/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/ElementBeanInfoImpl.java
+++ b/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/ElementBeanInfoImpl.java
@@ -36,7 +36,6 @@ import javax.xml.stream.XMLStreamException;
import com.sun.xml.internal.bind.api.AccessorException;
import com.sun.xml.internal.bind.v2.model.core.PropertyKind;
-import com.sun.xml.internal.bind.v2.model.nav.Navigator;
import com.sun.xml.internal.bind.v2.model.runtime.RuntimeElementInfo;
import com.sun.xml.internal.bind.v2.model.runtime.RuntimePropertyInfo;
import com.sun.xml.internal.bind.v2.runtime.property.Property;
@@ -81,10 +80,10 @@ public final class ElementBeanInfoImpl extends JaxBeanInfo<JAXBElement> {
this.property = PropertyFactory.create(grammar,rei.getProperty());
tagName = rei.getElementName();
- expectedType = Navigator.REFLECTION.erasure(rei.getContentInMemoryType());
+ expectedType = (Class) Utils.REFLECTION_NAVIGATOR.erasure(rei.getContentInMemoryType());
scope = rei.getScope()==null ? JAXBElement.GlobalScope.class : rei.getScope().getClazz();
- Class type = Navigator.REFLECTION.erasure(rei.getType());
+ Class type = (Class) Utils.REFLECTION_NAVIGATOR.erasure(rei.getType());
if(type==JAXBElement.class)
constructor = null;
else {
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/JAXBContextImpl.java b/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/JAXBContextImpl.java
index 4f518cbd..8454c632 100644
--- a/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/JAXBContextImpl.java
+++ b/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/JAXBContextImpl.java
@@ -65,7 +65,6 @@ import javax.xml.transform.Result;
import javax.xml.transform.Transformer;
import javax.xml.transform.TransformerConfigurationException;
import javax.xml.transform.TransformerFactory;
-import javax.xml.transform.sax.SAXResult;
import javax.xml.transform.sax.SAXTransformerFactory;
import javax.xml.transform.sax.TransformerHandler;
@@ -90,7 +89,6 @@ import com.sun.xml.internal.bind.v2.model.core.Ref;
import com.sun.xml.internal.bind.v2.model.impl.RuntimeBuiltinLeafInfoImpl;
import com.sun.xml.internal.bind.v2.model.impl.RuntimeModelBuilder;
import com.sun.xml.internal.bind.v2.model.nav.Navigator;
-import com.sun.xml.internal.bind.v2.model.nav.ReflectionNavigator;
import com.sun.xml.internal.bind.v2.model.runtime.RuntimeArrayInfo;
import com.sun.xml.internal.bind.v2.model.runtime.RuntimeBuiltinLeafInfo;
import com.sun.xml.internal.bind.v2.model.runtime.RuntimeClassInfo;
@@ -118,7 +116,6 @@ import org.w3c.dom.Element;
import org.w3c.dom.Node;
import org.xml.sax.SAXException;
import org.xml.sax.SAXParseException;
-import org.xml.sax.helpers.DefaultHandler;
/**
* This class provides the implementation of JAXBContext.
@@ -363,7 +360,7 @@ public final class JAXBContextImpl extends JAXBRIContext {
beanInfoMap.put( e.getKey(), beanInfoMap.get(e.getValue()) );
// build bridges
- ReflectionNavigator nav = typeSet.getNavigator();
+ Navigator<Type, Class, Field, Method> nav = typeSet.getNavigator();
for (TypeReference tr : typeRefs) {
XmlJavaTypeAdapter xjta = tr.get(XmlJavaTypeAdapter.class);
@@ -371,7 +368,7 @@ public final class JAXBContextImpl extends JAXBRIContext {
XmlList xl = tr.get(XmlList.class);
// eventually compute the in-memory type
- Class erasedType = nav.erasure(tr.type);
+ Class erasedType = (Class) nav.erasure(tr.type);
if(xjta!=null) {
a = new Adapter<Type,Class>(xjta.value(),nav);
@@ -382,7 +379,7 @@ public final class JAXBContextImpl extends JAXBRIContext {
}
if(a!=null) {
- erasedType = nav.erasure(a.defaultType);
+ erasedType = (Class) nav.erasure(a.defaultType);
}
Name name = nameBuilder.createElementName(tr.tagName);
@@ -877,7 +874,7 @@ public final class JAXBContextImpl extends JAXBRIContext {
// this is a special class we introduced for JAX-WS that we *don't* want in the schema
} else {
NonElement<Type,Class> typeInfo = getXmlType(tis,tr);
- xsdgen.add(tr.tagName, !Navigator.REFLECTION.isPrimitive(tr.type),typeInfo);
+ xsdgen.add(tr.tagName, !tis.getNavigator().isPrimitive(tr.type),typeInfo);
}
}
return xsdgen;
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/Utils.java b/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/Utils.java
new file mode 100644
index 00000000..f4bf2b87
--- /dev/null
+++ b/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/Utils.java
@@ -0,0 +1,82 @@
+/*
+ * Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation. Oracle designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Oracle in the LICENSE file that accompanied this code.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+package com.sun.xml.internal.bind.v2.runtime;
+
+import com.sun.xml.internal.bind.v2.model.nav.Navigator;
+
+import java.lang.reflect.Field;
+import java.lang.reflect.InvocationTargetException;
+import java.lang.reflect.Method;
+import java.lang.reflect.Type;
+import java.util.logging.Level;
+import java.util.logging.Logger;
+
+/**
+ * Utils class.
+ * Has *package private* access to avoid inappropriate usage.
+ */
+/* package */ final class Utils {
+
+ private static final Logger LOGGER = Logger.getLogger(Utils.class.getName());
+
+ /**
+ * static ReflectionNavigator field to avoid usage of reflection every time we use it.
+ */
+ /* package */ static final Navigator<Type, Class, Field, Method> REFLECTION_NAVIGATOR;
+
+ static { // we statically initializing REFLECTION_NAVIGATOR property
+ Class refNav = null;
+ try {
+ refNav = Class.forName("com.sun.xml.internal.bind.v2.model.nav.ReflectionNavigator");
+ //noinspection unchecked
+ Method getInstance = refNav.getDeclaredMethod("getInstance");
+ getInstance.setAccessible(true);
+ //noinspection unchecked
+ REFLECTION_NAVIGATOR = (Navigator<Type, Class, Field, Method>) getInstance.invoke(null);
+ } catch (ClassNotFoundException e) {
+ e.printStackTrace();
+ throw new IllegalStateException("Can't find ReflectionNavigator class");
+ } catch (InvocationTargetException e) {
+ e.printStackTrace();
+ throw new IllegalStateException("ReflectionNavigator.getInstance throws the exception");
+ } catch (NoSuchMethodException e) {
+ e.printStackTrace();
+ throw new IllegalStateException("ReflectionNavigator.getInstance can't be found");
+ } catch (IllegalAccessException e) {
+ e.printStackTrace();
+ throw new IllegalStateException("ReflectionNavigator.getInstance method is inaccessible");
+ } catch (SecurityException e) {
+ LOGGER.log(Level.FINE, "Unable to access ReflectionNavigator.getInstance", e);
+ throw e;
+ }
+ }
+
+ /**
+ * private constructor to avoid util class instantiating
+ */
+ private Utils() {
+ }
+}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/property/ArrayProperty.java b/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/property/ArrayProperty.java
index b970722a..01574d81 100644
--- a/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/property/ArrayProperty.java
+++ b/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/property/ArrayProperty.java
@@ -27,7 +27,6 @@ package com.sun.xml.internal.bind.v2.runtime.property;
import com.sun.xml.internal.bind.api.AccessorException;
-import com.sun.xml.internal.bind.v2.model.nav.Navigator;
import com.sun.xml.internal.bind.v2.model.runtime.RuntimePropertyInfo;
import com.sun.xml.internal.bind.v2.runtime.JAXBContextImpl;
import com.sun.xml.internal.bind.v2.runtime.reflect.Accessor;
@@ -49,7 +48,7 @@ abstract class ArrayProperty<BeanT,ListT,ItemT> extends PropertyImpl<BeanT> {
assert prop.isCollection();
lister = Lister.create(
- Navigator.REFLECTION.erasure(prop.getRawType()),prop.id(),prop.getAdapter());
+ Utils.REFLECTION_NAVIGATOR.erasure(prop.getRawType()),prop.id(),prop.getAdapter());
assert lister!=null;
acc = prop.getAccessor().optimize(context);
assert acc!=null;
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/property/SingleMapNodeProperty.java b/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/property/SingleMapNodeProperty.java
index 09e49ffb..82420725 100644
--- a/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/property/SingleMapNodeProperty.java
+++ b/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/property/SingleMapNodeProperty.java
@@ -42,7 +42,6 @@ import com.sun.xml.internal.bind.api.AccessorException;
import com.sun.xml.internal.bind.v2.ClassFactory;
import com.sun.xml.internal.bind.v2.util.QNameMap;
import com.sun.xml.internal.bind.v2.model.core.PropertyKind;
-import com.sun.xml.internal.bind.v2.model.nav.ReflectionNavigator;
import com.sun.xml.internal.bind.v2.model.runtime.RuntimeMapPropertyInfo;
import com.sun.xml.internal.bind.v2.runtime.JAXBContextImpl;
import com.sun.xml.internal.bind.v2.runtime.JaxBeanInfo;
@@ -98,7 +97,8 @@ final class SingleMapNodeProperty<BeanT,ValueT extends Map> extends PropertyImpl
this.valueBeanInfo = context.getOrCreate(prop.getValueType());
// infer the implementation class
- Class<ValueT> sig = ReflectionNavigator.REFLECTION.erasure(prop.getRawType());
+ //noinspection unchecked
+ Class<ValueT> sig = (Class<ValueT>) Utils.REFLECTION_NAVIGATOR.erasure(prop.getRawType());
mapImplClass = ClassFactory.inferImplClass(sig,knownImplClasses);
// TODO: error check for mapImplClass==null
// what is the error reporting path for this part of the code?
@@ -140,23 +140,22 @@ final class SingleMapNodeProperty<BeanT,ValueT extends Map> extends PropertyImpl
*/
private final Loader itemsLoader = new Loader(false) {
- private ThreadLocal<Stack<BeanT>> target = new ThreadLocal<Stack<BeanT>>();
- private ThreadLocal<Stack<ValueT>> map = new ThreadLocal<Stack<ValueT>>();
+ private ThreadLocal<BeanT> target = new ThreadLocal<BeanT>();
+ private ThreadLocal<ValueT> map = new ThreadLocal<ValueT>();
+ private int depthCounter = 0; // needed to clean ThreadLocals
@Override
public void startElement(UnmarshallingContext.State state, TagName ea) throws SAXException {
// create or obtain the Map object
try {
- BeanT target = (BeanT) state.prev.target;
- ValueT mapValue = acc.get(target);
- if(mapValue == null)
- mapValue = ClassFactory.create(mapImplClass);
- else
- mapValue.clear();
-
- Stack.push(this.target, target);
- Stack.push(map, mapValue);
- state.target = mapValue;
+ target.set((BeanT)state.prev.target);
+ map.set(acc.get(target.get()));
+ depthCounter++;
+ if(map.get() == null) {
+ map.set(ClassFactory.create(mapImplClass));
+ }
+ map.get().clear();
+ state.target = map.get();
} catch (AccessorException e) {
// recover from error by setting a dummy Map that receives and discards the values
handleGenericException(e,true);
@@ -168,7 +167,11 @@ final class SingleMapNodeProperty<BeanT,ValueT extends Map> extends PropertyImpl
public void leaveElement(State state, TagName ea) throws SAXException {
super.leaveElement(state, ea);
try {
- acc.set(Stack.pop(target), Stack.pop(map));
+ acc.set(target.get(), map.get());
+ if (--depthCounter == 0) {
+ target.remove();
+ map.remove();
+ }
} catch (AccessorException ex) {
handleGenericException(ex,true);
}
@@ -286,36 +289,4 @@ final class SingleMapNodeProperty<BeanT,ValueT extends Map> extends PropertyImpl
return acc;
return null;
}
-
- private static final class Stack<T> {
- private Stack<T> parent;
- private T value;
-
- private Stack(Stack<T> parent, T value) {
- this.parent = parent;
- this.value = value;
- }
-
- private Stack(T value) {
- this.value = value;
- }
-
- private static <T> void push(ThreadLocal<Stack<T>> holder, T value) {
- Stack<T> parent = holder.get();
- if (parent == null)
- holder.set(new Stack<T>(value));
- else
- holder.set(new Stack<T>(parent, value));
- }
-
- private static <T> T pop(ThreadLocal<Stack<T>> holder) {
- Stack<T> current = holder.get();
- if (current.parent == null)
- holder.remove();
- else
- holder.set(current.parent);
- return current.value;
- }
-
- }
}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/property/Utils.java b/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/property/Utils.java
new file mode 100644
index 00000000..39cb615f
--- /dev/null
+++ b/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/property/Utils.java
@@ -0,0 +1,82 @@
+/*
+ * Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation. Oracle designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Oracle in the LICENSE file that accompanied this code.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+package com.sun.xml.internal.bind.v2.runtime.property;
+
+import com.sun.xml.internal.bind.v2.model.nav.Navigator;
+
+import java.lang.reflect.Field;
+import java.lang.reflect.InvocationTargetException;
+import java.lang.reflect.Method;
+import java.lang.reflect.Type;
+import java.util.logging.Level;
+import java.util.logging.Logger;
+
+/**
+ * Utils class.
+ * Has *package private* access to avoid inappropriate usage.
+ */
+/* package */ final class Utils {
+
+ private static final Logger LOGGER = Logger.getLogger(Utils.class.getName());
+
+ /**
+ * static ReflectionNavigator field to avoid usage of reflection every time we use it.
+ */
+ /* package */ static final Navigator<Type, Class, Field, Method> REFLECTION_NAVIGATOR;
+
+ static { // we statically initializing REFLECTION_NAVIGATOR property
+ Class refNav = null;
+ try {
+ refNav = Class.forName("com.sun.xml.internal.bind.v2.model.nav.ReflectionNavigator");
+ //noinspection unchecked
+ Method getInstance = refNav.getDeclaredMethod("getInstance");
+ getInstance.setAccessible(true);
+ //noinspection unchecked
+ REFLECTION_NAVIGATOR = (Navigator<Type, Class, Field, Method>) getInstance.invoke(null);
+ } catch (ClassNotFoundException e) {
+ e.printStackTrace();
+ throw new IllegalStateException("Can't find ReflectionNavigator class");
+ } catch (InvocationTargetException e) {
+ e.printStackTrace();
+ throw new IllegalStateException("ReflectionNavigator.getInstance throws the exception");
+ } catch (NoSuchMethodException e) {
+ e.printStackTrace();
+ throw new IllegalStateException("ReflectionNavigator.getInstance can't be found");
+ } catch (IllegalAccessException e) {
+ e.printStackTrace();
+ throw new IllegalStateException("ReflectionNavigator.getInstance method is inaccessible");
+ } catch (SecurityException e) {
+ LOGGER.log(Level.FINE, "Unable to access ReflectionNavigator.getInstance", e);
+ throw e;
+ }
+ }
+
+ /**
+ * private constructor to avoid util class instantiating
+ */
+ private Utils() {
+ }
+}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/reflect/Accessor.java b/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/reflect/Accessor.java
index ed93fbe8..4493d994 100644
--- a/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/reflect/Accessor.java
+++ b/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/reflect/Accessor.java
@@ -46,7 +46,6 @@ import com.sun.xml.internal.bind.api.AccessorException;
import com.sun.xml.internal.bind.api.JAXBRIContext;
import com.sun.xml.internal.bind.v2.model.core.Adapter;
import com.sun.xml.internal.bind.v2.model.impl.RuntimeModelBuilder;
-import com.sun.xml.internal.bind.v2.model.nav.Navigator;
import com.sun.xml.internal.bind.v2.runtime.JAXBContextImpl;
import com.sun.xml.internal.bind.v2.runtime.reflect.opt.OptimizedAccessorFactory;
import com.sun.xml.internal.bind.v2.runtime.unmarshaller.Loader;
@@ -198,7 +197,7 @@ public abstract class Accessor<BeanT, ValueT> implements Receiver {
public final <T> Accessor<BeanT, T> adapt(Adapter<Type, Class> adapter) {
return new AdaptedAccessor<BeanT, ValueT, T>(
- (Class<T>) Navigator.REFLECTION.erasure(adapter.defaultType),
+ (Class<T>) Utils.REFLECTION_NAVIGATOR.erasure(adapter.defaultType),
this,
adapter.adapterType);
}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/reflect/Lister.java b/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/reflect/Lister.java
index f4ea95a9..bac70532 100644
--- a/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/reflect/Lister.java
+++ b/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/reflect/Lister.java
@@ -51,7 +51,6 @@ import com.sun.xml.internal.bind.v2.ClassFactory;
import com.sun.xml.internal.bind.v2.TODO;
import com.sun.xml.internal.bind.v2.model.core.Adapter;
import com.sun.xml.internal.bind.v2.model.core.ID;
-import com.sun.xml.internal.bind.v2.model.nav.Navigator;
import com.sun.xml.internal.bind.v2.runtime.XMLSerializer;
import com.sun.xml.internal.bind.v2.runtime.unmarshaller.Patcher;
import com.sun.xml.internal.bind.v2.runtime.unmarshaller.UnmarshallingContext;
@@ -116,7 +115,7 @@ public abstract class Lister<BeanT,PropT,ItemT,PackT> {
public static <BeanT,PropT,ItemT,PackT>
Lister<BeanT,PropT,ItemT,PackT> create(Type fieldType,ID idness, Adapter<Type,Class> adapter) {
- Class rawType = Navigator.REFLECTION.erasure(fieldType);
+ Class rawType = (Class) Utils.REFLECTION_NAVIGATOR.erasure(fieldType);
Class itemType;
Lister l;
@@ -125,9 +124,9 @@ public abstract class Lister<BeanT,PropT,ItemT,PackT> {
l = getArrayLister(itemType);
} else
if( Collection.class.isAssignableFrom(rawType) ) {
- Type bt = Navigator.REFLECTION.getBaseClass(fieldType,Collection.class);
+ Type bt = Utils.REFLECTION_NAVIGATOR.getBaseClass(fieldType,Collection.class);
if(bt instanceof ParameterizedType)
- itemType = Navigator.REFLECTION.erasure(((ParameterizedType)bt).getActualTypeArguments()[0]);
+ itemType = (Class) Utils.REFLECTION_NAVIGATOR.erasure(((ParameterizedType)bt).getActualTypeArguments()[0]);
else
itemType = Object.class;
l = new CollectionLister(getImplClass(rawType));
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/reflect/TransducedAccessor.java b/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/reflect/TransducedAccessor.java
index b110f111..cb346f2e 100644
--- a/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/reflect/TransducedAccessor.java
+++ b/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/reflect/TransducedAccessor.java
@@ -39,7 +39,6 @@ import com.sun.xml.internal.bind.WhiteSpaceProcessor;
import com.sun.xml.internal.bind.api.AccessorException;
import com.sun.xml.internal.bind.v2.model.core.ID;
import com.sun.xml.internal.bind.v2.model.impl.RuntimeModelBuilder;
-import com.sun.xml.internal.bind.v2.model.nav.Navigator;
import com.sun.xml.internal.bind.v2.model.runtime.RuntimeNonElementRef;
import com.sun.xml.internal.bind.v2.model.runtime.RuntimePropertyInfo;
import com.sun.xml.internal.bind.v2.runtime.Name;
@@ -144,8 +143,7 @@ public abstract class TransducedAccessor<BeanT> {
if(prop.isCollection()) {
return new ListTransducedAccessorImpl(xducer,prop.getAccessor(),
- Lister.create(Navigator.REFLECTION.erasure(prop.getRawType()),prop.id(),
- prop.getAdapter()));
+ Lister.create(Utils.REFLECTION_NAVIGATOR.erasure(prop.getRawType()), prop.id(), prop.getAdapter()));
}
if(prop.id()==ID.IDREF)
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/reflect/Utils.java b/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/reflect/Utils.java
new file mode 100644
index 00000000..011bf192
--- /dev/null
+++ b/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/reflect/Utils.java
@@ -0,0 +1,82 @@
+/*
+ * Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation. Oracle designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Oracle in the LICENSE file that accompanied this code.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+package com.sun.xml.internal.bind.v2.runtime.reflect;
+
+import com.sun.xml.internal.bind.v2.model.nav.Navigator;
+
+import java.lang.reflect.Field;
+import java.lang.reflect.InvocationTargetException;
+import java.lang.reflect.Method;
+import java.lang.reflect.Type;
+import java.util.logging.Level;
+import java.util.logging.Logger;
+
+/**
+ * Utils class.
+ * Has *package private* access to avoid inappropriate usage.
+ */
+/* package */ final class Utils {
+
+ private static final Logger LOGGER = Logger.getLogger(Utils.class.getName());
+
+ /**
+ * static ReflectionNavigator field to avoid usage of reflection every time we use it.
+ */
+ /* package */ static final Navigator<Type, Class, Field, Method> REFLECTION_NAVIGATOR;
+
+ static { // we statically initializing REFLECTION_NAVIGATOR property
+ Class refNav = null;
+ try {
+ refNav = Class.forName("com.sun.xml.internal.bind.v2.model.nav.ReflectionNavigator");
+ //noinspection unchecked
+ Method getInstance = refNav.getDeclaredMethod("getInstance");
+ getInstance.setAccessible(true);
+ //noinspection unchecked
+ REFLECTION_NAVIGATOR = (Navigator<Type, Class, Field, Method>) getInstance.invoke(null);
+ } catch (ClassNotFoundException e) {
+ e.printStackTrace();
+ throw new IllegalStateException("Can't find ReflectionNavigator class");
+ } catch (InvocationTargetException e) {
+ e.printStackTrace();
+ throw new IllegalStateException("ReflectionNavigator.getInstance throws the exception");
+ } catch (NoSuchMethodException e) {
+ e.printStackTrace();
+ throw new IllegalStateException("ReflectionNavigator.getInstance can't be found");
+ } catch (IllegalAccessException e) {
+ e.printStackTrace();
+ throw new IllegalStateException("ReflectionNavigator.getInstance method is inaccessible");
+ } catch (SecurityException e) {
+ LOGGER.log(Level.FINE, "Unable to access ReflectionNavigator.getInstance", e);
+ throw e;
+ }
+ }
+
+ /**
+ * private constructor to avoid util class instantiating
+ */
+ private Utils() {
+ }
+}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/ws/fault/SOAPFaultBuilder.java b/src/share/jaxws_classes/com/sun/xml/internal/ws/fault/SOAPFaultBuilder.java
index aeef6146..92bd3b26 100644
--- a/src/share/jaxws_classes/com/sun/xml/internal/ws/fault/SOAPFaultBuilder.java
+++ b/src/share/jaxws_classes/com/sun/xml/internal/ws/fault/SOAPFaultBuilder.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -58,6 +58,12 @@ import javax.xml.ws.soap.SOAPFaultException;
import java.lang.reflect.Constructor;
import java.lang.reflect.Field;
import java.lang.reflect.Method;
+import java.lang.reflect.ReflectPermission;
+import java.security.AccessControlContext;
+import java.security.AccessController;
+import java.security.Permissions;
+import java.security.PrivilegedAction;
+import java.security.ProtectionDomain;
import java.util.Iterator;
import java.util.Map;
import java.util.logging.Level;
@@ -556,11 +562,40 @@ public abstract class SOAPFaultBuilder {
// ignore
}
captureStackTrace = tmpVal;
+ JAXB_CONTEXT = createJAXBContext();
+ }
- try {
- JAXB_CONTEXT = JAXBContext.newInstance(SOAP11Fault.class, SOAP12Fault.class);
- } catch (JAXBException e) {
- throw new Error(e); // this must be a bug in our code
+ private static JAXBContext createJAXBContext() {
+
+ // in jdk runtime doPrivileged is necessary since JAX-WS internal classes are in restricted packages
+ if (isJDKRuntime()) {
+ Permissions permissions = new Permissions();
+ permissions.add(new RuntimePermission("accessClassInPackage.com.sun." + "xml.internal.ws.fault"));
+ permissions.add(new ReflectPermission("suppressAccessChecks"));
+ return AccessController.doPrivileged(
+ new PrivilegedAction<JAXBContext>() {
+ @Override
+ public JAXBContext run() {
+ try {
+ return JAXBContext.newInstance(SOAP11Fault.class, SOAP12Fault.class);
+ } catch (JAXBException e) {
+ throw new Error(e);
+ }
+ }
+ },
+ new AccessControlContext(new ProtectionDomain[]{new ProtectionDomain(null, permissions)})
+ );
+
+ } else {
+ try {
+ return JAXBContext.newInstance(SOAP11Fault.class, SOAP12Fault.class);
+ } catch (JAXBException e) {
+ throw new Error(e);
+ }
}
}
+
+ private static boolean isJDKRuntime() {
+ return SOAPFaultBuilder.class.getName().contains("internal");
+ }
}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/ws/model/RuntimeModeler.java b/src/share/jaxws_classes/com/sun/xml/internal/ws/model/RuntimeModeler.java
index 63102d46..a466b845 100644
--- a/src/share/jaxws_classes/com/sun/xml/internal/ws/model/RuntimeModeler.java
+++ b/src/share/jaxws_classes/com/sun/xml/internal/ws/model/RuntimeModeler.java
@@ -45,7 +45,6 @@ import com.sun.xml.internal.ws.model.soap.SOAPBindingImpl;
import com.sun.xml.internal.ws.resources.ModelerMessages;
import com.sun.xml.internal.ws.resources.ServerMessages;
import com.sun.xml.internal.ws.spi.db.BindingContext;
-import com.sun.xml.internal.ws.spi.db.BindingHelper;
import com.sun.xml.internal.ws.spi.db.TypeInfo;
import com.sun.xml.internal.ws.spi.db.WrapperComposite;
@@ -886,7 +885,7 @@ public class RuntimeModeler {
//set the actual type argument of Holder in the TypeReference
if (isHolder) {
if(clazzType==Holder.class){
- clazzType = BindingHelper.erasure(((ParameterizedType)genericParameterTypes[pos]).getActualTypeArguments()[0]);
+ clazzType = (Class) Utils.REFLECTION_NAVIGATOR.erasure(((ParameterizedType)genericParameterTypes[pos]).getActualTypeArguments()[0]);
}
}
Mode paramMode = isHolder ? Mode.INOUT : Mode.IN;
@@ -1101,7 +1100,7 @@ public class RuntimeModeler {
//set the actual type argument of Holder in the TypeReference
if (isHolder) {
if (clazzType==Holder.class)
- clazzType = BindingHelper.erasure(((ParameterizedType)genericParameterTypes[pos]).getActualTypeArguments()[0]);
+ clazzType = (Class) Utils.REFLECTION_NAVIGATOR.erasure(((ParameterizedType)genericParameterTypes[pos]).getActualTypeArguments()[0]);
}
Mode paramMode = isHolder ? Mode.INOUT : Mode.IN;
for (Annotation annotation : pannotations[pos]) {
@@ -1347,7 +1346,7 @@ public class RuntimeModeler {
//set the actual type argument of Holder in the TypeReference
if (isHolder) {
if (clazzType==Holder.class)
- clazzType = BindingHelper.erasure(((ParameterizedType)genericParameterTypes[pos]).getActualTypeArguments()[0]);
+ clazzType = (Class) Utils.REFLECTION_NAVIGATOR.erasure(((ParameterizedType)genericParameterTypes[pos]).getActualTypeArguments()[0]);
}
Mode paramMode = isHolder ? Mode.INOUT : Mode.IN;
@@ -1435,14 +1434,14 @@ public class RuntimeModeler {
private Class getAsyncReturnType(Method method, Class returnType) {
if(Response.class.isAssignableFrom(returnType)){
Type ret = method.getGenericReturnType();
- return BindingHelper.erasure(((ParameterizedType)ret).getActualTypeArguments()[0]);
+ return (Class) Utils.REFLECTION_NAVIGATOR.erasure(((ParameterizedType)ret).getActualTypeArguments()[0]);
}else{
Type[] types = method.getGenericParameterTypes();
Class[] params = method.getParameterTypes();
int i = 0;
for(Class cls : params){
if(AsyncHandler.class.isAssignableFrom(cls)){
- return BindingHelper.erasure(((ParameterizedType)types[i]).getActualTypeArguments()[0]);
+ return (Class) Utils.REFLECTION_NAVIGATOR.erasure(((ParameterizedType)types[i]).getActualTypeArguments()[0]);
}
i++;
}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/ws/model/Utils.java b/src/share/jaxws_classes/com/sun/xml/internal/ws/model/Utils.java
new file mode 100644
index 00000000..2f776820
--- /dev/null
+++ b/src/share/jaxws_classes/com/sun/xml/internal/ws/model/Utils.java
@@ -0,0 +1,85 @@
+/*
+ * Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation. Oracle designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Oracle in the LICENSE file that accompanied this code.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+package com.sun.xml.internal.ws.model;
+
+import com.sun.xml.internal.bind.v2.model.nav.Navigator;
+
+import java.lang.reflect.Field;
+import java.lang.reflect.InvocationTargetException;
+import java.lang.reflect.Method;
+import java.lang.reflect.Type;
+import java.util.logging.Level;
+import java.util.logging.Logger;
+
+/**
+ * Utils class.
+ *
+ * WARNING: If you are doing any changes don't forget to change other Utils classes in different packages.
+ *
+ * Has *package private* access to avoid inappropriate usage.
+ */
+/* package */ final class Utils {
+
+ private static final Logger LOGGER = Logger.getLogger(Utils.class.getName());
+
+ /**
+ * static ReflectionNavigator field to avoid usage of reflection every time we use it.
+ */
+ /* package */ static final Navigator<Type, Class, Field, Method> REFLECTION_NAVIGATOR;
+
+ static { // we statically initializing REFLECTION_NAVIGATOR property
+ Class refNav = null;
+ try {
+ refNav = Class.forName("com.sun.xml.internal.bind.v2.model.nav.ReflectionNavigator");
+ //noinspection unchecked
+ Method getInstance = refNav.getDeclaredMethod("getInstance");
+ getInstance.setAccessible(true);
+ //noinspection unchecked
+ REFLECTION_NAVIGATOR = (Navigator<Type, Class, Field, Method>) getInstance.invoke(null);
+ } catch (ClassNotFoundException e) {
+ e.printStackTrace();
+ throw new IllegalStateException("Can't find ReflectionNavigator class");
+ } catch (InvocationTargetException e) {
+ e.printStackTrace();
+ throw new IllegalStateException("ReflectionNavigator.getInstance throws the exception");
+ } catch (NoSuchMethodException e) {
+ e.printStackTrace();
+ throw new IllegalStateException("ReflectionNavigator.getInstance can't be found");
+ } catch (IllegalAccessException e) {
+ e.printStackTrace();
+ throw new IllegalStateException("ReflectionNavigator.getInstance method is inaccessible");
+ } catch (SecurityException e) {
+ LOGGER.log(Level.FINE, "Unable to access ReflectionNavigator.getInstance", e);
+ throw e;
+ }
+ }
+
+ /**
+ * private constructor to avoid util class instantiating
+ */
+ private Utils() {
+ }
+}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/ws/model/WrapperBeanGenerator.java b/src/share/jaxws_classes/com/sun/xml/internal/ws/model/WrapperBeanGenerator.java
index 8f3202e0..d6be9a11 100644
--- a/src/share/jaxws_classes/com/sun/xml/internal/ws/model/WrapperBeanGenerator.java
+++ b/src/share/jaxws_classes/com/sun/xml/internal/ws/model/WrapperBeanGenerator.java
@@ -61,7 +61,7 @@ public class WrapperBeanGenerator {
private static final AbstractWrapperBeanGenerator RUNTIME_GENERATOR =
new RuntimeWrapperBeanGenerator(new RuntimeInlineAnnotationReader(),
- Navigator.REFLECTION, FIELD_FACTORY);
+ (Navigator<java.lang.reflect.Type, Class, ?, Method>) Utils.REFLECTION_NAVIGATOR, FIELD_FACTORY);
private static final class RuntimeWrapperBeanGenerator extends AbstractWrapperBeanGenerator<java.lang.reflect.Type, Class, java.lang.reflect.Method, Field> {
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/ws/spi/db/BindingHelper.java b/src/share/jaxws_classes/com/sun/xml/internal/ws/spi/db/BindingHelper.java
index accb20fc..29ee58c4 100644
--- a/src/share/jaxws_classes/com/sun/xml/internal/ws/spi/db/BindingHelper.java
+++ b/src/share/jaxws_classes/com/sun/xml/internal/ws/spi/db/BindingHelper.java
@@ -136,10 +136,10 @@ public class BindingHelper {
* @since 2.0 FCS
*/
public static @Nullable Type getBaseType(@NotNull Type type, @NotNull Class baseType) {
- return Navigator.REFLECTION.getBaseClass(type,baseType);
+ return Utils.REFLECTION_NAVIGATOR.getBaseClass(type,baseType);
}
public static <T> Class<T> erasure(Type t) {
- return Navigator.REFLECTION.erasure(t);
+ return (Class<T>) Utils.REFLECTION_NAVIGATOR.erasure(t);
}
}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/ws/spi/db/TypeInfo.java b/src/share/jaxws_classes/com/sun/xml/internal/ws/spi/db/TypeInfo.java
index f1f3ba0f..03f0979f 100644
--- a/src/share/jaxws_classes/com/sun/xml/internal/ws/spi/db/TypeInfo.java
+++ b/src/share/jaxws_classes/com/sun/xml/internal/ws/spi/db/TypeInfo.java
@@ -119,12 +119,11 @@ public final class TypeInfo {
// if we are to reinstitute this check, check JAXB annotations only
// assert annotations.length==0; // not designed to work with adapters.
Type t = (genericType != null)? genericType : type;
- Type base = Navigator.REFLECTION.getBaseClass(t, Collection.class);
+ Type base = Utils.REFLECTION_NAVIGATOR.getBaseClass(t, Collection.class);
if(base==null)
return this; // not a collection
- return new TypeInfo(tagName,
- Navigator.REFLECTION.getTypeArgument(base,0));
+ return new TypeInfo(tagName, Utils.REFLECTION_NAVIGATOR.getTypeArgument(base,0));
}
public Map<String, Object> properties() {
@@ -188,9 +187,9 @@ public final class TypeInfo {
}
// if (type instanceof Class && java.util.Collection.class.isAssignableFrom((Class)type)) {
Type t = (genericType != null)? genericType : type;
- Type base = Navigator.REFLECTION.getBaseClass(t, Collection.class);
+ Type base = Utils.REFLECTION_NAVIGATOR.getBaseClass(t, Collection.class);
if ( base != null) {
- return new TypeInfo(tagName, Navigator.REFLECTION.getTypeArgument(base,0), annotations);
+ return new TypeInfo(tagName, Utils.REFLECTION_NAVIGATOR.getTypeArgument(base,0), annotations);
}
return null;
}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/ws/spi/db/Utils.java b/src/share/jaxws_classes/com/sun/xml/internal/ws/spi/db/Utils.java
new file mode 100644
index 00000000..51de25d0
--- /dev/null
+++ b/src/share/jaxws_classes/com/sun/xml/internal/ws/spi/db/Utils.java
@@ -0,0 +1,85 @@
+/*
+ * Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation. Oracle designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Oracle in the LICENSE file that accompanied this code.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+package com.sun.xml.internal.ws.spi.db;
+
+import com.sun.xml.internal.bind.v2.model.nav.Navigator;
+
+import java.lang.reflect.Field;
+import java.lang.reflect.InvocationTargetException;
+import java.lang.reflect.Method;
+import java.lang.reflect.Type;
+import java.util.logging.Level;
+import java.util.logging.Logger;
+
+/**
+ * Utils class.
+ *
+ * WARNING: If you are doing any changes don't forget to change other Utils classes in different packages.
+ *
+ * Has *package private* access to avoid inappropriate usage.
+ */
+/* package */ final class Utils {
+
+ private static final Logger LOGGER = Logger.getLogger(Utils.class.getName());
+
+ /**
+ * static ReflectionNavigator field to avoid usage of reflection every time we use it.
+ */
+ /* package */ static final Navigator<Type, Class, Field, Method> REFLECTION_NAVIGATOR;
+
+ static { // we statically initializing REFLECTION_NAVIGATOR property
+ Class refNav = null;
+ try {
+ refNav = Class.forName("com.sun.xml.internal.bind.v2.model.nav.ReflectionNavigator");
+ //noinspection unchecked
+ Method getInstance = refNav.getDeclaredMethod("getInstance");
+ getInstance.setAccessible(true);
+ //noinspection unchecked
+ REFLECTION_NAVIGATOR = (Navigator<Type, Class, Field, Method>) getInstance.invoke(null);
+ } catch (ClassNotFoundException e) {
+ e.printStackTrace();
+ throw new IllegalStateException("Can't find ReflectionNavigator class");
+ } catch (InvocationTargetException e) {
+ e.printStackTrace();
+ throw new IllegalStateException("ReflectionNavigator.getInstance throws the exception");
+ } catch (NoSuchMethodException e) {
+ e.printStackTrace();
+ throw new IllegalStateException("ReflectionNavigator.getInstance can't be found");
+ } catch (IllegalAccessException e) {
+ e.printStackTrace();
+ throw new IllegalStateException("ReflectionNavigator.getInstance method is inaccessible");
+ } catch (SecurityException e) {
+ LOGGER.log(Level.FINE, "Unable to access ReflectionNavigator.getInstance", e);
+ throw e;
+ }
+ }
+
+ /**
+ * private constructor to avoid util class instantiating
+ */
+ private Utils() {
+ }
+}
diff --git a/src/share/jaxws_classes/javax/xml/bind/TypeConstraintException.java b/src/share/jaxws_classes/javax/xml/bind/TypeConstraintException.java
index b441bd0c..9189d211 100644
--- a/src/share/jaxws_classes/javax/xml/bind/TypeConstraintException.java
+++ b/src/share/jaxws_classes/javax/xml/bind/TypeConstraintException.java
@@ -59,6 +59,7 @@ public class TypeConstraintException extends java.lang.RuntimeException {
*/
private volatile Throwable linkedException;
+ static final long serialVersionUID = -3059799699420143848L;
/**
* Construct a TypeConstraintException with the specified detail message. The