directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From elecha...@apache.org
Subject svn commit: r942348 - /directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/schema/SchemaInterceptor.java
Date Sat, 08 May 2010 08:52:22 GMT
Author: elecharny
Date: Sat May  8 08:52:22 2010
New Revision: 942348

URL: http://svn.apache.org/viewvc?rev=942348&view=rev
Log:
Removed the filterObjectClass() method, as it's not called anymore. It was used to add the
missing OC when returning an entry, but as those OC are added when the entry is added into
the server, it's useless and time consuming. 

Modified:
    directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/schema/SchemaInterceptor.java

Modified: directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/schema/SchemaInterceptor.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/schema/SchemaInterceptor.java?rev=942348&r1=942347&r2=942348&view=diff
==============================================================================
--- directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/schema/SchemaInterceptor.java
(original)
+++ directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/schema/SchemaInterceptor.java
Sat May  8 08:52:22 2010
@@ -1456,30 +1456,6 @@ public class SchemaInterceptor extends B
     }
 
 
-    private void filterObjectClass( Entry entry ) throws Exception
-    {
-        List<ObjectClass> objectClasses = new ArrayList<ObjectClass>();
-        EntryAttribute oc = entry.get( SchemaConstants.OBJECT_CLASS_AT );
-
-        if ( oc != null )
-        {
-            getObjectClasses( oc, objectClasses );
-
-            entry.removeAttributes( SchemaConstants.OBJECT_CLASS_AT );
-
-            EntryAttribute newOc = new DefaultEntryAttribute( oc.getAttributeType() );
-
-            for ( ObjectClass currentOC : objectClasses )
-            {
-                newOc.add( currentOC.getName() );
-            }
-
-            newOc.add( SchemaConstants.TOP_OC );
-            entry.put( newOc );
-        }
-    }
-
-
     private void filterBinaryAttributes( Entry entry ) throws Exception
     {
         /*
@@ -1533,7 +1509,6 @@ public class SchemaInterceptor extends B
     {
         public boolean accept( SearchingOperationContext operation, ClonedServerEntry result
) throws Exception
         {
-            filterObjectClass( result );
             filterAttributeTypes( operation, result );
             return true;
         }



Mime
View raw message