Fix for Issue 43 - Support for JSON unmarshalling of @XmlRootElement

beans.
This commit is contained in:
Rob Bygrave
2013-07-29 23:24:30 +12:00
parent 6f579ba890
commit 44d95dc06c
5 changed files with 74 additions and 16 deletions
@@ -259,10 +259,14 @@ public class DeployCreateProperties {
@SuppressWarnings({ "unchecked", "rawtypes" })
private DeployBeanProperty createManyType(DeployBeanDescriptor<?> desc, Class<?> targetType, ManyType manyType) {
try {
ScalarType<?> scalarType = typeManager.getScalarType(targetType);
if (scalarType != null) {
return new DeployBeanPropertySimpleCollection(desc, targetType, scalarType, manyType);
}
} catch (NullPointerException e) {
logger.debug("expected non-scalar type"+e.getMessage());
}
//TODO: Handle Collection of CompoundType and Embedded Type
return new DeployBeanPropertyAssocMany(desc, targetType, manyType);
}