Details
- 
        Type: Bug Bug
- 
        Status: Closed Closed
- 
            Resolution: Duplicate
- 
            Affects Version/s: None
- 
            Fix Version/s: None
- 
            Component/s: None
- 
            Labels:None
- 
                        JDK version and platform:14
Description
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.
Issue Links
- duplicates
- 
             XSTR-250
        XStream is throwing NullPointerException XSTR-250
        XStream is throwing NullPointerException
-         



Duplicate of
XSTR-250.