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 2011/04/11 12:03:05 UTC
[jira] [Created] (XMLSCHEMA-13) NullPointerException in
NamespaceMap.getNamespaceURI() method
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
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) {
String 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
[jira] [Commented] (XMLSCHEMA-13) NullPointerException in
NamespaceMap.getNamespaceURI() method
Posted by "Benson Margulies (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/XMLSCHEMA-13?page=com.atlassian.jira.plugin.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
[jira] [Updated] (XMLSCHEMA-13) NullPointerException in
NamespaceMap.getNamespaceURI() method
Posted by "Dmitry Repchevsky (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/XMLSCHEMA-13?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Dmitry Repchevsky updated XMLSCHEMA-13:
---------------------------------------
Attachment: fnroyOcPjyUAAAAASUVORK5CYII=
Not sure how to do this... tried subversion with my jira password...
Can you patch it please?
--
------------------------------------------------------------------------
Barcelona Supercomputing Center National Institute of Bioinformatics,
Life Science, Computational Node 6
Nexus II, Jordi Girona 29, 08034 Barcelona, Spain
> 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: 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) {
> String 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
[jira] [Updated] (XMLSCHEMA-13) NullPointerException in
NamespaceMap.getNamespaceURI() method
Posted by "Dmitry Repchevsky (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/XMLSCHEMA-13?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Dmitry Repchevsky updated XMLSCHEMA-13:
---------------------------------------
Attachment: NPE.patch
mentioned patch
> 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
[jira] [Updated] (XMLSCHEMA-13) NullPointerException in
NamespaceMap.getNamespaceURI() method
Posted by "Dmitry Repchevsky (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/XMLSCHEMA-13?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Dmitry Repchevsky updated XMLSCHEMA-13:
---------------------------------------
Description:
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";
}
was:
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) {
String 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";
}
> 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: 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
[jira] [Resolved] (XMLSCHEMA-13) NullPointerException in
NamespaceMap.getNamespaceURI() method
Posted by "Benson Margulies (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/XMLSCHEMA-13?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Benson Margulies resolved XMLSCHEMA-13.
---------------------------------------
Resolution: Fixed
Fix Version/s: XmlSchema 2.0.1
Assignee: Benson Margulies
patch applied.
> 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
> Assignee: Benson Margulies
> Fix For: XmlSchema 2.0.1
>
> 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
[jira] [Commented] (XMLSCHEMA-13) NullPointerException in
NamespaceMap.getNamespaceURI() method
Posted by "Benson Margulies (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/XMLSCHEMA-13?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13022356#comment-13022356 ]
Benson Margulies commented on XMLSCHEMA-13:
-------------------------------------------
Dmitry,
Could you possibly post an actual patch? I know this is trivial and I'll do it by hand if you really don't want to.
--benson
> 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
> 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) {
> String 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