You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Using xStream_1_4_20, Not able to convert AtomicReference atomicRef = new AtomicReference(); with default value. It is giving NullpointerException.
#326
Closed
ajaysharma2 opened this issue
Feb 22, 2023
· 1 comment
Current Class for converter lookup...java.util.concurrent.atomic.AtomicReference cachedConverter .... null marshal source ..... null marshal source getting object .....ref.get() null Exception occured .... null ... null java.lang.NullPointerException at com.thoughtworks.xstream.core.TreeMarshaller.convertAnother(TreeMarshaller.java:50) at com.thoughtworks.xstream.core.TreeMarshaller.convertAnother(TreeMarshaller.java:44) at com.thoughtworks.xstream.core.AbstractReferenceMarshaller$1.convertAnother(AbstractReferenceMarshaller.java:87) at com.thoughtworks.xstream.converters.extended.AtomicReferenceConverter.marshal(AtomicReferenceConverter.java:50) at com.thoughtworks.xstream.core.AbstractReferenceMarshaller.convert(AbstractReferenceMarshaller.java:68) at com.thoughtworks.xstream.core.TreeMarshaller.convertAnother(TreeMarshaller.java:60) at com.thoughtworks.xstream.core.TreeMarshaller.convertAnother(TreeMarshaller.java:44) at com.thoughtworks.xstream.core.TreeMarshaller.start(TreeMarshaller.java:89) at com.thoughtworks.xstream.core.AbstractTreeMarshallingStrategy.marshal(AbstractTreeMarshallingStrategy.java:37) at com.thoughtworks.xstream.XStream.marshal(XStream.java:1303) at com.thoughtworks.xstream.XStream.marshal(XStream.java:1292) at com.thoughtworks.xstream.XStream.toXML(XStream.java:1265) at com.thoughtworks.xstream.XStream.toXML(XStream.java:1252) at com.thoughtworks.acceptance.AbstractAcceptanceTest.toXML(AbstractAcceptanceTest.java:190) at com.thoughtworks.acceptance.AbstractAcceptanceTest.assertBothWays(AbstractAcceptanceTest.java:102) at com.thoughtworks.acceptance.Concurrent15TypesTest.testAtomicReference(Concurrent15TypesTest.java:107) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:498) at junit.framework.TestCase.runTest(TestCase.java:154) at junit.framework.TestCase.runBare(TestCase.java:127) at junit.framework.TestResult$1.protect(TestResult.java:106) at junit.framework.TestResult.runProtected(TestResult.java:124) at junit.framework.TestResult.run(TestResult.java:109) at junit.framework.TestCase.run(TestCase.java:118)
ablekhman
added a commit
to atlassian-forks/xstream
that referenced
this issue
Mar 28, 2023
It should handle NullpointerException
https://github.com/x-stream/xstream/blob/master/xstream/src/java/com/thoughtworks/xstream/converters/extended/AtomicReferenceConverter.java#L48
The text was updated successfully, but these errors were encountered: