ws-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Michael Pigott (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (XMLSCHEMA-42) xmlschema-walker fails when an xs:attribute has no type attribute
Date Sun, 26 Mar 2017 16:15:41 GMT

    [ https://issues.apache.org/jira/browse/XMLSCHEMA-42?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15942328#comment-15942328
] 

Michael Pigott commented on XMLSCHEMA-42:
-----------------------------------------

Sorry about that.  Thank you for fixing this.
Mike

> xmlschema-walker fails when an xs:attribute has no type attribute
> -----------------------------------------------------------------
>
>                 Key: XMLSCHEMA-42
>                 URL: https://issues.apache.org/jira/browse/XMLSCHEMA-42
>             Project: XmlSchema
>          Issue Type: Bug
>    Affects Versions: 2.2.1
>            Reporter: Tobias Crawley
>            Assignee: Andreas Veithen
>             Fix For: 2.2.2
>
>         Attachments: XMLSCHEMA-42-with-test.patch
>
>
> When using xmlschema-walker against an XSD that has an attribute definition that lacks
a type, I get the following NPE:
> {noformat}
> Exception in thread "main" java.lang.NullPointerException
> 	at org.apache.ws.commons.schema.walker.XmlSchemaScope.getAttribute(XmlSchemaScope.java:569)
> 	at org.apache.ws.commons.schema.walker.XmlSchemaScope.createAttributeMap(XmlSchemaScope.java:629)
> 	at org.apache.ws.commons.schema.walker.XmlSchemaScope.walk(XmlSchemaScope.java:310)
> 	at org.apache.ws.commons.schema.walker.XmlSchemaScope.walk(XmlSchemaScope.java:151)
> 	at org.apache.ws.commons.schema.walker.XmlSchemaScope.<init>(XmlSchemaScope.java:91)
> 	at org.apache.ws.commons.schema.walker.XmlSchemaScope.getScope(XmlSchemaScope.java:696)
> 	at org.apache.ws.commons.schema.walker.XmlSchemaScope.walk(XmlSchemaScope.java:333)
> 	at org.apache.ws.commons.schema.walker.XmlSchemaScope.walk(XmlSchemaScope.java:306)
> 	at org.apache.ws.commons.schema.walker.XmlSchemaScope.walk(XmlSchemaScope.java:151)
> 	at org.apache.ws.commons.schema.walker.XmlSchemaScope.<init>(XmlSchemaScope.java:112)
> 	at org.apache.ws.commons.schema.walker.XmlSchemaWalker.walk(XmlSchemaWalker.java:224)
> 	at org.apache.ws.commons.schema.walker.XmlSchemaWalker.walk(XmlSchemaWalker.java:339)
> 	at org.apache.ws.commons.schema.walker.XmlSchemaWalker.walk(XmlSchemaWalker.java:486)
> 	at org.apache.ws.commons.schema.walker.XmlSchemaWalker.walk(XmlSchemaWalker.java:336)
> 	at org.apache.ws.commons.schema.walker.XmlSchemaWalker.walk(XmlSchemaWalker.java:295)
> 	at org.apache.ws.commons.schema.walker.XmlSchemaWalker.walk(XmlSchemaWalker.java:339)
> 	at org.apache.ws.commons.schema.walker.XmlSchemaWalker.walk(XmlSchemaWalker.java:486)
> 	at org.apache.ws.commons.schema.walker.XmlSchemaWalker.walk(XmlSchemaWalker.java:336)
> 	at org.apache.ws.commons.schema.walker.XmlSchemaWalker.walk(XmlSchemaWalker.java:295)
> {noformat}
> The XSD that triggered this was https://github.com/wildfly/wildfly-core/blob/master/server/src/main/resources/schema/wildfly-config_4_2.xsd#L2774
(that line specifically). 
> I have a patch to fix this that I'll attach shortly. It doesn't include any tests, because
most of the tests fail for me with a fresh checkout, so it's hard to confirm that any tests
I write are working. I have tested the fix manually.



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@ws.apache.org
For additional commands, e-mail: dev-help@ws.apache.org


Mime
View raw message