Browse Source

Check to ensure the child object returned is not null before adding to list of child objects to validate.

1.0.x
Matthew Porter 21 years ago
parent
commit
625efa4782
  1. 6
      domain/src/main/java/org/acegisecurity/domain/hibernate/IntrospectionManagerHibernate.java

6
domain/src/main/java/org/acegisecurity/domain/hibernate/IntrospectionManagerHibernate.java

@ -122,8 +122,10 @@ public class IntrospectionManagerHibernate implements IntrospectionManager, @@ -122,8 +122,10 @@ public class IntrospectionManagerHibernate implements IntrospectionManager,
// only if a Validator is registered for that Object
if (this.validationRegistryManager.findValidator(
propertyType.getReturnedClass()) != null) {
allObjects.add(classMetadata.getPropertyValue(
parentObject, propertyNames[i], EntityMode.POJO));
Object childObject = classMetadata.getPropertyValue(parentObject, propertyNames[i], EntityMode.POJO);
if (childObject != null) {
allObjects.add(childObject);
}
}
}
}

Loading…
Cancel
Save