Improve logging.

This commit is contained in:
Ben Alex 2005-05-17 00:06:15 +00:00
parent 0b6d0a5798
commit 14e384051b
1 changed files with 11 additions and 7 deletions

View File

@ -220,20 +220,24 @@ public class ValidationManagerImpl implements InitializingBean,
introspectionManager.obtainImmediateChildren(parentObject,
currentChildren);
// Add the children
allObjects.addAll(currentChildren);
// Now iterate the children, adding their children to the object list
Iterator<Object> childrenIter = currentChildren.iterator();
while (childrenIter.hasNext()) {
Object childObject = childrenIter.next();
if (childObject != null && !allObjects.contains(childObject)) {
if (logger.isDebugEnabled()) {
logger.debug("New child class found; searching for children of: " + childObject);
if (childObject != null) {
if (allObjects.contains(childObject)) {
if (logger.isDebugEnabled()) {
logger.debug("Already processed this object (will not re-add): " + childObject);
}
} else {
if (logger.isDebugEnabled()) {
logger.debug("New child object found; adding child object to list of objects, and searching for its children: " + childObject);
}
allObjects.add(childObject);
obtainAllChildren(childObject, allObjects);
}
obtainAllChildren(childObject, allObjects);
}
}
}