[ 
https://issues.apache.org/jira/browse/XMLSCHEMA-26?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Dmitry Repchevsky updated XMLSCHEMA-26:
---------------------------------------

    Attachment: NamespaceMapTest.java
                NamespaceMap.java.patch

Probably some other projects may depend on NamespaceMap incorrect behavior
                
> NPE: NamespaceMap.getNamespaceURI() returns null
> ------------------------------------------------
>
>                 Key: XMLSCHEMA-26
>                 URL: https://issues.apache.org/jira/browse/XMLSCHEMA-26
>             Project: XmlSchema
>          Issue Type: Bug
>    Affects Versions: 2.0.3
>         Environment: Java
>            Reporter: Dmitry Repchevsky
>         Attachments: NamespaceMap.java.patch, NamespaceMapTest.java
>
>
> Related to the
> https://issues.apache.org/jira/browse/XMLSCHEMA-25?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
> fix.
> As mentioned in a comment:
> >NamespaceMap returns null if no prefix found while according 
> >NamespaceContext it should return Constants.NULL_NS_URI.
> There are two solutions possible.
> 1. fix NamespaceMap class to do not return null as defined in 
> NamespaceContext contract.
> 2. make XmlSchemaSerializer changes to check both null && "".
> Note that (1) may introduce bugs in code that uses XML Schema where null is 
> incorrectly used instead of Constants.NULL_NS_URI to check whether prefix is 
> bound.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: 
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to