diff options
author | Raluca Sauciuc <ralucas@google.com> | 2016-08-26 09:30:31 -0700 |
---|---|---|
committer | Raluca Sauciuc <ralucas@google.com> | 2016-08-26 09:30:31 -0700 |
commit | 7081f557de89b5eba9f7f9f148ecdd01057a7b9a (patch) | |
tree | e36a39641fb8cc8b6855496e34336da311c3e17d | |
parent | 581f16e13101971129dd5ca0cd4179bef23f7e5a (diff) | |
parent | 5801022bb9c79582aa94567e3a0c9f7d4cea2b59 (diff) | |
download | jdk8u_jaxws-7081f557de89b5eba9f7f9f148ecdd01057a7b9a.tar.gz |
Merge 'jetbrains-master-mirror' into studio-master-dev
5 files changed, 97 insertions, 26 deletions
@@ -427,6 +427,7 @@ e465c106bfe3feb6e2887fa512511c894c092dde jdk8u51-b16 b189fe14d0f4375961a60d3e8532ca652e1aa592 jdk8u51-b31 ef7893ef8718d205494fd5f79921be7c63b598b0 jdk8u51-b32 e8631058a15d828af4d362cc247b18fc71aefeee jdk8u51-b33 +f806c42dad6de5d20652036de0f6964668435e11 jdk8u51-b34 c8b402c28fe51e25f3298e1266f2ae48bda8d3e0 jdk8u60-b00 7a0dacd12a9e42f581c11edeb51a69af9a8ab16d jdk8u60-b01 5eb3236cc4a7075baf80fc8a258a1f9612e52cf0 jdk8u60-b02 @@ -493,6 +494,11 @@ d0c6921ee6c88e050673cb9cf9f88b7159442c1c jdk8u66-b13 78c988a427d751f5a986af258248b3665950e509 jdk8u66-b17 f3e9f0fcf5560c535bb93735b4c54e2f0257eb1a jdk8u66-b18 f3c71687f52b6c4c331af8f6d200f677b367995c jdk8u66-b31 +7c9c036d03e18c44cf8598ce11c95764180eeed5 jdk8u66-b32 +032a4c3518f29ff55eac6603176e43601f7d0b4a jdk8u66-b33 +030b4033583ac387fa85b4eef968fb1abf0cf39d jdk8u66-b34 +dbd13a86556977545b5318342f8d9495b444c2aa jdk8u66-b35 +440eff28532a0af47e6267a8348554e79038be82 jdk8u66-b36 47fc8ab84f47979b378158626f84b99b6f2b110f jdk8u71-b00 f86ce5ee62ba5d0c91040fa53f0de5b19b20f155 jdk8u71-b01 7d639191d91cd31b87363ed5383b636bed17f757 jdk8u71-b02 @@ -525,7 +531,59 @@ a2473dd1dc0df47425e42d7fed1e4cabdb696154 jdk8u72-b12 4c28352ce19bc25be5de681868a8cddb3f3644a8 jdk8u72-b13 1a523f4b8cc77ef9dfb6d8191742dcd616cd9093 jdk8u72-b14 2f840ac0adf079f0d2f0bac7a9c3fae6ea651271 jdk8u72-b15 +8da626c14c138dd41d4c685800351bf675048628 jdk8u73-b00 +dfc9feacece48fa8450b997e463afae2c1539ac3 jdk8u73-b01 +06fb882f8ed7ff3e58f7aa57e526e55c25ae9992 jdk8u73-b02 +4a5f76111c0b056357d4bdd3e015d649de2db591 jdk8u74-b00 +621e4ac137cd4a04ac1279e75d7fd0625765fd03 jdk8u74-b01 +6cfef18571fd35f45bada34cf4da4b1492ddb878 jdk8u74-b02 +744fab401c4b326f142f5110ad523b1b22f973c8 jdk8u72-b31 +7d7b3488f44e77bedbbcbdee5a4415e5a5bd930c jdk8u75-b00 +d0161a6ecd3bf8c9953e979db8318177e4f2aa86 jdk8u75-b01 +57eb6af19a97a835b07c618d1c0aea50a0577337 jdk8u75-b02 +3412fd49bcbedcc4b0f6ae13a149e53ecde968ae jdk8u75-b03 +6580edbc4511d5a2281138c476700b8ab12165af jdk8u75-b04 +31337d5922975e1655764a7db158154d48866c13 jdk8u75-b05 +7fca20ec14beec302f7a4d446d1d8646a9a0b74f jdk8u75-b06 +97951b6feedbf113dfd09a98fe2625fea775aa09 jdk8u75-b07 +e4c1921d756888d95b47dc6b1eefe3878064a95c jdk8u75-b08 +c302ec60295cd1a5b57e43c28e387556980d1350 jdk8u75-b09 +945844568e956b9b68003f2b0f0528521b578d98 jdk8u75-b10 +ee0c5d0875a3c6022fde6855c6353b68f746f6cd jdk8u75-b12 +a2f8a45d70b21e450fac7ae7d5ca71ce853cf3d0 jdk8u77-b00 +dd34713088c23b7c6ef1adc071dd635bc7bda744 jdk8u77-b01 +7c319d6e0d4c59ebde91b88ba1391ace165b2f01 jdk8u77-b02 +c6f67bea4466783433b1bf1f83a4eb6784a5eb55 jdk8u77-b03 +f66ee2329cd21c3485de1b8e0588f55882a56e0d jdk8u91-b00 +be5935ee38f1bc5132cf318f7badb61af86e2396 jdk8u91-b13 +e71f424e2c966a495b1d47693317288f291a794a jdk8u91-b14 6aba0f814a15966e47aeab61b466894b82c03c70 jdk8u76-b00 60789eebd1fe440255fd3f504221dc8b5553b8c2 jdk8u76-b01 8c7d476c446940edd913ba5a3ca36975febdac28 jdk8u76-b02 4b728dce9390e63f60d9ea445c229430ed059174 jdk8u76-b03 +4dfb56754487262e72d2e76900ddb6db51974f2d jdk8u76-b04 +fb7f4e5348ac9da68c04650bf26c4f4615fce169 jdk8u76-b05 +e28faf4200cb761fe36f3c2900df4bd3abe19ca6 jdk8u76-b06 +8fbdfb6e07112edc2f8ebeb4297354feb5eefd4f jdk8u76-b07 +dd502b0270a0b27adb04cec61672e8aa021aafe9 jdk8u76-b08 +c50275b7bb7aa23ab6c83423f3b1d8e02f604854 jdk8u76-b09 +9a7ea7a7ab734047e6bae7c354f503e7b71bf4c2 jdk8u76-b10 +f31ede81ad1e14724b49c71bae8183e8e36986d0 jdk8u76-b11 +fad3981b329a0d309f4922bbca7335973e32e50f jdk8u76-b12 +451d700ba30ee0d3d201090a9d5dd606b988820e jdk8u92-b00 +008547c7dd3e324c46c2711b54285ca99e2ae0b9 jdk8u92-b13 +759ba92444a9e85434cb381f437aba65e3c9f780 jdk8u92-b14 +6aba0f814a15966e47aeab61b466894b82c03c70 jdk8u76-b00 +60789eebd1fe440255fd3f504221dc8b5553b8c2 jdk8u76-b01 +8c7d476c446940edd913ba5a3ca36975febdac28 jdk8u76-b02 +4b728dce9390e63f60d9ea445c229430ed059174 jdk8u76-b03 +4dfb56754487262e72d2e76900ddb6db51974f2d jdk8u76-b04 +a0c077b39c7a331bda9764a173a2b02d0725f28f jdk8u102-b00 +a0c077b39c7a331bda9764a173a2b02d0725f28f jdk8u82-b00 +c0ad0fa38df0841eaaf81ab40e8b07b42372c5d5 jdk8u102-b01 +face9bd6bac2d43d4c423be4fe733689794c2f08 jdk8u102-b02 +4e12f131bb0dbe0478aecb7ebdfe24b10d3ece75 jdk8u102-b03 +5b1d73ea0eb68cef733eb9379ed71cfb008da72e jdk8u102-b04 +2d1c73175b3a5bd829503734e6eb65426bd12e16 jdk8u112-b00 +10388356386d4c6eaf63dc50a05b5a373b4dde98 jdk8u112-b01 +903e66791568904247b4181ebe3e05275788f02c jdk8u112-b02 @@ -3,7 +3,7 @@ The GNU General Public License (GPL) Version 2, June 1991 Copyright (C) 1989, 1991 Free Software Foundation, Inc. -59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed. @@ -287,8 +287,8 @@ pointer to where the full notice is found. more details. You should have received a copy of the GNU General Public License along - with this program; if not, write to the Free Software Foundation, Inc., 59 - Temple Place, Suite 330, Boston, MA 02111-1307 USA + with this program; if not, write to the Free Software Foundation, Inc., + 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. Also add information on how to contact you by electronic and paper mail. diff --git a/src/share/jaxws_classes/com/sun/tools/internal/xjc/model/CTypeRef.java b/src/share/jaxws_classes/com/sun/tools/internal/xjc/model/CTypeRef.java index 62416b0d..bcea98fe 100644 --- a/src/share/jaxws_classes/com/sun/tools/internal/xjc/model/CTypeRef.java +++ b/src/share/jaxws_classes/com/sun/tools/internal/xjc/model/CTypeRef.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2016, 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 @@ -100,10 +100,15 @@ public final class CTypeRef implements TypeRef<NType,NClass> { */ private static QName resolveSimpleTypeName(XSType declType) { QName name = BGMBuilder.getName(declType); - if (name != null && !XMLConstants.W3C_XML_SCHEMA_NS_URI.equals(name.getNamespaceURI())) - return resolveSimpleTypeName(declType.getBaseType()); - else - return name; + QName result = null; + if (name != null && !XMLConstants.W3C_XML_SCHEMA_NS_URI.equals(name.getNamespaceURI())) { + result = resolveSimpleTypeName(declType.getBaseType()); + } else { + if ( !"anySimpleType".equals(declType.getName()) ) { + result = name; + } + } + return result; } public CTypeRef(CNonElement type, QName elementName, QName typeName, boolean nillable, XmlString defaultValue) { diff --git a/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/unmarshaller/StructureLoader.java b/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/unmarshaller/StructureLoader.java index 0d4fa264..941944b0 100644 --- a/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/unmarshaller/StructureLoader.java +++ b/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/unmarshaller/StructureLoader.java @@ -231,22 +231,11 @@ public final class StructureLoader extends Loader { @Override public void childElement(UnmarshallingContext.State state, TagName arg) throws SAXException { ChildLoader child = childUnmarshallers.get(arg.uri,arg.local); - if(child==null) { - if ((beanInfo != null) && (beanInfo.getTypeNames() != null)) { - Iterator typeNamesIt = beanInfo.getTypeNames().iterator(); - QName parentQName = null; - if ((typeNamesIt != null) && (typeNamesIt.hasNext()) && (catchAll == null)) { - parentQName = (QName) typeNamesIt.next(); - String parentUri = parentQName.getNamespaceURI(); - child = childUnmarshallers.get(parentUri, arg.local); - } - } - if (child == null) { - child = catchAll; - if(child==null) { - super.childElement(state,arg); - return; - } + if (child == null) { + child = catchAll; + if (child==null) { + super.childElement(state,arg); + return; } } diff --git a/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/schemagen/XmlSchemaGenerator.java b/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/schemagen/XmlSchemaGenerator.java index 30c80801..a9cb5bed 100644 --- a/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/schemagen/XmlSchemaGenerator.java +++ b/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/schemagen/XmlSchemaGenerator.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2016, 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 @@ -110,6 +110,7 @@ import com.sun.xml.internal.txw2.TypedXmlWriter; import com.sun.xml.internal.txw2.output.ResultFactory; import com.sun.xml.internal.txw2.output.XmlSerializer; import java.util.Collection; +import java.util.HashSet; import org.xml.sax.SAXParseException; /** @@ -436,7 +437,7 @@ public final class XmlSchemaGenerator<T,C,F,M> { if(logger.isLoggable(Level.FINE)) { // debug logging to see what's going on. - logger.log(Level.FINE,"Wrigin XML Schema for "+toString(),new StackRecorder()); + logger.log(Level.FINE,"Writing XML Schema for "+toString(),new StackRecorder()); } // make it fool-proof @@ -465,6 +466,8 @@ public final class XmlSchemaGenerator<T,C,F,M> { systemIds.put(n,output.getSystemId()); } } + //Clear the namespace specific set with already written classes + n.resetWritten(); } // then write'em all @@ -542,6 +545,11 @@ public final class XmlSchemaGenerator<T,C,F,M> { */ private boolean useMimeNs; + /** + * Container for already processed classes + */ + private final Set<ClassInfo> written = new HashSet<ClassInfo>(); + public Namespace(String uri) { this.uri = uri; assert !XmlSchemaGenerator.this.namespaces.containsKey(uri); @@ -549,6 +557,13 @@ public final class XmlSchemaGenerator<T,C,F,M> { } /** + * Clear out the set of already processed classes for this namespace + */ + void resetWritten() { + written.clear(); + } + + /** * Process the given PropertyInfo looking for references to namespaces that * are foreign to the given namespace. Any foreign namespace references * found are added to the given namespaces dependency list and an <import> @@ -853,6 +868,10 @@ public final class XmlSchemaGenerator<T,C,F,M> { * @param parent the writer of the parent element into which the type will be defined */ private void writeClass(ClassInfo<T,C> c, TypeHost parent) { + if (written.contains(c)) { // to avoid cycles let's check if we haven't already processed the class + return; + } + written.add(c); // special handling for value properties if (containsValueProp(c)) { if (c.getProperties().size() == 1) { |