@SuppressWarnings("PMD.EmptyCatchBlock")
private void resolveRecursive( ObjectClass objectClass, Set<String> processed, List<Throwable> errors )
{
// Process the Superiors, if any
List<String> superiorOids = objectClass.getSuperiorOids();
ObjectClass superior = null;
for ( String superiorOid : superiorOids )
{
// Check if the Superior is present in the registries
try
{
superior = objectClassRegistry.lookup( superiorOid );
}
catch ( LdapException ne )
{
// This OC's superior has not been loaded into the Registries.
if ( !processed.contains( superiorOid ) )
{
LdapSchemaException ldapSchemaException = new LdapSchemaException(
LdapSchemaExceptionCodes.OC_NONEXISTENT_SUPERIOR, ne );
ldapSchemaException.setSourceObject( objectClass );
ldapSchemaException.setRelatedId( superiorOid );
errors.add( ldapSchemaException );
}
}
// We now have to process the superior, if it hasn't been
// processed yet.
if ( superior != null )
{
if ( !processed.contains( superior.getOid() ) )
{
resolveRecursive( superior, processed, errors );
processed.add( objectClass.getOid() );
}
else