[jboss-jira] [JBoss JIRA] Updated: (GPD-131) XmlAdapter.getTextContent() appends null
Koen Aers (JIRA)
jira-events at lists.jboss.org
Tue Aug 7 06:45:49 EDT 2007
[ http://jira.jboss.com/jira/browse/GPD-131?page=all ]
Koen Aers updated GPD-131:
--------------------------
Component/s: jpdl
Fix Version/s: jBPM JPDL Designer 3.1.0.CR
Affects Version/s: jBPM JPDL Designer 3.1.0.beta2
> XmlAdapter.getTextContent() appends null
> ----------------------------------------
>
> Key: GPD-131
> URL: http://jira.jboss.com/jira/browse/GPD-131
> Project: JBoss jBPM GPD
> Issue Type: Bug
> Components: jpdl
> Affects Versions: jBPM JPDL Designer 3.1.0.beta2
> Reporter: Imran Naqvi
> Assigned To: Koen Aers
> Fix For: jBPM JPDL Designer 3.1.0.CR
>
>
> the getTextContent() method in XmlAdapter class. There should be a null check while getting the node value (this issue also comes up when you have nested configInfoElements). So the following method in XmlAdapter.java :
> protected String getTextContent() {
> StringBuffer buffer = new StringBuffer();
> NodeList list = getNode().getChildNodes();
> for (int i = 0; i < list.getLength(); i++) {
> buffer.append(list.item(i).getNodeValue());
> }
> return buffer.toString().trim();
> }
>
> should be changed to:
> protected String getTextContent() {
> StringBuffer buffer = new StringBuffer();
> NodeList list = getNode().getChildNodes();
> for (int i = 0; i < list.getLength(); i++) {
> String nodeValue = list.item(i).getNodeValue();
> if (nodeValue != null)
> buffer.append(nodeValue);
> }
> return buffer.toString().trim();
> }
>
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.jboss.com/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
More information about the jboss-jira
mailing list