directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From elecha...@apache.org
Subject svn commit: r807193 - /directory/shared/branches/shared-schema/ldap/src/main/java/org/apache/directory/shared/ldap/schema/registries/SchemaObjectRegistry.java
Date Mon, 24 Aug 2009 12:54:36 GMT
Author: elecharny
Date: Mon Aug 24 12:54:35 2009
New Revision: 807193

URL: http://svn.apache.org/viewvc?rev=807193&view=rev
Log:
Also removed descriptions from the maps when unregistring SchemaObjects

Modified:
    directory/shared/branches/shared-schema/ldap/src/main/java/org/apache/directory/shared/ldap/schema/registries/SchemaObjectRegistry.java

Modified: directory/shared/branches/shared-schema/ldap/src/main/java/org/apache/directory/shared/ldap/schema/registries/SchemaObjectRegistry.java
URL: http://svn.apache.org/viewvc/directory/shared/branches/shared-schema/ldap/src/main/java/org/apache/directory/shared/ldap/schema/registries/SchemaObjectRegistry.java?rev=807193&r1=807192&r2=807193&view=diff
==============================================================================
--- directory/shared/branches/shared-schema/ldap/src/main/java/org/apache/directory/shared/ldap/schema/registries/SchemaObjectRegistry.java
(original)
+++ directory/shared/branches/shared-schema/ldap/src/main/java/org/apache/directory/shared/ldap/schema/registries/SchemaObjectRegistry.java
Mon Aug 24 12:54:35 2009
@@ -47,12 +47,11 @@
     /** A speedup for debug */
     private static final boolean DEBUG = LOG.isDebugEnabled();
     
-    /** a map of Normalizers looked up by OID or Name */
+    /** a map of SchemaObject looked up by OID or Name */
     protected final Map<String, T> byOid;
     
     /** maps an OID to a SchemaObject specification */
     private final Map<String, U> oidToSpecification;
-
     
     /** The SchemaObject type */
     protected SchemaObjectType type;
@@ -288,6 +287,9 @@
         }
 
         SchemaObject schemaObject = byOid.remove( numericOid );
+        
+        // Also remove the description, if any
+        oidToSpecification.remove( numericOid );
 
         if ( DEBUG )
         {
@@ -297,10 +299,10 @@
     
     
     /**
-     * Unregisters all syntaxCheckers defined for a specific schema from
+     * Unregisters all SchemaObjects defined for a specific schema from
      * this registry.
      * 
-     * @param schemaName the name of the schema whose syntaxCheckers will be removed
+     * @param schemaName the name of the schema whose SchemaObjects will be removed from
      */
     public void unregisterSchemaElements( String schemaName )
     {
@@ -317,6 +319,9 @@
             {
                 String oid = schemaObject.getOid();
                 SchemaObject removed = byOid.remove( oid );
+                
+                // Also remove the description if any
+                oidToSpecification.remove( oid );
 
                 if ( DEBUG )
                 {



Mime
View raw message