You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@ws.apache.org by "Dmitry Repchevsky (JIRA)" <ji...@apache.org> on 2012/08/01 12:47:03 UTC

[jira] [Created] (XMLSCHEMA-26) NPE: NamespaceMap.getNamespaceURI() returns null

Dmitry Repchevsky created XMLSCHEMA-26:
------------------------------------------

             Summary: 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


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: dev-unsubscribe@ws.apache.org
For additional commands, e-mail: dev-help@ws.apache.org


[jira] [Updated] (XMLSCHEMA-26) NPE: NamespaceMap.getNamespaceURI() returns null

Posted by "Dmitry Repchevsky (JIRA)" <ji...@apache.org>.
     [ 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: dev-unsubscribe@ws.apache.org
For additional commands, e-mail: dev-help@ws.apache.org