Discussion:
[castor-dev] RE: NPE unmarshalling an empty list
J***@shell.com
2010-03-31 16:03:27 UTC
Permalink
When unmarshalling an empty list, I get a NullPointerException from StringTokenizer at UnmarshalHandler.java:809 (using castor 1.3; I think it will be line 810 with 1.3.1).

<myList/> <!-- will produce NPE -->
<myList></myList> <!-- will produce NPE -->
<myList> </myList> <!-- will parse ok -->

Looking at the src, the StringTokenizer can't be constructed with a null 'str' string.

I'm assuming all three xml statements are valid if I want to allow for a 0-length list.

Thanks,

Jerre Parker


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

http://xircles.codehaus.org/manage_email
Werner Guttmann
2010-03-31 21:33:04 UTC
Permalink
Hi Jerre,

can you please file a bug with our Jira instance ?

Thanks
Werner
Post by J***@shell.com
When unmarshalling an empty list, I get a NullPointerException from StringTokenizer at UnmarshalHandler.java:809 (using castor 1.3; I think it will be line 810 with 1.3.1).
<myList/> <!-- will produce NPE -->
<myList></myList> <!-- will produce NPE -->
<myList> </myList> <!-- will parse ok -->
Looking at the src, the StringTokenizer can't be constructed with a null 'str' string.
I'm assuming all three xml statements are valid if I want to allow for a 0-length list.
Thanks,
Jerre Parker
---------------------------------------------------------------------
http://xircles.codehaus.org/manage_email
---------------------------------------------------------------------
To unsubscribe from this list, please visit:

http://xircles.codehaus.org/manage_email

Loading...