ElementMap deserializing null values instead of objects
Brought to you by:
niallg
Deserializing an XML of ElementMap may result in converting legitimate objects to null values. An example JUnit test is attached. The bug is caused by a check in CompositeValue#read(InputNode) where the code checks if:
if(next.isEmpty()) {
return null;
}
In a map, an empty node may actually invoke a constructor of an object (and it should). Adding an empty text node inside the serialized XML solves the problem.
A test case an aspectj aspect used to trace the calls
method trace difference (capture)