You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@directory.apache.org by fe...@apache.org on 2010/05/17 11:36:50 UTC
svn commit: r945046 -
/directory/shared/trunk/ldap-schema-manager/src/main/java/org/apache/directory/shared/ldap/schema/manager/impl/DefaultSchemaManager.java
Author: felixk
Date: Mon May 17 09:36:50 2010
New Revision: 945046
URL: http://svn.apache.org/viewvc?rev=945046&view=rev
Log:
- No need to loop over, because after the first iteration the loop will be left anyway because of the thrown exception
- Preserve Exceptions thrown by the schemaLoader
Modified:
directory/shared/trunk/ldap-schema-manager/src/main/java/org/apache/directory/shared/ldap/schema/manager/impl/DefaultSchemaManager.java
Modified: directory/shared/trunk/ldap-schema-manager/src/main/java/org/apache/directory/shared/ldap/schema/manager/impl/DefaultSchemaManager.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap-schema-manager/src/main/java/org/apache/directory/shared/ldap/schema/manager/impl/DefaultSchemaManager.java?rev=945046&r1=945045&r2=945046&view=diff
==============================================================================
--- directory/shared/trunk/ldap-schema-manager/src/main/java/org/apache/directory/shared/ldap/schema/manager/impl/DefaultSchemaManager.java (original)
+++ directory/shared/trunk/ldap-schema-manager/src/main/java/org/apache/directory/shared/ldap/schema/manager/impl/DefaultSchemaManager.java Mon May 17 09:36:50 2010
@@ -751,10 +751,14 @@ public class DefaultSchemaManager implem
*/
private void addDitContentRules( Schema schema, Registries registries ) throws Exception
{
- for ( Entry entry : schemaLoader.loadDitContentRules( schema ) )
- {
+ if ( !schemaLoader.loadDitContentRules( schema ).isEmpty() )
+ {
throw new NotImplementedException( I18n.err( I18n.ERR_11003 ) );
- }
+ }
+ // for ( Entry entry : schemaLoader.loadDitContentRules( schema ) )
+ // {
+ // throw new NotImplementedException( I18n.err( I18n.ERR_11003 ) );
+ // }
}
@@ -763,10 +767,14 @@ public class DefaultSchemaManager implem
*/
private void addDitStructureRules( Schema schema, Registries registries ) throws Exception
{
- for ( Entry entry : schemaLoader.loadDitStructureRules( schema ) )
- {
+ if ( !schemaLoader.loadDitStructureRules( schema ).isEmpty() )
+ {
throw new NotImplementedException( I18n.err( I18n.ERR_11004 ) );
- }
+ }
+ // for ( Entry entry : schemaLoader.loadDitStructureRules( schema ) )
+ // {
+ // throw new NotImplementedException( I18n.err( I18n.ERR_11004 ) );
+ // }
}
@@ -789,10 +797,14 @@ public class DefaultSchemaManager implem
*/
private void addMatchingRuleUses( Schema schema, Registries registries ) throws Exception
{
- for ( Entry entry : schemaLoader.loadMatchingRuleUses( schema ) )
- {
+ if ( !schemaLoader.loadMatchingRuleUses( schema ).isEmpty() )
+ {
throw new NotImplementedException( I18n.err( I18n.ERR_11005 ) );
- }
+ }
+ // for ( Entry entry : schemaLoader.loadMatchingRuleUses( schema ) )
+ // {
+ // throw new NotImplementedException( I18n.err( I18n.ERR_11005 ) );
+ // }
}
@@ -801,10 +813,14 @@ public class DefaultSchemaManager implem
*/
private void addNameForms( Schema schema, Registries registries ) throws Exception
{
- for ( Entry entry : schemaLoader.loadNameForms( schema ) )
- {
+ if ( !schemaLoader.loadNameForms( schema ).isEmpty() )
+ {
throw new NotImplementedException( I18n.err( I18n.ERR_11006 ) );
- }
+ }
+ // for ( Entry entry : schemaLoader.loadNameForms( schema ) )
+ // {
+ // throw new NotImplementedException( I18n.err( I18n.ERR_11006 ) );
+ // }
}