[ 
http://jira.codehaus.org/browse/XFIRE-835?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_88146
 ] 

Renaud Bruyeron commented on XFIRE-835:
---------------------------------------


See XFIRE-847
root.getElementText() should not return null according to the StAX RI javadoc, 
therefore value should never be null.
If value is null, then there is a bug further down the stack, in the 
XMLStreamReader implementation being used.

> ElementReader can throw NPE
> ---------------------------
>
>                 Key: XFIRE-835
>                 URL: http://jira.codehaus.org/browse/XFIRE-835
>             Project: XFire
>          Issue Type: Bug
>    Affects Versions: 1.2.3, 1.2.4
>         Environment: Windows XP, Tomcat
>            Reporter: Jabe Bloom
>         Assigned To: Dan Diephouse
>            Priority: Critical
>
>  public String getValue()
>     {
>         if (value == null) 
>         {
>             try
>             {
>                 value = root.getElementText();
>                 while (checkHasMoreChildReaders()) {}
>             }
>             catch (XMLStreamException e)
>             {
>                 throw new XFireRuntimeException("Could not read XML stream.", 
> e);
>             }
>         }
>         return value.trim();
>     }
> The return value.trim() here assumes that value != null.
> Please check for null before the trim()?

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: 
http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

---------------------------------------------------------------------
To unsubscribe from this list please visit:

    http://xircles.codehaus.org/manage_email

Reply via email to