changeset 1389:06086cb6c349 jdk8u162-b01

8159240: XSOM parser incorrectly processes type names with whitespaces Reviewed-by: coffeys
author aefimov
date Mon, 02 Oct 2017 14:20:23 +0100
parents 38964474449e
children 0f938baeda6c
files src/share/jaxws_classes/com/sun/xml/internal/xsom/impl/parser/state/attributeDeclBody.java src/share/jaxws_classes/com/sun/xml/internal/xsom/impl/parser/state/attributeGroupDecl.java src/share/jaxws_classes/com/sun/xml/internal/xsom/impl/parser/state/complexType.java src/share/jaxws_classes/com/sun/xml/internal/xsom/impl/parser/state/elementDeclBody.java src/share/jaxws_classes/com/sun/xml/internal/xsom/impl/parser/state/group.java src/share/jaxws_classes/com/sun/xml/internal/xsom/impl/parser/state/identityConstraint.java src/share/jaxws_classes/com/sun/xml/internal/xsom/impl/parser/state/notation.java src/share/jaxws_classes/com/sun/xml/internal/xsom/impl/parser/state/qname.java src/share/jaxws_classes/com/sun/xml/internal/xsom/impl/parser/state/simpleType.java
diffstat 9 files changed, 100 insertions(+), 152 deletions(-) [+]
line wrap: on
line diff
--- a/src/share/jaxws_classes/com/sun/xml/internal/xsom/impl/parser/state/attributeDeclBody.java	Thu Aug 03 08:07:29 2017 -0700
+++ b/src/share/jaxws_classes/com/sun/xml/internal/xsom/impl/parser/state/attributeDeclBody.java	Mon Oct 02 14:20:23 2017 +0100
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2017, 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,22 +25,15 @@
 
 /* this file is generated by RelaxNGCC */
 package com.sun.xml.internal.xsom.impl.parser.state;
+
+import com.sun.xml.internal.bind.WhiteSpaceProcessor;
+import com.sun.xml.internal.xsom.impl.*;
+import com.sun.xml.internal.xsom.impl.parser.*;
+import com.sun.xml.internal.xsom.parser.*;
+
+import org.xml.sax.Attributes;
+import org.xml.sax.Locator;
 import org.xml.sax.SAXException;
