# HG changeset patch # User aefimov # Date 1506950423 -3600 # Node ID 069ef6672904eeae5c45e35c8afee6af706ae14e # Parent 591b9848fcf2c69323acfea3e361d7b3edd5e5ee 8159240: XSOM parser incorrectly processes type names with whitespaces Reviewed-by: coffeys diff -r 591b9848fcf2 -r 069ef6672904 drop_included/jaxws_src/src/com/sun/xml/internal/xsom/impl/parser/state/attributeDeclBody.java --- a/drop_included/jaxws_src/src/com/sun/xml/internal/xsom/impl/parser/state/attributeDeclBody.java Thu Dec 21 18:18:26 2017 +0300 +++ b/drop_included/jaxws_src/src/com/sun/xml/internal/xsom/impl/parser/state/attributeDeclBody.java Mon Oct 02 14:20:23 2017 +0100 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2005, 2006, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2005, 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 @@ -24,21 +24,15 @@ */ /* 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.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 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; class attributeDeclBody extends NGCCHandler { private String name; @@ -387,7 +381,7 @@ switch($_ngcc_current_state) { case 11: { - name = $value; + name = WhiteSpaceProcessor.collapse($value); $_ngcc_current_state = 10; } break; diff -r 591b9848fcf2 -r 069ef6672904 drop_included/jaxws_src/src/com/sun/xml/internal/xsom/impl/parser/state/attributeGroupDecl.java --- a/drop_included/jaxws_src/src/com/sun/xml/internal/xsom/impl/parser/state/attributeGroupDecl.java Thu Dec 21 18:18:26 2017 +0300 +++ b/drop_included/jaxws_src/src/com/sun/xml/internal/xsom/impl/parser/state/attributeGroupDecl.java Mon Oct 02 14:20:23 2017 +0100 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2005, 2006, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2005, 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 @@ -24,21 +24,14 @@ */ /* 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.*; import com.sun.xml.internal.xsom.impl.parser.NGCCRuntimeEx; +import com.sun.xml.internal.xsom.parser.*; - 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 org.xml.sax.Attributes; +import org.xml.sax.Locator; +import org.xml.sax.SAXException; class attributeGroupDecl extends NGCCHandler { private AnnotationImpl annotation; @@ -382,7 +375,7 @@ break; case 12: { - name = $value; + name = WhiteSpaceProcessor.collapse($value); $_ngcc_current_state = 11; } break; diff -r 591b9848fcf2 -r 069ef6672904 drop_included/jaxws_src/src/com/sun/xml/internal/xsom/impl/parser/state/complexType.java --- a/drop_included/jaxws_src/src/com/sun/xml/internal/xsom/impl/parser/state/complexType.java Thu Dec 21 18:18:26 2017 +0300 +++ b/drop_included/jaxws_src/src/com/sun/xml/internal/xsom/impl/parser/state/complexType.java Mon Oct 02 14:20:23 2017 +0100 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2005, 2006, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2005, 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 @@ -24,21 +24,17 @@ */ /* 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.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 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; class complexType extends NGCCHandler { private Integer finalValue; @@ -1493,7 +1489,7 @@ break; case 70: { - name = $value; + name = WhiteSpaceProcessor.collapse($value); $_ngcc_current_state = 69; } break; diff -r 591b9848fcf2 -r 069ef6672904 drop_included/jaxws_src/src/com/sun/xml/internal/xsom/impl/parser/state/elementDeclBody.java --- a/drop_included/jaxws_src/src/com/sun/xml/internal/xsom/impl/parser/state/elementDeclBody.java Thu Dec 21 18:18:26 2017 +0300 +++ b/drop_included/jaxws_src/src/com/sun/xml/internal/xsom/impl/parser/state/elementDeclBody.java Mon Oct 02 14:20:23 2017 +0100 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2005, 2006, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2005, 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 @@ -24,21 +24,18 @@ */ /* 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.xsom.impl.parser.NGCCRuntimeEx; + +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 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.util.ArrayList; +import java.util.List; - +import org.xml.sax.Attributes; +import org.xml.sax.Locator; +import org.xml.sax.SAXException; class elementDeclBody extends NGCCHandler { private Integer finalValue; @@ -866,7 +863,7 @@ break; case 22: { - name = $value; + name = WhiteSpaceProcessor.collapse($value); $_ngcc_current_state = 21; } break; diff -r 591b9848fcf2 -r 069ef6672904 drop_included/jaxws_src/src/com/sun/xml/internal/xsom/impl/parser/state/group.java --- a/drop_included/jaxws_src/src/com/sun/xml/internal/xsom/impl/parser/state/group.java Thu Dec 21 18:18:26 2017 +0300 +++ b/drop_included/jaxws_src/src/com/sun/xml/internal/xsom/impl/parser/state/group.java Mon Oct 02 14:20:23 2017 +0100 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2005, 2006, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2005, 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 @@ -24,21 +24,15 @@ */ /* 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.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 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; class group extends NGCCHandler { private AnnotationImpl annotation; @@ -400,7 +394,7 @@ break; case 9: { - name = $value; + name = WhiteSpaceProcessor.collapse($value); $_ngcc_current_state = 8; } break; diff -r 591b9848fcf2 -r 069ef6672904 drop_included/jaxws_src/src/com/sun/xml/internal/xsom/impl/parser/state/identityConstraint.java --- a/drop_included/jaxws_src/src/com/sun/xml/internal/xsom/impl/parser/state/identityConstraint.java Thu Dec 21 18:18:26 2017 +0300 +++ b/drop_included/jaxws_src/src/com/sun/xml/internal/xsom/impl/parser/state/identityConstraint.java Mon Oct 02 14:20:23 2017 +0100 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2005, 2006, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2005, 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 @@ -24,20 +24,18 @@ */ /* 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.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 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; class identityConstraint extends NGCCHandler { @@ -487,7 +485,7 @@ break; case 15: { - name = $value; + name = WhiteSpaceProcessor.collapse($value); $_ngcc_current_state = 14; } break; diff -r 591b9848fcf2 -r 069ef6672904 drop_included/jaxws_src/src/com/sun/xml/internal/xsom/impl/parser/state/notation.java --- a/drop_included/jaxws_src/src/com/sun/xml/internal/xsom/impl/parser/state/notation.java Thu Dec 21 18:18:26 2017 +0300 +++ b/drop_included/jaxws_src/src/com/sun/xml/internal/xsom/impl/parser/state/notation.java Mon Oct 02 14:20:23 2017 +0100 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2005, 2006, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2005, 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 @@ -24,21 +24,16 @@ */ /* 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.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 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; class notation extends NGCCHandler { private String name; @@ -392,7 +387,7 @@ break; case 12: { - name = $value; + name = WhiteSpaceProcessor.collapse($value); $_ngcc_current_state = 11; } break; diff -r 591b9848fcf2 -r 069ef6672904 drop_included/jaxws_src/src/com/sun/xml/internal/xsom/impl/parser/state/qname.java --- a/drop_included/jaxws_src/src/com/sun/xml/internal/xsom/impl/parser/state/qname.java Thu Dec 21 18:18:26 2017 +0300 +++ b/drop_included/jaxws_src/src/com/sun/xml/internal/xsom/impl/parser/state/qname.java Mon Oct 02 14:20:23 2017 +0100 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2005, 2006, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2005, 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 @@ -24,20 +24,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 org.xml.sax.Attributes; +import org.xml.sax.SAXException; class qname extends NGCCHandler { @@ -143,7 +135,7 @@ switch($_ngcc_current_state) { case 1: { - qvalue = $value; + qvalue = WhiteSpaceProcessor.collapse($value); $_ngcc_current_state = 0; } break; diff -r 591b9848fcf2 -r 069ef6672904 drop_included/jaxws_src/src/com/sun/xml/internal/xsom/impl/parser/state/simpleType.java --- a/drop_included/jaxws_src/src/com/sun/xml/internal/xsom/impl/parser/state/simpleType.java Thu Dec 21 18:18:26 2017 +0300 +++ b/drop_included/jaxws_src/src/com/sun/xml/internal/xsom/impl/parser/state/simpleType.java Mon Oct 02 14:20:23 2017 +0100 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2005, 2006, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2005, 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 @@ -24,21 +24,21 @@ */ /* 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.*; +import com.sun.xml.internal.xsom.impl.*; import com.sun.xml.internal.xsom.impl.parser.NGCCRuntimeEx; +import com.sun.xml.internal.xsom.parser.*; - 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.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; class simpleType extends NGCCHandler { private AnnotationImpl annotation; @@ -394,7 +394,7 @@ break; case 13: { - name = $value; + name = WhiteSpaceProcessor.collapse($value); $_ngcc_current_state = 12; } break;