History | Log In     View a printable version of the current page.  
Issue Details (XML | Word | Printable)

Key: XSTR-277
Type: Bug Bug
Status: Closed Closed
Resolution: Duplicate
Assignee: Unassigned
Reporter: Robert O'Connell
Votes: 0
Watchers: 1
Operations

If you were logged in you would be able to see more operations.
XStream

call to XStream constructor with Class Mapper results in Null Pointer

Created: 24/Feb/06 11:53 AM   Updated: 24/Feb/06 02:33 PM
Component/s: None
Affects Version/s: None
Fix Version/s: None

Issue Links:
Duplicate
 

JDK version and platform: 14


 Description  « Hide
Using an API from < 1.1.2 where a Class Mapper is passed into the XStream constructor now results in a null pointer.
To wit:
Caused by: java.lang.NullPointerException
at com.thoughtworks.xstream.XStream.alias(XStream.java:531)
at com.thoughtworks.xstream.XStream.setupAliases(XStream.java:239)
at com.thoughtworks.xstream.XStream.<init>(XStream.java:194)
at com.thoughtworks.xstream.XStream.<init>(XStream.java:181)

The constructor calls setupAliases, which calls alias(String, Class) for a predetermined set of aliases.
However, the method alias uses the field 'classAliasingMapper', which is ONLY set in the buildMapper method, which is NOT called when the constructor is given a class mapper.



 All   Comments   Change History      Sort Order: Ascending order - Click to sort in descending order
Joerg Schaible - 24/Feb/06 02:33 PM
Duplicate of XSTR-250.