
| Key: |
XSTR-338
|
| Type: |
Bug
|
| Status: |
Closed
|
| Resolution: |
Fixed
|
| Assignee: |
Unassigned
|
| Reporter: |
Chris Ingham
|
| Votes: |
1
|
| Watchers: |
2
|
|
If you were logged in you would be able to see more operations.
|
|
|
XStream
Created: 30/Aug/06 06:31 PM
Updated: 09/Nov/06 05:05 PM
|
|
| Component/s: |
None
|
| Affects Version/s: |
None
|
| Fix Version/s: |
1.2.1
|
|
| JDK version and platform: |
Sun 1.5.0_06 for Windows
|
|
Tried the experimental JSON support and ran into a NPE when ColorConverter attempts to marshall a Color.class instance as four ints, calling startNode(String) without the 2nd Class parameter:
Exception in thread "main" java.lang.NullPointerException
at java.lang.Class.isAssignableFrom(Native Method)
at com.thoughtworks.xstream.io.json.JsonHierarchicalStreamWriter.startNode(JsonHierarchicalStreamWriter.java:77)
at com.thoughtworks.xstream.io.json.JsonHierarchicalStreamWriter.startNode(JsonHierarchicalStreamWriter.java:58)
at com.thoughtworks.xstream.io.WriterWrapper.startNode(WriterWrapper.java:17)
at com.thoughtworks.xstream.io.path.PathTrackingWriter.startNode(PathTrackingWriter.java:25)
at com.thoughtworks.xstream.converters.extended.ColorConverter.write(ColorConverter.java:49)
at com.thoughtworks.xstream.converters.extended.ColorConverter.marshal(ColorConverter.java:29)
at com.thoughtworks.xstream.core.AbstractReferenceMarshaller.convert(AbstractReferenceMarshaller.java:59)
at com.thoughtworks.xstream.core.TreeMarshaller.convertAnother(TreeMarshaller.java:50)
at com.thoughtworks.xstream.annotations.AnnotationReflectionConverter.marshallField(AnnotationReflectionConverter.java:37)
at com.thoughtworks.xstream.converters.reflection.AbstractReflectionConverter$2.writeField(AbstractReflectionConverter.java:105)
at com.thoughtworks.xstream.converters.reflection.AbstractReflectionConverter$2.visit(AbstractReflectionConverter.java:81)
at com.thoughtworks.xstream.converters.reflection.PureJavaReflectionProvider.visitSerializableFields(PureJavaReflectionProvider.java:109)
at com.thoughtworks.xstream.converters.reflection.AbstractReflectionConverter.doMarshal(AbstractReflectionConverter.java:66)
at com.thoughtworks.xstream.converters.reflection.AbstractReflectionConverter.marshal(AbstractReflectionConverter.java:41)
at com.thoughtworks.xstream.core.AbstractReferenceMarshaller.convert(AbstractReferenceMarshaller.java:59)
at com.thoughtworks.xstream.core.TreeMarshaller.convertAnother(TreeMarshaller.java:50)
at com.thoughtworks.xstream.core.TreeMarshaller.start(TreeMarshaller.java:73)
at com.thoughtworks.xstream.core.ReferenceByXPathMarshallingStrategy.marshal(ReferenceByXPathMarshallingStrategy.java:34)
at com.thoughtworks.xstream.XStream.marshal(XStream.java:745)
at com.thoughtworks.xstream.XStream.marshal(XStream.java:734)
at com.thoughtworks.xstream.XStream.toXML(XStream.java:715)
at com.thoughtworks.xstream.XStream.toXML(XStream.java:705)
...
|
|
Description
|
Tried the experimental JSON support and ran into a NPE when ColorConverter attempts to marshall a Color.class instance as four ints, calling startNode(String) without the 2nd Class parameter:
Exception in thread "main" java.lang.NullPointerException
at java.lang.Class.isAssignableFrom(Native Method)
at com.thoughtworks.xstream.io.json.JsonHierarchicalStreamWriter.startNode(JsonHierarchicalStreamWriter.java:77)
at com.thoughtworks.xstream.io.json.JsonHierarchicalStreamWriter.startNode(JsonHierarchicalStreamWriter.java:58)
at com.thoughtworks.xstream.io.WriterWrapper.startNode(WriterWrapper.java:17)
at com.thoughtworks.xstream.io.path.PathTrackingWriter.startNode(PathTrackingWriter.java:25)
at com.thoughtworks.xstream.converters.extended.ColorConverter.write(ColorConverter.java:49)
at com.thoughtworks.xstream.converters.extended.ColorConverter.marshal(ColorConverter.java:29)
at com.thoughtworks.xstream.core.AbstractReferenceMarshaller.convert(AbstractReferenceMarshaller.java:59)
at com.thoughtworks.xstream.core.TreeMarshaller.convertAnother(TreeMarshaller.java:50)
at com.thoughtworks.xstream.annotations.AnnotationReflectionConverter.marshallField(AnnotationReflectionConverter.java:37)
at com.thoughtworks.xstream.converters.reflection.AbstractReflectionConverter$2.writeField(AbstractReflectionConverter.java:105)
at com.thoughtworks.xstream.converters.reflection.AbstractReflectionConverter$2.visit(AbstractReflectionConverter.java:81)
at com.thoughtworks.xstream.converters.reflection.PureJavaReflectionProvider.visitSerializableFields(PureJavaReflectionProvider.java:109)
at com.thoughtworks.xstream.converters.reflection.AbstractReflectionConverter.doMarshal(AbstractReflectionConverter.java:66)
at com.thoughtworks.xstream.converters.reflection.AbstractReflectionConverter.marshal(AbstractReflectionConverter.java:41)
at com.thoughtworks.xstream.core.AbstractReferenceMarshaller.convert(AbstractReferenceMarshaller.java:59)
at com.thoughtworks.xstream.core.TreeMarshaller.convertAnother(TreeMarshaller.java:50)
at com.thoughtworks.xstream.core.TreeMarshaller.start(TreeMarshaller.java:73)
at com.thoughtworks.xstream.core.ReferenceByXPathMarshallingStrategy.marshal(ReferenceByXPathMarshallingStrategy.java:34)
at com.thoughtworks.xstream.XStream.marshal(XStream.java:745)
at com.thoughtworks.xstream.XStream.marshal(XStream.java:734)
at com.thoughtworks.xstream.XStream.toXML(XStream.java:715)
at com.thoughtworks.xstream.XStream.toXML(XStream.java:705)
... |
Show » |
|