-import org.xml.sax.XMLReader;
-import org.xml.sax.Attributes;
-import com.sun.xml.internal.xsom.impl.parser.NGCCRuntimeEx;
-
-    import com.sun.xml.internal.xsom.*;
-    import com.sun.xml.internal.xsom.parser.*;
-    import com.sun.xml.internal.xsom.impl.*;
-    import com.sun.xml.internal.xsom.impl.parser.*;
-    import org.xml.sax.Locator;
-    import org.xml.sax.ContentHandler;
-    import org.xml.sax.helpers.*;
-    import java.util.*;
-    import java.math.BigInteger;
-
-
 
 class attributeDeclBody extends NGCCHandler {
     private String name;
@@ -458,7 +451,7 @@
             break;
         case 11:
             {
-                name = $value;
+                name = WhiteSpaceProcessor.collapse($value);
                 $_ngcc_current_state = 10;
             }
             break;
--- a/src/share/jaxws_classes/com/sun/xml/internal/xsom/impl/parser/state/attributeGroupDecl.java	Thu Aug 03 08:07:29 2017 -0700
+++ b/src/share/jaxws_classes/com/sun/xml/internal/xsom/impl/parser/state/attributeGroupDecl.java	Mon Oct 02 14:20:23 2017 +0100
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2017, 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,22 +25,14 @@
 
 /* this file is generated by RelaxNGCC */
 package com.sun.xml.internal.xsom.impl.parser.state;
+import com.sun.xml.internal.bind.WhiteSpaceProcessor;
+import com.sun.xml.internal.xsom.impl.*;
+import com.sun.xml.internal.xsom.impl.parser.NGCCRuntimeEx;
+import com.sun.xml.internal.xsom.parser.*;
+
+import org.xml.sax.Attributes;
+import org.xml.sax.Locator;
 import org.xml.sax.SAXException;
-import org.xml.sax.XMLReader;
-import org.xml.sax.Attributes;
-import com.sun.xml.internal.xsom.impl.parser.NGCCRuntimeEx;
-
-    import com.sun.xml.internal.xsom.*;
-    import com.sun.xml.internal.xsom.parser.*;
-    import com.sun.xml.internal.xsom.impl.*;
-    import com.sun.xml.internal.xsom.impl.parser.*;
-    import org.xml.sax.Locator;
-    import org.xml.sax.ContentHandler;
-    import org.xml.sax.helpers.*;
-    import java.util.*;
-    import java.math.BigInteger;
-
-
 
 class attributeGroupDecl extends NGCCHandler {
     private AnnotationImpl annotation;
@@ -401,7 +393,7 @@
             break;
         case 12:
             {
-                name = $value;
+                name = WhiteSpaceProcessor.collapse($value);
                 $_ngcc_current_state = 11;
             }
             break;
--- a/src/share/jaxws_classes/com/sun/xml/internal/xsom/impl/parser/state/complexType.java	Thu Aug 03 08:07:29 2017 -0700
+++ b/src/share/jaxws_classes/com/sun/xml/internal/xsom/impl/parser/state/complexType.java	Mon Oct 02 14:20:23 2017 +0100
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2017, 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,22 +25,17 @@
 
 /* this file is generated by RelaxNGCC */
 package com.sun.xml.internal.xsom.impl.parser.state;
+
+import com.sun.xml.internal.bind.WhiteSpaceProcessor;
+import com.sun.xml.internal.xsom.*;
+import com.sun.xml.internal.xsom.impl.*;
+import com.sun.xml.internal.xsom.impl.parser.*;
+import com.sun.xml.internal.xsom.parser.*;
+
+import java.util.Collections;
+import org.xml.sax.Attributes;
+import org.xml.sax.Locator;
 import org.xml.sax.SAXException;
-import org.xml.sax.XMLReader;
-import org.xml.sax.Attributes;
-import com.sun.xml.internal.xsom.impl.parser.NGCCRuntimeEx;
-
-    import com.sun.xml.internal.xsom.*;
-    import com.sun.xml.internal.xsom.parser.*;
-    import com.sun.xml.internal.xsom.impl.*;
-    import com.sun.xml.internal.xsom.impl.parser.*;
-    import org.xml.sax.Locator;
-    import org.xml.sax.ContentHandler;
-    import org.xml.sax.helpers.*;
-    import java.util.*;
-    import java.math.BigInteger;
-
-
 
 class complexType extends NGCCHandler {
     private Integer finalValue;
@@ -1683,7 +1678,7 @@
             break;
         case 70:
             {
-                name = $value;
+                name = WhiteSpaceProcessor.collapse($value);
                 $_ngcc_current_state = 69;
             }
             break;
--- a/src/share/jaxws_classes/com/sun/xml/internal/xsom/impl/parser/state/elementDeclBody.java	Thu Aug 03 08:07:29 2017 -0700
+++ b/src/share/jaxws_classes/com/sun/xml/internal/xsom/impl/parser/state/elementDeclBody.java	Mon Oct 02 14:20:23 2017 +0100
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2017, 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,22 +25,18 @@
 
 /* this file is generated by RelaxNGCC */
 package com.sun.xml.internal.xsom.impl.parser.state;
+
+import com.sun.xml.internal.bind.WhiteSpaceProcessor;
+import com.sun.xml.internal.xsom.impl.*;
+import com.sun.xml.internal.xsom.impl.parser.*;
+import com.sun.xml.internal.xsom.parser.*;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import org.xml.sax.Attributes;
+import org.xml.sax.Locator;
 import org.xml.sax.SAXException;
-import org.xml.sax.XMLReader;
-import org.xml.sax.Attributes;
-import com.sun.xml.internal.xsom.impl.parser.NGCCRuntimeEx;
-
-    import com.sun.xml.internal.xsom.*;
-    import com.sun.xml.internal.xsom.parser.*;
-    import com.sun.xml.internal.xsom.impl.*;
-    import com.sun.xml.internal.xsom.impl.parser.*;
-    import org.xml.sax.Locator;
-    import org.xml.sax.ContentHandler;
-    import org.xml.sax.helpers.*;
-    import java.util.*;
-    import java.math.BigInteger;
-
-
 
 class elementDeclBody extends NGCCHandler {
     private Integer finalValue;
@@ -813,7 +809,7 @@
             break;
         case 22:
             {
-                name = $value;
+                name = WhiteSpaceProcessor.collapse($value);
                 $_ngcc_current_state = 21;
             }
             break;
--- a/src/share/jaxws_classes/com/sun/xml/internal/xsom/impl/parser/state/group.java	Thu Aug 03 08:07:29 2017 -0700
+++ b/src/share/jaxws_classes/com/sun/xml/internal/xsom/impl/parser/state/group.java	Mon Oct 02 14:20:23 2017 +0100
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2017, 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,22 +25,15 @@
 
 /* this file is generated by RelaxNGCC */
 package com.sun.xml.internal.xsom.impl.parser.state;
+
+import com.sun.xml.internal.bind.WhiteSpaceProcessor;
+import com.sun.xml.internal.xsom.impl.*;
+import com.sun.xml.internal.xsom.impl.parser.NGCCRuntimeEx;
+import com.sun.xml.internal.xsom.parser.*;
+
+import org.xml.sax.Attributes;
+import org.xml.sax.Locator;
 import org.xml.sax.SAXException;
-import org.xml.sax.XMLReader;
-import org.xml.sax.Attributes;
-import com.sun.xml.internal.xsom.impl.parser.NGCCRuntimeEx;
-
-    import com.sun.xml.internal.xsom.*;
-    import com.sun.xml.internal.xsom.parser.*;
-    import com.sun.xml.internal.xsom.impl.*;
-    import com.sun.xml.internal.xsom.impl.parser.*;
-    import org.xml.sax.Locator;
-    import org.xml.sax.ContentHandler;
-    import org.xml.sax.helpers.*;
-    import java.util.*;
-    import java.math.BigInteger;
-
-
 
 class group extends NGCCHandler {
     private AnnotationImpl annotation;
@@ -403,7 +396,7 @@
             break;
         case 9:
             {
-                name = $value;
+                name = WhiteSpaceProcessor.collapse($value);
                 $_ngcc_current_state = 8;
             }
             break;
--- a/src/share/jaxws_classes/com/sun/xml/internal/xsom/impl/parser/state/identityConstraint.java	Thu Aug 03 08:07:29 2017 -0700
+++ b/src/share/jaxws_classes/com/sun/xml/internal/xsom/impl/parser/state/identityConstraint.java	Mon Oct 02 14:20:23 2017 +0100
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2017, 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,22 +25,18 @@
 
 /* this file is generated by RelaxNGCC */
 package com.sun.xml.internal.xsom.impl.parser.state;
+
+import com.sun.xml.internal.bind.WhiteSpaceProcessor;
+import com.sun.xml.internal.xsom.*;
+import com.sun.xml.internal.xsom.impl.*;
+import com.sun.xml.internal.xsom.impl.parser.*;
+import com.sun.xml.internal.xsom.parser.*;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import org.xml.sax.Attributes;
 import org.xml.sax.SAXException;
-import org.xml.sax.XMLReader;
-import org.xml.sax.Attributes;
-import com.sun.xml.internal.xsom.impl.parser.NGCCRuntimeEx;
-
-    import com.sun.xml.internal.xsom.*;
-    import com.sun.xml.internal.xsom.parser.*;
-    import com.sun.xml.internal.xsom.impl.*;
-    import com.sun.xml.internal.xsom.impl.parser.*;
-    import org.xml.sax.Locator;
-    import org.xml.sax.ContentHandler;
-    import org.xml.sax.helpers.*;
-    import java.util.*;
-    import java.math.BigInteger;
-
-
 
 class identityConstraint extends NGCCHandler {
     private String name;
@@ -471,7 +467,7 @@
         switch($_ngcc_current_state) {
         case 15:
             {
-                name = $value;
+                name = WhiteSpaceProcessor.collapse($value);
                 $_ngcc_current_state = 14;
             }
             break;
--- a/src/share/jaxws_classes/com/sun/xml/internal/xsom/impl/parser/state/notation.java	Thu Aug 03 08:07:29 2017 -0700
+++ b/src/share/jaxws_classes/com/sun/xml/internal/xsom/impl/parser/state/notation.java	Mon Oct 02 14:20:23 2017 +0100
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2017, 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,22 +25,16 @@
 
 /* this file is generated by RelaxNGCC */
 package com.sun.xml.internal.xsom.impl.parser.state;
+
+import com.sun.xml.internal.bind.WhiteSpaceProcessor;
+import com.sun.xml.internal.xsom.*;
+import com.sun.xml.internal.xsom.impl.*;
+import com.sun.xml.internal.xsom.impl.parser.NGCCRuntimeEx;
+import com.sun.xml.internal.xsom.parser.*;
+
+import org.xml.sax.Attributes;
+import org.xml.sax.Locator;
 import org.xml.sax.SAXException;
-import org.xml.sax.XMLReader;
-import org.xml.sax.Attributes;
-import com.sun.xml.internal.xsom.impl.parser.NGCCRuntimeEx;
-
-    import com.sun.xml.internal.xsom.*;
-    import com.sun.xml.internal.xsom.parser.*;
-    import com.sun.xml.internal.xsom.impl.*;
-    import com.sun.xml.internal.xsom.impl.parser.*;
-    import org.xml.sax.Locator;
-    import org.xml.sax.ContentHandler;
-    import org.xml.sax.helpers.*;
-    import java.util.*;
-    import java.math.BigInteger;
-
-
 
 class notation extends NGCCHandler {
     private String name;
@@ -435,7 +429,7 @@
             break;
         case 13:
             {
-                name = $value;
+                name = WhiteSpaceProcessor.collapse($value);
                 $_ngcc_current_state = 12;
             }
             break;
--- a/src/share/jaxws_classes/com/sun/xml/internal/xsom/impl/parser/state/qname.java	Thu Aug 03 08:07:29 2017 -0700
+++ b/src/share/jaxws_classes/com/sun/xml/internal/xsom/impl/parser/state/qname.java	Mon Oct 02 14:20:23 2017 +0100
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2017, 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,22 +25,12 @@
 
 /* this file is generated by RelaxNGCC */
 package com.sun.xml.internal.xsom.impl.parser.state;
-import org.xml.sax.SAXException;
-import org.xml.sax.XMLReader;
-import org.xml.sax.Attributes;
+
+import com.sun.xml.internal.bind.WhiteSpaceProcessor;
 import com.sun.xml.internal.xsom.impl.parser.NGCCRuntimeEx;
 
-    import com.sun.xml.internal.xsom.*;
-    import com.sun.xml.internal.xsom.parser.*;
-    import com.sun.xml.internal.xsom.impl.*;
-    import com.sun.xml.internal.xsom.impl.parser.*;
-    import org.xml.sax.Locator;
-    import org.xml.sax.ContentHandler;
-    import org.xml.sax.helpers.*;
-    import java.util.*;
-    import java.math.BigInteger;
-
-
+import org.xml.sax.Attributes;
+import org.xml.sax.SAXException;
 
 class qname extends NGCCHandler {
     private String qvalue;
@@ -150,7 +140,7 @@
             break;
         case 1:
             {
-                qvalue = $value;
+                qvalue = WhiteSpaceProcessor.collapse($value);
                 $_ngcc_current_state = 0;
             }
             break;
--- a/src/share/jaxws_classes/com/sun/xml/internal/xsom/impl/parser/state/simpleType.java	Thu Aug 03 08:07:29 2017 -0700
+++ b/src/share/jaxws_classes/com/sun/xml/internal/xsom/impl/parser/state/simpleType.java	Mon Oct 02 14:20:23 2017 +0100
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2017, 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,22 +25,21 @@
 
 /* this file is generated by RelaxNGCC */
 package com.sun.xml.internal.xsom.impl.parser.state;
+
+import com.sun.xml.internal.bind.WhiteSpaceProcessor;
+import com.sun.xml.internal.xsom.*;
+import com.sun.xml.internal.xsom.impl.*;
+import com.sun.xml.internal.xsom.impl.parser.NGCCRuntimeEx;
+import com.sun.xml.internal.xsom.parser.*;
+
+import java.util.Collections;
+import java.util.HashSet;
+import java.util.Set;
+import java.util.StringTokenizer;
+
+import org.xml.sax.Attributes;
+import org.xml.sax.Locator;
 import org.xml.sax.SAXException;
-import org.xml.sax.XMLReader;
-import org.xml.sax.Attributes;
-import com.sun.xml.internal.xsom.impl.parser.NGCCRuntimeEx;
-
-    import com.sun.xml.internal.xsom.*;
-    import com.sun.xml.internal.xsom.parser.*;
-    import com.sun.xml.internal.xsom.impl.*;
-    import com.sun.xml.internal.xsom.impl.parser.*;
-    import org.xml.sax.Locator;
-    import org.xml.sax.ContentHandler;
-    import org.xml.sax.helpers.*;
-    import java.util.*;
-    import java.math.BigInteger;
-
-
 
 class simpleType extends NGCCHandler {
     private AnnotationImpl annotation;
@@ -373,7 +372,7 @@
         switch($_ngcc_current_state) {
         case 13:
             {
-                name = $value;
+                name = WhiteSpaceProcessor.collapse($value);
                 $_ngcc_current_state = 12;
             }
             break;