Details
-
Type:
Bug
-
Status:
Resolved
-
Priority:
Major
-
Resolution: Fixed
-
Affects Version/s: 1.1
-
Fix Version/s: 1.3
-
Labels:None
-
Environment:RESTEasy 1.2.1
groupId:org.jboss.resteasy
artifactId:resteasy-jettison-provider
version:1.2.1.GA
-
Number of attachments :
Description
I use jettison with jboss resteasy so I'm not a "real" jettison user.
I noticed that when I tried to unmarshall a String property like :
myText : null
My domain model object contains :
String myText = "null";
I tried to debug and found something strange :
at org.codehaus.jettison.mapped.MappedXMLStreamReader(MappedXMLStreamReader.java:152) :
currentValue is assigned with the toString() of newObj
but in case of
newObj is JSonObject.NULL and JSonObject.NULL.toString() is "null"
Shouldn't this class handle a special case for JSonObject.NULL and assign null to currentValue?
This issue seems to be causing problems for the folks at CXF.
https://issues.apache.org/jira/browse/CXF-2916
While muddling through the code I actually found 2 cases where this special handling was required. Hopefully I got them all but I would be curious anyone finds any others.
Attached please find my patch.