Mercurial > hg > release > icedtea8-forest-3.0 > jaxws
changeset 964:1c0bd390de66 icedtea-3.0.0pre06
Merge jdk8u60-b24
author | andrew |
---|---|
date | Wed, 30 Sep 2015 16:42:52 +0100 |
parents | 79a9bff0feb8 (current diff) 1c394b3be966 (diff) |
children | 2012603e0e90 |
files | .hgtags |
diffstat | 16 files changed, 272 insertions(+), 202 deletions(-) [+] |
line wrap: on
line diff
--- a/.hgtags Fri Sep 18 04:09:06 2015 +0100 +++ b/.hgtags Wed Sep 30 16:42:52 2015 +0100 @@ -317,6 +317,8 @@ 1277c0d492fd9253f1ea2730eb160953397bd939 jdk8u20-b24 1277c0d492fd9253f1ea2730eb160953397bd939 jdk8u20-b25 7025a2c10ea4116ce8f31bb1e305f732aa1025f0 jdk8u20-b26 +7053deda0ffd69046ef480b3595cf13451b477ec jdk8u20-b31 +2f39063fee48f96fe9cacf704ce30c6fc333ae73 jdk8u20-b32 efc85d318f4697f40bdd1f3757677be97f1758d9 jdk8u25-b00 a76779e1b0376650dfc29a1f3b14760f05e0fc6d jdk8u25-b01 3d31955043b9f1807c9d695c7b5d604d11c132cf jdk8u25-b02 @@ -336,6 +338,26 @@ 4570a7d00aa9bd3df028f52d6f9d8c434163b689 jdk8u25-b16 d47a47f961ee423ce03623098f62d79254c6f328 jdk8u25-b17 cb0ad90bfe3c497c7236c5480447c4bde110934f jdk8u25-b18 +a345282d661be80f2cdee3c43e12fbe01e7ff6d5 jdk8u25-b31 +90b0097a98f161c3e605dc26abf97bb9fc278f33 jdk8u25-b32 +da8457217afd472276c62f558fb1431f7e0e3bc0 jdk8u25-b33 +3a676fe898c93ad3afcaa55a71da96455e5f230e jdk8u31-b00 +1c73ca9179f22d4a73d1a248a3254f891c71ee30 jdk8u31-b01 +c1f1ed28e0bb68d7536fb30bb6f1a3623816b12a jdk8u31-b02 +31893650acaf8935ad395d04cbc1575bada97622 jdk8u31-b03 +60ee8e1e63aee861ea7606c5825c15209bb10aa2 jdk8u31-b04 +e4e3070ba39416ea1f20a6583276117c5498466f jdk8u31-b05 +90cd67a6b6e5e4db93155cc0260a94b55b35bc74 jdk8u31-b06 +06807f9a68358f9684ab59b249760ba2b47cc07b jdk8u31-b07 +45193c5ae26d67cd3dc6961506d8c06803ff646c jdk8u31-b08 +9a310a2276f9a01822b3cfc91268a67cbaaafd0a jdk8u31-b09 +dd0467f3fe130884849ad8fb226d76f02b4cbde4 jdk8u31-b10 +497c783d228ed188d61964edd409794af3ad3e5c jdk8u31-b11 +959e8fca46155528c8147da69a7c49edfb002cb1 jdk8u31-b12 +9d0c737694ece23547c0a27dcd0ba6cbcdf577f2 jdk8u31-b13 +49e91817cbe1b14f856c26f6e55b7151e3f8c3a8 jdk8u31-b31 +9e20c5acb448c5f9b05a4e9b4efc222b3b616c23 jdk8u31-b32 +ea23d583e36301301612946d34ff6aa90d795dd9 jdk8u31-b33 31d43d250c836c13fcc87025837783788c5cd0de jdk8u40-b00 262fb5353ffa661f88b4a9cf2581fcad8c2a43f7 jdk8u40-b01 8043f77ef8a4ded9505269a356c4e2f4f9604cd9 jdk8u40-b02 @@ -360,3 +382,71 @@ 7ba7b06f15cf159affd6883e0577c10e9c857a29 icedtea-3.0.0pre03 db7fdb068af965a0524d0f30056e3e3bbccb3899 icedtea-3.0.0pre04 561f103796e5b19207e2b6cf3275f047da284a62 icedtea-3.0.0pre05 +16485a38b6bc762b363f4e439047486742fbcfcb jdk8u40-b21 +6e928fd9152541eddf25694be89eb881434a5c5f jdk8u40-b22 +b6755a463ccf6a79b1e1a43ed7bdb1c5cb1ac17d jdk8u40-b23 +5fbbfd66643edb81cfa0688825d698dcc5f2eb11 jdk8u40-b24 +b6120aaf2aeef7c5608d578e15e82db7eb24fb2e jdk8u40-b25 +1bcb30bdd9883cc7fc1bf70800ea03a4429eaa80 jdk8u40-b26 +a5f2cdedb940511674e153dce8d3cbc3a0598c9e jdk8u40-b27 +a342e6841e8d3bbef44d4158c980be2ab903e10a jdk8u40-b31 +8960bce00f1abecad665291b0077d6e673c0ff64 jdk8u40-b32 +667a4aee3720373f5c286a50f537afd0ff4b65ae jdk8u45-b00 +cb6added4913f4899bd1689e77be1fe4efcff4f1 jdk8u45-b01 +855a7b9302053546e4da94b67cc3b8956f5b4985 jdk8u45-b02 +698a88182586b0914b204de27cc45d6f0dfe7683 jdk8u45-b03 +c7307f75843b64e6096205425ba2f7387017ee9e jdk8u45-b04 +6bd873f17e03cf285f576f69340123e3b2d8922f jdk8u45-b05 +a5e99f4d067ebea01e438e5b3e9b09bda47ddb25 jdk8u45-b06 +145ea6d2899f5cc6bd4e1108903e4d22ad063eca jdk8u45-b07 +f3d678fe58e7c026fb62be8b72c46ce1015aadf6 jdk8u45-b08 +8f2e5110151810dc5b56a3ce05d955e400bee937 jdk8u45-b09 +5cf887e3e1368d1910181eaab2794b25058fe8b6 jdk8u45-b10 +855fd9dfcbee177b508413dbab6e46b57dd367c4 jdk8u45-b11 +3f6c3f48179ac8bab98509be8708edcea32727b6 jdk8u45-b12 +15fb2359f5f86dbacc1bc120f663853b5292cd14 jdk8u45-b13 +bad02ac45d59b5096032cf42bb880dcddffa84b4 jdk8u45-b14 +cc7d796b8f12cc11d415f8ae0ef2d952274fc069 jdk8u45-b15 +8a7494ab96913de396a8f38dd324ac52c44b1a80 jdk8u45-b31 +1c022144b99b859336914740e571c672e51ee1b9 jdk8u45-b32 +74aae7549ef8c6e9f394b75c840bf293e2664858 jdk8u51-b00 +78d8cafb17e46dd2453704f679ca1e431e4df0ba jdk8u51-b01 +9bd6f57d97e5423d5f25774b095124cbe1eeb9c1 jdk8u51-b02 +a9ed1bcefec1ee0d30ea8cf700cf0813d8588eb0 jdk8u51-b03 +3d07c26d5012f47ef274043a6204db686769d65d jdk8u51-b04 +834da1120e80f17356475a5d3f06a678355dbbf6 jdk8u51-b05 +243ba3774d18cfe2e56fa0e0474255787c360d07 jdk8u51-b06 +13d1721eae3bdea08dcd7b84e0856e6769caafc9 jdk8u51-b07 +cbba234a2b481b236e2bf78c892111b86f6bba81 jdk8u51-b08 +9116c6bb2ffa6bb624ad39f7a98b7b9bed4512dc jdk8u51-b09 +783b917616ab6977f9b3157667d1493636ba66d1 jdk8u51-b10 +5a69995912aae8bd61758e95a3b5edac167b6acc jdk8u51-b11 +1a855f69de645c4bd485d5fb6d9a524994278a16 jdk8u51-b12 +880b67345f557d5613071d09c1cf234a7e1b8759 jdk8u51-b13 +4a6824c3fd8d74f83daac1a79952786837a9848c jdk8u51-b14 +dde8e5b2366b9a08d7448c3cef2cabc710cc9da5 jdk8u51-b15 +e465c106bfe3feb6e2887fa512511c894c092dde jdk8u51-b16 +c8b402c28fe51e25f3298e1266f2ae48bda8d3e0 jdk8u60-b00 +7a0dacd12a9e42f581c11edeb51a69af9a8ab16d jdk8u60-b01 +5eb3236cc4a7075baf80fc8a258a1f9612e52cf0 jdk8u60-b02 +3e52068e8b9df8a9bb7a0594fab7f4132817ac3d jdk8u60-b03 +02b1d3c68132b14a36e5d1df9b4a53c7981469b4 jdk8u60-b04 +4dfd5dbd3014db59f92d54cf215f7e7ed4508044 jdk8u60-b05 +a22a9460d53fb519b00e118c98ee0cb5e981b659 jdk8u60-b06 +6f0885023e43fe44cade86e3dd77350d9ecbc4b4 jdk8u60-b07 +078fde829e878595fcd9122a52ea5cfafe6685a8 jdk8u60-b08 +fbb7b2d1321fdb7345e163bbc8c01a307f9d9d38 jdk8u60-b09 +3e7a28ca602befafcd6329a60c00e5b36c4e69c6 jdk8u60-b10 +334320b978e06d309d9a9ec67097f982128fad91 jdk8u60-b11 +fab06c192b0b246656e47aacab2fb555e3ca2cb7 jdk8u60-b12 +4390fe716719a6966e10bf9cce4b8752f9cf5d96 jdk8u60-b13 +feb70717506da80f712f0b942d77527d2cc4cde5 jdk8u60-b14 +8c0018c9c533126cf3f7e912936f6e227bd1e96c jdk8u60-b15 +1c9eb173022b4b95ef6c93685b62b3039ccf8d92 jdk8u60-b16 +d6a80a0a3e9aca2b40f80709c9ce6c471b8902cf jdk8u60-b17 +53361b1cead8fc5ab1619a0b3baec8d4b411319d jdk8u60-b18 +5b422975b71def8c5a16a4f303c8fb8b108dc0cf jdk8u60-b19 +1a4b2888aa98ea70aad849e35e05b48e1c107503 jdk8u60-b20 +a414aec2d19cf692310587518546842070b80cb8 jdk8u60-b21 +6079c26a3b8fa1ead3d26a9de6ade2af71f1fb94 jdk8u60-b22 +c21563403b7a043be3d8f1afdd314e91438e357c jdk8u60-b23
--- a/THIRD_PARTY_README Fri Sep 18 04:09:06 2015 +0100 +++ b/THIRD_PARTY_README Wed Sep 30 16:42:52 2015 +0100 @@ -1140,37 +1140,6 @@ -------------------------------------------------------------------------------- -%% 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 may be included with JRE 8, JDK 8, and OpenJDK 8. @@ -1250,7 +1219,7 @@ ------------------------------------------------------------------------------- -%% This notice is provided with respect to libpng 1.5.4, which may be +%% This notice is provided with respect to libpng 1.6.16, which may be included with JRE 8, JDK 8, and OpenJDK 8. --- begin of LICENSE --- @@ -1266,8 +1235,8 @@ 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 +libpng versions 1.2.6, August 15, 2004, through 1.6.16, December 22, 2014, are +Copyright (c) 2004, 2006-2014 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 @@ -1364,13 +1333,13 @@ Glenn Randers-Pehrson glennrp at users.sourceforge.net -July 7, 2011 +December 22, 2014 --- end of LICENSE --- ------------------------------------------------------------------------------- -%% This notice is provided with respect to libungif 4.1.3, which may be +%% This notice is provided with respect to GIFLIB 5.1.1 & libungif 4.1.3, which may be included with JRE 8, JDK 8, and OpenJDK 8. --- begin of LICENSE --- @@ -1399,13 +1368,13 @@ ------------------------------------------------------------------------------- -%% This notice is provided with respect to Little CMS 2.5, which may be +%% This notice is provided with respect to Little CMS 2.7, which may be included with JRE 8, JDK 8, and OpenJDK 8. --- begin of LICENSE --- Little CMS -Copyright (c) 1998-2011 Marti Maria Saguer +Copyright (c) 1998-2015 Marti Maria Saguer Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal
--- a/src/share/jaxws_classes/com/sun/tools/internal/jxc/ap/SchemaGenerator.java Fri Sep 18 04:09:06 2015 +0100 +++ b/src/share/jaxws_classes/com/sun/tools/internal/jxc/ap/SchemaGenerator.java Wed Sep 30 16:42:52 2015 +0100 @@ -135,7 +135,7 @@ private void filterClass(List<Reference> classes, Collection<? extends Element> elements) { for (Element element : elements) { - if (element.getKind().equals(ElementKind.CLASS)) { + if (element.getKind().equals(ElementKind.CLASS) || element.getKind().equals(ElementKind.ENUM)) { classes.add(new Reference((TypeElement) element, processingEnv)); filterClass(classes, ElementFilter.typesIn(element.getEnclosedElements())); }
--- a/src/share/jaxws_classes/com/sun/tools/internal/jxc/model/nav/ApNavigator.java Fri Sep 18 04:09:06 2015 +0100 +++ b/src/share/jaxws_classes/com/sun/tools/internal/jxc/model/nav/ApNavigator.java Wed Sep 30 16:42:52 2015 +0100 @@ -30,7 +30,12 @@ import com.sun.source.util.Trees; import com.sun.xml.internal.bind.v2.model.nav.Navigator; import com.sun.xml.internal.bind.v2.runtime.Location; - +import java.lang.annotation.Annotation; +import java.util.ArrayList; +import java.util.Collection; +import java.util.HashMap; +import java.util.List; +import java.util.Map; import javax.annotation.processing.ProcessingEnvironment; import javax.lang.model.element.AnnotationMirror; import javax.lang.model.element.Element; @@ -52,12 +57,6 @@ import javax.lang.model.util.Elements; import javax.lang.model.util.SimpleTypeVisitor6; import javax.lang.model.util.Types; -import java.lang.annotation.Annotation; -import java.util.Collection; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; /** * {@link Navigator} implementation for annotation processing. @@ -241,7 +240,7 @@ public VariableElement[] getEnumConstants(TypeElement clazz) { List<? extends Element> elements = env.getElementUtils().getAllMembers(clazz); - Collection<VariableElement> constants = new HashSet<VariableElement>(); + Collection<VariableElement> constants = new ArrayList<VariableElement>(); for (Element element : elements) { if (element.getKind().equals(ElementKind.ENUM_CONSTANT)) { constants.add((VariableElement) element);
--- a/src/share/jaxws_classes/com/sun/tools/internal/xjc/model/nav/Utils.java Fri Sep 18 04:09:06 2015 +0100 +++ b/src/share/jaxws_classes/com/sun/tools/internal/xjc/model/nav/Utils.java Wed Sep 30 16:42:52 2015 +0100 @@ -38,6 +38,9 @@ /** * 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. */ final class Utils { @@ -51,17 +54,20 @@ static { // we statically initializing REFLECTION_NAVIGATOR property try { - Class refNav = Class.forName("com.sun.xml.internal.bind.v2.model.nav.ReflectionNavigator"); - //noinspection unchecked - final Method getInstance = refNav.getDeclaredMethod("getInstance"); + final Class refNav = Class.forName("com.sun.xml.internal.bind.v2.model.nav.ReflectionNavigator"); // requires accessClassInPackage privilege - AccessController.doPrivileged( - new PrivilegedAction<Object>() { + final Method getInstance = AccessController.doPrivileged( + new PrivilegedAction<Method>() { @Override - public Object run() { - getInstance.setAccessible(true); - return null; + public Method run() { + try { + Method getInstance = refNav.getDeclaredMethod("getInstance"); + getInstance.setAccessible(true); + return getInstance; + } catch (NoSuchMethodException e) { + throw new IllegalStateException("ReflectionNavigator.getInstance can't be found"); + } } } ); @@ -69,16 +75,10 @@ //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);
--- a/src/share/jaxws_classes/com/sun/xml/internal/bind/api/Utils.java Fri Sep 18 04:09:06 2015 +0100 +++ b/src/share/jaxws_classes/com/sun/xml/internal/bind/api/Utils.java Wed Sep 30 16:42:52 2015 +0100 @@ -38,6 +38,9 @@ /** * 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. */ final class Utils { @@ -51,17 +54,20 @@ static { // we statically initializing REFLECTION_NAVIGATOR property try { - Class refNav = Class.forName("com.sun.xml.internal.bind.v2.model.nav.ReflectionNavigator"); - //noinspection unchecked - final Method getInstance = refNav.getDeclaredMethod("getInstance"); + final Class refNav = Class.forName("com.sun.xml.internal.bind.v2.model.nav.ReflectionNavigator"); // requires accessClassInPackage privilege - AccessController.doPrivileged( - new PrivilegedAction<Object>() { + final Method getInstance = AccessController.doPrivileged( + new PrivilegedAction<Method>() { @Override - public Object run() { - getInstance.setAccessible(true); - return null; + public Method run() { + try { + Method getInstance = refNav.getDeclaredMethod("getInstance"); + getInstance.setAccessible(true); + return getInstance; + } catch (NoSuchMethodException e) { + throw new IllegalStateException("ReflectionNavigator.getInstance can't be found"); + } } } ); @@ -69,16 +75,10 @@ //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);
--- a/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/model/impl/RuntimeBuiltinLeafInfoImpl.java Fri Sep 18 04:09:06 2015 +0100 +++ b/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/model/impl/RuntimeBuiltinLeafInfoImpl.java Wed Sep 30 16:42:52 2015 +0100 @@ -43,6 +43,8 @@ import java.net.URI; import java.net.URISyntaxException; import java.net.URL; +import java.security.AccessController; +import java.security.PrivilegedAction; import java.util.ArrayList; import java.util.Calendar; import java.util.Collections; @@ -197,7 +199,15 @@ static { - QName[] qnames = (System.getProperty(MAP_ANYURI_TO_URI) == null) ? new QName[] { + String MAP_ANYURI_TO_URI_VALUE = AccessController.doPrivileged( + new PrivilegedAction<String>() { + @Override + public String run() { + return System.getProperty(MAP_ANYURI_TO_URI); + } + } + ); + QName[] qnames = (MAP_ANYURI_TO_URI_VALUE == null) ? new QName[] { createXS("string"), createXS("anySimpleType"), createXS("normalizedString"), @@ -310,7 +320,7 @@ return v.toExternalForm(); } }); - if (System.getProperty(MAP_ANYURI_TO_URI) == null) { + if (MAP_ANYURI_TO_URI_VALUE == null) { secondaryList.add( new StringImpl<URI>(URI.class, createXS("string")) { public URI parse(CharSequence text) throws SAXException { @@ -774,17 +784,18 @@ } }); primaryList.add( - new StringImpl<BigDecimal>(BigDecimal.class, - createXS("decimal") + new StringImpl<BigDecimal>(BigDecimal.class, + createXS("decimal") ) { - public BigDecimal parse(CharSequence text) { - return DatatypeConverterImpl._parseDecimal(text.toString()); + public BigDecimal parse(CharSequence text) { + return DatatypeConverterImpl._parseDecimal(text.toString()); + } + + public String print(BigDecimal v) { + return DatatypeConverterImpl._printDecimal(v); + } } - - public String print(BigDecimal v) { - return DatatypeConverterImpl._printDecimal(v); - } - }); + ); primaryList.add( new StringImpl<QName>(QName.class, createXS("QName") @@ -812,7 +823,7 @@ w.getNamespaceContext().declareNamespace(v.getNamespaceURI(),v.getPrefix(),false); } }); - if (System.getProperty(MAP_ANYURI_TO_URI) != null) { + if (MAP_ANYURI_TO_URI_VALUE != null) { primaryList.add( new StringImpl<URI>(URI.class, createXS("anyURI")) { public URI parse(CharSequence text) throws SAXException { @@ -830,16 +841,17 @@ }); } primaryList.add( - new StringImpl<Duration>(Duration.class, createXS("duration")) { - public String print(Duration duration) { - return duration.toString(); - } + new StringImpl<Duration>(Duration.class, createXS("duration")) { + public String print(Duration duration) { + return duration.toString(); + } - public Duration parse(CharSequence lexical) { - TODO.checkSpec("JSR222 Issue #42"); - return DatatypeConverterImpl.getDatatypeFactory().newDuration(lexical.toString()); + public Duration parse(CharSequence lexical) { + TODO.checkSpec("JSR222 Issue #42"); + return DatatypeConverterImpl.getDatatypeFactory().newDuration(lexical.toString()); + } } - }); + ); primaryList.add( new StringImpl<Void>(Void.class) { // 'void' binding isn't defined by the spec, but when the JAX-RPC processes user-defined
--- a/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/model/impl/Utils.java Fri Sep 18 04:09:06 2015 +0100 +++ b/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/model/impl/Utils.java Wed Sep 30 16:42:52 2015 +0100 @@ -38,6 +38,9 @@ /** * 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. */ final class Utils { @@ -51,17 +54,20 @@ static { // we statically initializing REFLECTION_NAVIGATOR property try { - Class refNav = Class.forName("com.sun.xml.internal.bind.v2.model.nav.ReflectionNavigator"); - //noinspection unchecked - final Method getInstance = refNav.getDeclaredMethod("getInstance"); + final Class refNav = Class.forName("com.sun.xml.internal.bind.v2.model.nav.ReflectionNavigator"); // requires accessClassInPackage privilege - AccessController.doPrivileged( - new PrivilegedAction<Object>() { + final Method getInstance = AccessController.doPrivileged( + new PrivilegedAction<Method>() { @Override - public Object run() { - getInstance.setAccessible(true); - return null; + public Method run() { + try { + Method getInstance = refNav.getDeclaredMethod("getInstance"); + getInstance.setAccessible(true); + return getInstance; + } catch (NoSuchMethodException e) { + throw new IllegalStateException("ReflectionNavigator.getInstance can't be found"); + } } } ); @@ -69,16 +75,10 @@ //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);
--- a/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/Utils.java Fri Sep 18 04:09:06 2015 +0100 +++ b/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/Utils.java Wed Sep 30 16:42:52 2015 +0100 @@ -38,6 +38,9 @@ /** * 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. */ final class Utils { @@ -51,17 +54,20 @@ static { // we statically initializing REFLECTION_NAVIGATOR property try { - Class refNav = Class.forName("com.sun.xml.internal.bind.v2.model.nav.ReflectionNavigator"); - //noinspection unchecked - final Method getInstance = refNav.getDeclaredMethod("getInstance"); + final Class refNav = Class.forName("com.sun.xml.internal.bind.v2.model.nav.ReflectionNavigator"); // requires accessClassInPackage privilege - AccessController.doPrivileged( - new PrivilegedAction<Object>() { + final Method getInstance = AccessController.doPrivileged( + new PrivilegedAction<Method>() { @Override - public Object run() { - getInstance.setAccessible(true); - return null; + public Method run() { + try { + Method getInstance = refNav.getDeclaredMethod("getInstance"); + getInstance.setAccessible(true); + return getInstance; + } catch (NoSuchMethodException e) { + throw new IllegalStateException("ReflectionNavigator.getInstance can't be found"); + } } } ); @@ -69,16 +75,10 @@ //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);
--- a/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/property/Utils.java Fri Sep 18 04:09:06 2015 +0100 +++ b/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/property/Utils.java Wed Sep 30 16:42:52 2015 +0100 @@ -38,6 +38,9 @@ /** * 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. */ final class Utils { @@ -51,17 +54,20 @@ static { // we statically initializing REFLECTION_NAVIGATOR property try { - Class refNav = Class.forName("com.sun.xml.internal.bind.v2.model.nav.ReflectionNavigator"); - //noinspection unchecked - final Method getInstance = refNav.getDeclaredMethod("getInstance"); + final Class refNav = Class.forName("com.sun.xml.internal.bind.v2.model.nav.ReflectionNavigator"); // requires accessClassInPackage privilege - AccessController.doPrivileged( - new PrivilegedAction<Object>() { + final Method getInstance = AccessController.doPrivileged( + new PrivilegedAction<Method>() { @Override - public Object run() { - getInstance.setAccessible(true); - return null; + public Method run() { + try { + Method getInstance = refNav.getDeclaredMethod("getInstance"); + getInstance.setAccessible(true); + return getInstance; + } catch (NoSuchMethodException e) { + throw new IllegalStateException("ReflectionNavigator.getInstance can't be found"); + } } } ); @@ -69,16 +75,10 @@ //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);
--- a/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/reflect/Utils.java Fri Sep 18 04:09:06 2015 +0100 +++ b/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/reflect/Utils.java Wed Sep 30 16:42:52 2015 +0100 @@ -38,6 +38,9 @@ /** * 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. */ final class Utils { @@ -51,17 +54,20 @@ static { // we statically initializing REFLECTION_NAVIGATOR property try { - Class refNav = Class.forName("com.sun.xml.internal.bind.v2.model.nav.ReflectionNavigator"); - //noinspection unchecked - final Method getInstance = refNav.getDeclaredMethod("getInstance"); + final Class refNav = Class.forName("com.sun.xml.internal.bind.v2.model.nav.ReflectionNavigator"); // requires accessClassInPackage privilege - AccessController.doPrivileged( - new PrivilegedAction<Object>() { + final Method getInstance = AccessController.doPrivileged( + new PrivilegedAction<Method>() { @Override - public Object run() { - getInstance.setAccessible(true); - return null; + public Method run() { + try { + Method getInstance = refNav.getDeclaredMethod("getInstance"); + getInstance.setAccessible(true); + return getInstance; + } catch (NoSuchMethodException e) { + throw new IllegalStateException("ReflectionNavigator.getInstance can't be found"); + } } } ); @@ -69,16 +75,10 @@ //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);
--- a/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/util/XmlFactory.java Fri Sep 18 04:09:06 2015 +0100 +++ b/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/util/XmlFactory.java Wed Sep 30 16:42:52 2015 +0100 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2013, 2014, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -25,8 +25,10 @@ package com.sun.xml.internal.bind.v2.util; -import com.sun.xml.internal.bind.Util; import com.sun.xml.internal.bind.v2.Messages; + +import java.security.AccessController; +import java.security.PrivilegedAction; import java.util.logging.Level; import java.util.logging.Logger; import javax.xml.XMLConstants; @@ -43,8 +45,6 @@ import org.xml.sax.SAXNotRecognizedException; import org.xml.sax.SAXNotSupportedException; -import static com.sun.xml.internal.bind.Util.getSystemProperty; - /** * Provides helper methods for creating properly configured XML parser * factory instances with namespace support turned on and configured for @@ -68,7 +68,14 @@ */ private static final String DISABLE_XML_SECURITY = "com.sun.xml.internal.bind.disableXmlSecurity"; - public static final boolean XML_SECURITY_DISABLED = Boolean.parseBoolean(getSystemProperty(DISABLE_XML_SECURITY)); + private static final boolean XML_SECURITY_DISABLED = AccessController.doPrivileged( + new PrivilegedAction<Boolean>() { + @Override + public Boolean run() { + return Boolean.getBoolean(DISABLE_XML_SECURITY); + } + } + ); private static boolean isXMLSecurityDisabled(boolean runtimeSetting) { return XML_SECURITY_DISABLED || runtimeSetting;
--- a/src/share/jaxws_classes/com/sun/xml/internal/ws/model/Utils.java Fri Sep 18 04:09:06 2015 +0100 +++ b/src/share/jaxws_classes/com/sun/xml/internal/ws/model/Utils.java Wed Sep 30 16:42:52 2015 +0100 @@ -54,17 +54,20 @@ static { // we statically initializing REFLECTION_NAVIGATOR property try { - Class refNav = Class.forName("com.sun.xml.internal.bind.v2.model.nav.ReflectionNavigator"); - //noinspection unchecked - final Method getInstance = refNav.getDeclaredMethod("getInstance"); + final Class refNav = Class.forName("com.sun.xml.internal.bind.v2.model.nav.ReflectionNavigator"); // requires accessClassInPackage privilege - AccessController.doPrivileged( - new PrivilegedAction<Object>() { + final Method getInstance = AccessController.doPrivileged( + new PrivilegedAction<Method>() { @Override - public Object run() { - getInstance.setAccessible(true); - return null; + public Method run() { + try { + Method getInstance = refNav.getDeclaredMethod("getInstance"); + getInstance.setAccessible(true); + return getInstance; + } catch (NoSuchMethodException e) { + throw new IllegalStateException("ReflectionNavigator.getInstance can't be found"); + } } } ); @@ -72,16 +75,10 @@ //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);
--- a/src/share/jaxws_classes/com/sun/xml/internal/ws/spi/ProviderImpl.java Fri Sep 18 04:09:06 2015 +0100 +++ b/src/share/jaxws_classes/com/sun/xml/internal/ws/spi/ProviderImpl.java Wed Sep 30 16:42:52 2015 +0100 @@ -147,19 +147,12 @@ } public EndpointReference readEndpointReference(final Source eprInfoset) { - // EPR constructors are private, so we need privilege escalation. - // this unmarshalling can only access instances of a fixed, known set of classes, - // so doing that shouldn't introduce security vulnerability. - return AccessController.doPrivileged(new PrivilegedAction<EndpointReference>() { - public EndpointReference run() { - try { - Unmarshaller unmarshaller = eprjc.get().createUnmarshaller(); - return (EndpointReference) unmarshaller.unmarshal(eprInfoset); - } catch (JAXBException e) { - throw new WebServiceException("Error creating Marshaller or marshalling.", e); - } - } - }); + try { + Unmarshaller unmarshaller = eprjc.get().createUnmarshaller(); + return (EndpointReference) unmarshaller.unmarshal(eprInfoset); + } catch (JAXBException e) { + throw new WebServiceException("Error creating Marshaller or marshalling.", e); + } } public <T> T getPort(EndpointReference endpointReference, Class<T> clazz, WebServiceFeature... webServiceFeatures) {
--- a/src/share/jaxws_classes/com/sun/xml/internal/ws/spi/db/Utils.java Fri Sep 18 04:09:06 2015 +0100 +++ b/src/share/jaxws_classes/com/sun/xml/internal/ws/spi/db/Utils.java Wed Sep 30 16:42:52 2015 +0100 @@ -54,17 +54,20 @@ static { // we statically initializing REFLECTION_NAVIGATOR property try { - Class refNav = Class.forName("com.sun.xml.internal.bind.v2.model.nav.ReflectionNavigator"); - //noinspection unchecked - final Method getInstance = refNav.getDeclaredMethod("getInstance"); + final Class refNav = Class.forName("com.sun.xml.internal.bind.v2.model.nav.ReflectionNavigator"); // requires accessClassInPackage privilege - AccessController.doPrivileged( - new PrivilegedAction<Object>() { + final Method getInstance = AccessController.doPrivileged( + new PrivilegedAction<Method>() { @Override - public Object run() { - getInstance.setAccessible(true); - return null; + public Method run() { + try { + Method getInstance = refNav.getDeclaredMethod("getInstance"); + getInstance.setAccessible(true); + return getInstance; + } catch (NoSuchMethodException e) { + throw new IllegalStateException("ReflectionNavigator.getInstance can't be found"); + } } } ); @@ -72,16 +75,10 @@ //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);
--- a/src/share/jaxws_classes/com/sun/xml/internal/ws/util/xml/XmlUtil.java Fri Sep 18 04:09:06 2015 +0100 +++ b/src/share/jaxws_classes/com/sun/xml/internal/ws/util/xml/XmlUtil.java Wed Sep 30 16:42:52 2015 +0100 @@ -63,6 +63,8 @@ import java.io.OutputStreamWriter; import java.io.Writer; import java.net.URL; +import java.security.AccessController; +import java.security.PrivilegedAction; import java.util.ArrayList; import java.util.Enumeration; import java.util.Iterator; @@ -84,12 +86,16 @@ private static final Logger LOGGER = Logger.getLogger(XmlUtil.class.getName()); - private static boolean XML_SECURITY_DISABLED; + private static final String DISABLE_XML_SECURITY = "com.sun.xml.internal.ws.disableXmlSecurity"; - static { - String disableXmlSecurity = System.getProperty("com.sun.xml.internal.ws.disableXmlSecurity"); - XML_SECURITY_DISABLED = disableXmlSecurity == null || !Boolean.valueOf(disableXmlSecurity); - } + private static boolean XML_SECURITY_DISABLED = AccessController.doPrivileged( + new PrivilegedAction<Boolean>() { + @Override + public Boolean run() { + return Boolean.getBoolean(DISABLE_XML_SECURITY); + } + } + ); public static String getPrefix(String s) { int i = s.indexOf(':');