directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From elecha...@apache.org
Subject svn commit: r928935 - /directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/schema/normalizers/CachingNormalizer.java
Date Mon, 29 Mar 2010 23:06:28 GMT
Author: elecharny
Date: Mon Mar 29 23:06:28 2010
New Revision: 928935

URL: http://svn.apache.org/viewvc?rev=928935&view=rev
Log:
Remove the cache as it's wrongly grap the AttributeType from the string we pass 

Modified:
    directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/schema/normalizers/CachingNormalizer.java

Modified: directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/schema/normalizers/CachingNormalizer.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/schema/normalizers/CachingNormalizer.java?rev=928935&r1=928934&r2=928935&view=diff
==============================================================================
--- directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/schema/normalizers/CachingNormalizer.java
(original)
+++ directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/schema/normalizers/CachingNormalizer.java
Mon Mar 29 23:06:28 2010
@@ -25,7 +25,7 @@ import org.apache.directory.shared.ldap.
 import org.apache.directory.shared.ldap.schema.Normalizer;
 import org.apache.directory.shared.ldap.schema.SchemaManager;
 import org.apache.directory.shared.ldap.schema.registries.Registries;
-import org.apache.directory.shared.ldap.util.SynchronizedLRUMap;
+//import org.apache.directory.shared.ldap.util.SynchronizedLRUMap;
 
 
 /**
@@ -43,7 +43,7 @@ public class CachingNormalizer extends N
     public static final int CACHE_MAX = 250;
 
     /** Least recently used cache */
-    private final SynchronizedLRUMap cache;
+    //private final SynchronizedLRUMap cache;
 
     /** The underlying decorated Normalizer */
     protected final Normalizer normalizer;
@@ -77,7 +77,7 @@ public class CachingNormalizer extends N
     {
         super( normalizer.getOid() );
         this.normalizer = normalizer;
-        cache = new SynchronizedLRUMap( cacheSz );
+        //cache = new SynchronizedLRUMap( cacheSz );
     }
 
 
@@ -115,15 +115,16 @@ public class CachingNormalizer extends N
             return null;
         }
 
-        Value<?> result = ( Value<?> ) cache.get( value );
+        //Value<?> result = ( Value<?> ) cache.get( value );
 
-        if ( result != null )
-        {
-            return result;
-        }
+        //if ( result != null )
+        //{
+        //    return result;
+        //}
 
         Value<?> normalized = normalizer.normalize( value );
-        cache.put( value, normalized );
+        //cache.put( value, normalized );
+        
         return normalized;
     }
 
@@ -138,15 +139,15 @@ public class CachingNormalizer extends N
             return null;
         }
 
-        String normalized = ( String ) cache.get( value );
+        //String normalized = ( String ) cache.get( value );
 
-        if ( normalized != null )
-        {
-            return normalized;
-        }
+        //if ( normalized != null )
+        //{
+        //    return normalized;
+        //}
 
-        normalized = normalizer.normalize( value );
-        cache.put( value, normalized );
+        String normalized = normalizer.normalize( value );
+        //cache.put( value, normalized );
         return normalized;
     }
 



Mime
View raw message