[prev in list] [next in list] [prev in thread] [next in thread]
List: xmlrpc-user
Subject: [jira] [Commented] (XMLSCHEMA-13) NullPointerException in
From: "Benson Margulies (JIRA)" <jira () apache ! org>
Date: 2011-04-22 21:02:05
Message-ID: 1360894618.77307.1303506125779.JavaMail.tomcat () hel ! zones ! apache ! org
[Download RAW message or body]
[ https://issues.apache.org/jira/browse/XMLSCHEMA-13?page=com.atlassian.jira.plugi \
n.system.issuetabpanels:comment-tabpanel&focusedCommentId=13023406#comment-13023406 ] \
Benson Margulies commented on XMLSCHEMA-13:
-------------------------------------------
Hmm, the patch command is rejecting the patch. But not for any very good reason. \
I'll just edit;.
> NullPointerException in NamespaceMap.getNamespaceURI() method
> -------------------------------------------------------------
>
> Key: XMLSCHEMA-13
> URL: https://issues.apache.org/jira/browse/XMLSCHEMA-13
> Project: XmlSchema
> Issue Type: Bug
> Affects Versions: XmlSchema 2.0
> Reporter: Dmitry Repchevsky
> Attachments: NPE.patch, fnroyOcPjyUAAAAASUVORK5CYII=
>
> Original Estimate: 1m
> Remaining Estimate: 1m
>
> The method uses toString() without checking whether namespace exists for the prefix
> public String getNamespaceURI(String prefix) {
> return get(prefix).toString();
> }
> should be:
> public String getNamespaceURI(String prefix) {
> Object namespaceURI = get(prefix);
> return namespaceURI == null ? null : namespaceURI .toString();
> }
> the latter fix would allow a correct behavior for the next code found in \
> XmlSchemaSerializer: if (ctx != null && ctx.getNamespaceURI(xsdPrefix) != null) {
> xsdPrefix = "xsd";
> }
--
This message is automatically generated by JIRA.
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
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic