directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From akaras...@apache.org
Subject svn commit: r411578 - in /directory/branches/apacheds/optimization/core/src/main/java/org/apache/directory/server/core/schema: GlobalAttributeTypeRegistry.java bootstrap/BootstrapAttributeTypeRegistry.java
Date Sun, 04 Jun 2006 15:07:33 GMT
Author: akarasulu
Date: Sun Jun  4 08:07:33 2006
New Revision: 411578

URL: http://svn.apache.org/viewvc?rev=411578&view=rev
Log:
fixing for npe in mapping generation in these registries for normalizer maps

Modified:
    directory/branches/apacheds/optimization/core/src/main/java/org/apache/directory/server/core/schema/GlobalAttributeTypeRegistry.java
    directory/branches/apacheds/optimization/core/src/main/java/org/apache/directory/server/core/schema/bootstrap/BootstrapAttributeTypeRegistry.java

Modified: directory/branches/apacheds/optimization/core/src/main/java/org/apache/directory/server/core/schema/GlobalAttributeTypeRegistry.java
URL: http://svn.apache.org/viewvc/directory/branches/apacheds/optimization/core/src/main/java/org/apache/directory/server/core/schema/GlobalAttributeTypeRegistry.java?rev=411578&r1=411577&r2=411578&view=diff
==============================================================================
--- directory/branches/apacheds/optimization/core/src/main/java/org/apache/directory/server/core/schema/GlobalAttributeTypeRegistry.java
(original)
+++ directory/branches/apacheds/optimization/core/src/main/java/org/apache/directory/server/core/schema/GlobalAttributeTypeRegistry.java
Sun Jun  4 08:07:33 2006
@@ -119,6 +119,13 @@
         monitor.registered( attributeType );
         
         // update the cached normalizer mapping
+        if ( mapping == null )
+        {
+            Map bootstrapMapping = bootstrap.getNormalizerMapping();
+            mapping = new HashMap( bootstrapMapping.size() );
+            mapping.putAll( bootstrapMapping );
+        }
+        
         Normalizer normalizer = attributeType.getEquality().getNormalizer();
         mapping.put( attributeType.getOid(), normalizer );
         String[] aliases = attributeType.getNames();
@@ -200,7 +207,7 @@
         if ( mapping == null )
         {
             Map bootstrapMapping = bootstrap.getNormalizerMapping();
-            Map mapping = new HashMap( ( byOid.size() << 1 ) + bootstrapMapping.size()
);
+            mapping = new HashMap( ( byOid.size() << 1 ) + bootstrapMapping.size()
);
             mapping.putAll( bootstrapMapping );
             for ( Iterator ii = byOid.values().iterator(); ii.hasNext(); /**/ )
             {

Modified: directory/branches/apacheds/optimization/core/src/main/java/org/apache/directory/server/core/schema/bootstrap/BootstrapAttributeTypeRegistry.java
URL: http://svn.apache.org/viewvc/directory/branches/apacheds/optimization/core/src/main/java/org/apache/directory/server/core/schema/bootstrap/BootstrapAttributeTypeRegistry.java?rev=411578&r1=411577&r2=411578&view=diff
==============================================================================
--- directory/branches/apacheds/optimization/core/src/main/java/org/apache/directory/server/core/schema/bootstrap/BootstrapAttributeTypeRegistry.java
(original)
+++ directory/branches/apacheds/optimization/core/src/main/java/org/apache/directory/server/core/schema/bootstrap/BootstrapAttributeTypeRegistry.java
Sun Jun  4 08:07:33 2006
@@ -104,6 +104,11 @@
         monitor.registered( attributeType );
 
         // update the cached normalizer mapping
+        if ( mapping == null )
+        {
+            mapping = new HashMap();
+        }
+        
         Normalizer normalizer = attributeType.getEquality().getNormalizer();
         mapping.put( attributeType.getOid(), normalizer );
         String[] aliases = attributeType.getNames();



Mime
View raw message