mirror of
https://github.com/spring-projects/spring-security.git
synced 2025-06-25 05:22:16 +00:00
Prevent infinite loops, and add logging.
This commit is contained in:
parent
1fc79f04f1
commit
018f625e85
@ -210,6 +210,10 @@ public class ValidationManagerImpl implements InitializingBean,
|
|||||||
Assert.isTrue(allObjects.contains(parentObject),
|
Assert.isTrue(allObjects.contains(parentObject),
|
||||||
"List of objects missing the requested parentObject");
|
"List of objects missing the requested parentObject");
|
||||||
|
|
||||||
|
if (logger.isDebugEnabled()) {
|
||||||
|
logger.debug("Searching for children of " + parentObject);
|
||||||
|
}
|
||||||
|
|
||||||
// Add immediate children of this domain object
|
// Add immediate children of this domain object
|
||||||
List currentChildren = new Vector();
|
List currentChildren = new Vector();
|
||||||
introspectionManager.obtainImmediateChildren(parentObject,
|
introspectionManager.obtainImmediateChildren(parentObject,
|
||||||
@ -224,7 +228,10 @@ public class ValidationManagerImpl implements InitializingBean,
|
|||||||
while (childrenIter.hasNext()) {
|
while (childrenIter.hasNext()) {
|
||||||
Object childObject = childrenIter.next();
|
Object childObject = childrenIter.next();
|
||||||
|
|
||||||
if (childObject != null) {
|
if (childObject != null && !allObjects.contains(childObject)) {
|
||||||
|
if (logger.isDebugEnabled()) {
|
||||||
|
logger.debug("New child class found; searching for children of: " + childObject);
|
||||||
|
}
|
||||||
obtainAllChildren(childObject, allObjects);
|
obtainAllChildren(childObject, allObjects);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user