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

Key: XSTR-497
Type: Bug Bug
Status: Resolved Resolved
Resolution: Fixed
Priority: Major Major
Assignee: Joerg Schaible
Reporter: Marcin Kierus
Votes: 0
Watchers: 0
Operations

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

getMungedConstructor in Sun14ReflectionProvider is unsafe

Created: 03/Jun/08 04:02 PM   Updated: 15/Jul/08 06:22 AM
Component/s: Core
Affects Version/s: 1.3
Fix Version/s: 1.x Maintenance

Issue Links:
Duplicate
 

JDK version and platform: Sun 1.4.2_08 for Linux


 Description  « Hide
Under unfavorable circumstances method getMungedConstructor in Sun14ReflectionProvider class might return null, what leads to NullPointerException in method newInstance. It occurs when GC has cleared the WeakReference just before "return (Constructor) ref.get();". See stack trace below:

...
Caused by: java.lang.NullPointerException
at com.thoughtworks.xstream.converters.reflection.Sun14ReflectionProvider.newInstance(Sun14ReflectionProvider.java:74)
at com.thoughtworks.xstream.converters.reflection.AbstractReflectionConverter.instantiateNewInstance(AbstractReflectionConverter.java:2
79)
at com.thoughtworks.xstream.converters.reflection.AbstractReflectionConverter.unmarshal(AbstractReflectionConverter.java:149)
at com.thoughtworks.xstream.core.TreeUnmarshaller.convert(TreeUnmarshaller.java:81)
... 49 more



 All   Comments   Change History      Sort Order: Ascending order - Click to sort in descending order
Joerg Schaible - 04/Jun/08 01:44 AM
Fixed in the head revision. Thanks for report.