Thu, 28 Apr 2016 09:56:56 -0700
Merge
.hgtags | file | annotate | diff | comparison | revisions |
1.1 --- a/.hgtags Mon Apr 11 12:32:25 2016 -0700 1.2 +++ b/.hgtags Thu Apr 28 09:56:56 2016 -0700 1.3 @@ -588,4 +588,18 @@ 1.4 0bff22fbd91f48c37f7c5a4544929231b92bd9bf jdk8u101-b01 1.5 31e437ae0354e628a675bc4eb6b9ca67af552fc2 jdk8u101-b02 1.6 2a5ea5a78ae7332b3d13af5580418ca9d186cda7 jdk8u101-b03 1.7 +d3b054313ed2d29f9dbbdfd71a7ab3c4ad4eb5b6 jdk8u101-b04 1.8 +0a657e4d5ed57bf3216b96915633b661f6532be5 jdk8u101-b05 1.9 +6aba0f814a15966e47aeab61b466894b82c03c70 jdk8u76-b00 1.10 +60789eebd1fe440255fd3f504221dc8b5553b8c2 jdk8u76-b01 1.11 +8c7d476c446940edd913ba5a3ca36975febdac28 jdk8u76-b02 1.12 +4b728dce9390e63f60d9ea445c229430ed059174 jdk8u76-b03 1.13 +4dfb56754487262e72d2e76900ddb6db51974f2d jdk8u76-b04 1.14 +a0c077b39c7a331bda9764a173a2b02d0725f28f jdk8u102-b00 1.15 +a0c077b39c7a331bda9764a173a2b02d0725f28f jdk8u82-b00 1.16 +c0ad0fa38df0841eaaf81ab40e8b07b42372c5d5 jdk8u102-b01 1.17 +face9bd6bac2d43d4c423be4fe733689794c2f08 jdk8u102-b02 1.18 +4e12f131bb0dbe0478aecb7ebdfe24b10d3ece75 jdk8u102-b03 1.19 +5b1d73ea0eb68cef733eb9379ed71cfb008da72e jdk8u102-b04 1.20 +1f512419ae336ce17f1d16384e34669a81db27ae jdk8u102-b05 1.21 d3b054313ed2d29f9dbbdfd71a7ab3c4ad4eb5b6 jdk8u111-b00
2.1 --- a/src/share/jaxws_classes/com/sun/tools/internal/xjc/model/CTypeRef.java Mon Apr 11 12:32:25 2016 -0700 2.2 +++ b/src/share/jaxws_classes/com/sun/tools/internal/xjc/model/CTypeRef.java Thu Apr 28 09:56:56 2016 -0700 2.3 @@ -1,5 +1,5 @@ 2.4 /* 2.5 - * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved. 2.6 + * Copyright (c) 1997, 2016, Oracle and/or its affiliates. All rights reserved. 2.7 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 2.8 * 2.9 * This code is free software; you can redistribute it and/or modify it 2.10 @@ -100,10 +100,15 @@ 2.11 */ 2.12 private static QName resolveSimpleTypeName(XSType declType) { 2.13 QName name = BGMBuilder.getName(declType); 2.14 - if (name != null && !XMLConstants.W3C_XML_SCHEMA_NS_URI.equals(name.getNamespaceURI())) 2.15 - return resolveSimpleTypeName(declType.getBaseType()); 2.16 - else 2.17 - return name; 2.18 + QName result = null; 2.19 + if (name != null && !XMLConstants.W3C_XML_SCHEMA_NS_URI.equals(name.getNamespaceURI())) { 2.20 + result = resolveSimpleTypeName(declType.getBaseType()); 2.21 + } else { 2.22 + if ( !"anySimpleType".equals(declType.getName()) ) { 2.23 + result = name; 2.24 + } 2.25 + } 2.26 + return result; 2.27 } 2.28 2.29 public CTypeRef(CNonElement type, QName elementName, QName typeName, boolean nillable, XmlString defaultValue) {
3.1 --- a/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/unmarshaller/StructureLoader.java Mon Apr 11 12:32:25 2016 -0700 3.2 +++ b/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/unmarshaller/StructureLoader.java Thu Apr 28 09:56:56 2016 -0700 3.3 @@ -231,22 +231,11 @@ 3.4 @Override 3.5 public void childElement(UnmarshallingContext.State state, TagName arg) throws SAXException { 3.6 ChildLoader child = childUnmarshallers.get(arg.uri,arg.local); 3.7 - if(child==null) { 3.8 - if ((beanInfo != null) && (beanInfo.getTypeNames() != null)) { 3.9 - Iterator typeNamesIt = beanInfo.getTypeNames().iterator(); 3.10 - QName parentQName = null; 3.11 - if ((typeNamesIt != null) && (typeNamesIt.hasNext()) && (catchAll == null)) { 3.12 - parentQName = (QName) typeNamesIt.next(); 3.13 - String parentUri = parentQName.getNamespaceURI(); 3.14 - child = childUnmarshallers.get(parentUri, arg.local); 3.15 - } 3.16 - } 3.17 - if (child == null) { 3.18 - child = catchAll; 3.19 - if(child==null) { 3.20 - super.childElement(state,arg); 3.21 - return; 3.22 - } 3.23 + if (child == null) { 3.24 + child = catchAll; 3.25 + if (child==null) { 3.26 + super.childElement(state,arg); 3.27 + return; 3.28 } 3.29 } 3.30
4.1 --- a/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/schemagen/XmlSchemaGenerator.java Mon Apr 11 12:32:25 2016 -0700 4.2 +++ b/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/schemagen/XmlSchemaGenerator.java Thu Apr 28 09:56:56 2016 -0700 4.3 @@ -1,5 +1,5 @@ 4.4 /* 4.5 - * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved. 4.6 + * Copyright (c) 1997, 2016, Oracle and/or its affiliates. All rights reserved. 4.7 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 4.8 * 4.9 * This code is free software; you can redistribute it and/or modify it 4.10 @@ -110,6 +110,7 @@ 4.11 import com.sun.xml.internal.txw2.output.ResultFactory; 4.12 import com.sun.xml.internal.txw2.output.XmlSerializer; 4.13 import java.util.Collection; 4.14 +import java.util.HashSet; 4.15 import org.xml.sax.SAXParseException; 4.16 4.17 /** 4.18 @@ -436,7 +437,7 @@ 4.19 4.20 if(logger.isLoggable(Level.FINE)) { 4.21 // debug logging to see what's going on. 4.22 - logger.log(Level.FINE,"Wrigin XML Schema for "+toString(),new StackRecorder()); 4.23 + logger.log(Level.FINE,"Writing XML Schema for "+toString(),new StackRecorder()); 4.24 } 4.25 4.26 // make it fool-proof 4.27 @@ -465,6 +466,8 @@ 4.28 systemIds.put(n,output.getSystemId()); 4.29 } 4.30 } 4.31 + //Clear the namespace specific set with already written classes 4.32 + n.resetWritten(); 4.33 } 4.34 4.35 // then write'em all 4.36 @@ -542,6 +545,11 @@ 4.37 */ 4.38 private boolean useMimeNs; 4.39 4.40 + /** 4.41 + * Container for already processed classes 4.42 + */ 4.43 + private final Set<ClassInfo> written = new HashSet<ClassInfo>(); 4.44 + 4.45 public Namespace(String uri) { 4.46 this.uri = uri; 4.47 assert !XmlSchemaGenerator.this.namespaces.containsKey(uri); 4.48 @@ -549,6 +557,13 @@ 4.49 } 4.50 4.51 /** 4.52 + * Clear out the set of already processed classes for this namespace 4.53 + */ 4.54 + void resetWritten() { 4.55 + written.clear(); 4.56 + } 4.57 + 4.58 + /** 4.59 * Process the given PropertyInfo looking for references to namespaces that 4.60 * are foreign to the given namespace. Any foreign namespace references 4.61 * found are added to the given namespaces dependency list and an <import> 4.62 @@ -853,6 +868,10 @@ 4.63 * @param parent the writer of the parent element into which the type will be defined 4.64 */ 4.65 private void writeClass(ClassInfo<T,C> c, TypeHost parent) { 4.66 + if (written.contains(c)) { // to avoid cycles let's check if we haven't already processed the class 4.67 + return; 4.68 + } 4.69 + written.add(c); 4.70 // special handling for value properties 4.71 if (containsValueProp(c)) { 4.72 if (c.getProperties().size() == 1) {