private SchemaObject copy( SchemaObject schemaObject ) { SchemaObject copy = null; if ( !( schemaObject instanceof LoadableSchemaObject ) ) { copy = schemaObject.copy(); } else { // Check the schemaObject here. if ( ( ( LoadableSchemaObject ) schemaObject ).isValid() ) { copy = schemaObject; } else { // We have an invalid SchemaObject, no need to go any further Throwable error = new LdapUnwillingToPerformException( ResultCodeEnum.UNWILLING_TO_PERFORM, I18n.err( I18n.ERR_11007, schemaObject.getOid() ) ); errors.add( error ); } } return copy; }