changeset 1307:e681ae177494 icedtea-3.2.0pre02

Merge jdk8u102-b14
author andrew
date Fri, 05 Aug 2016 05:27:06 +0100
parents 16bb2e8a8bc8 (current diff) 81f2d81a48d7 (diff)
children 20d379a78836
files .hgtags
diffstat 4 files changed, 57 insertions(+), 23 deletions(-) [+]
line wrap: on
line diff
--- a/.hgtags	Thu Aug 04 22:38:32 2016 +0100
+++ b/.hgtags	Fri Aug 05 05:27:06 2016 +0100
@@ -619,3 +619,24 @@
 6a0347504d4c4171fcc24bc17749c0559518d862 jdk8u101-b12
 534ca1b701d1e58af14577fc8b466023f44b4bdf icedtea-3.1.0
 cfba1219c991d38b5c31e5034a2aa855f8038887 icedtea-3.2.0pre01
+287f9e9d45cc05b902925346bb6f6ee34a5d5813 jdk8u101-b13
+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
+1f512419ae336ce17f1d16384e34669a81db27ae jdk8u102-b05
+c8f5925b8ec9491d95538d94803cf03b2d75d1b6 jdk8u102-b06
+d4bd96ee50976dc9e4cb308d8728e70ecb03a944 jdk8u102-b07
+ca64f5f827251b5c28046f79c3577fbc8991d3d7 jdk8u102-b08
+5b93dc7249127c6beae1a688b6cea204bac3fdd0 jdk8u102-b09
+7a11148c41b867305b153b6b82d75717accea119 jdk8u102-b10
+0305736a8580ad84733878623eda8f770ae04d60 jdk8u102-b11
+d02665ceefe5b12539bcd2bde95d4ada1a135cb0 jdk8u102-b12
+d84434eb3e4e991812a7b0c3c9e6bfdabae910d0 jdk8u102-b13
--- a/src/share/jaxws_classes/com/sun/tools/internal/xjc/model/CTypeRef.java	Thu Aug 04 22:38:32 2016 +0100
+++ b/src/share/jaxws_classes/com/sun/tools/internal/xjc/model/CTypeRef.java	Fri Aug 05 05:27:06 2016 +0100
@@ -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 @@
      */
     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) {
--- a/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/unmarshaller/StructureLoader.java	Thu Aug 04 22:38:32 2016 +0100
+++ b/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/unmarshaller/StructureLoader.java	Fri Aug 05 05:27:06 2016 +0100
@@ -231,22 +231,11 @@
     @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;
             }
         }
 
--- a/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/schemagen/XmlSchemaGenerator.java	Thu Aug 04 22:38:32 2016 +0100
+++ b/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/schemagen/XmlSchemaGenerator.java	Fri Aug 05 05:27:06 2016 +0100
@@ -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.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 @@
 
         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 @@
                     systemIds.put(n,output.getSystemId());
                 }
             }
+            //Clear the namespace specific set with already written classes
+            n.resetWritten();
         }
 
         // then write'em all
@@ -542,6 +545,11 @@
          */
         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 @@
         }
 
         /**
+         * 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 &lt;import>
@@ -853,6 +868,10 @@
          * @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) {