directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From elecha...@apache.org
Subject svn commit: r1421157 - /directory/apacheds/trunk/core-api/src/main/java/org/apache/directory/server/core/api/entry/ServerEntryUtils.java
Date Thu, 13 Dec 2012 09:14:51 GMT
Author: elecharny
Date: Thu Dec 13 09:14:51 2012
New Revision: 1421157

URL: http://svn.apache.org/viewvc?rev=1421157&view=rev
Log:
get rid of the getAttributes() call when it's not useful

Modified:
    directory/apacheds/trunk/core-api/src/main/java/org/apache/directory/server/core/api/entry/ServerEntryUtils.java

Modified: directory/apacheds/trunk/core-api/src/main/java/org/apache/directory/server/core/api/entry/ServerEntryUtils.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/core-api/src/main/java/org/apache/directory/server/core/api/entry/ServerEntryUtils.java?rev=1421157&r1=1421156&r2=1421157&view=diff
==============================================================================
--- directory/apacheds/trunk/core-api/src/main/java/org/apache/directory/server/core/api/entry/ServerEntryUtils.java
(original)
+++ directory/apacheds/trunk/core-api/src/main/java/org/apache/directory/server/core/api/entry/ServerEntryUtils.java
Thu Dec 13 09:14:51 2012
@@ -754,7 +754,7 @@ public class ServerEntryUtils
         // First, remove all the attributes if we have the NoAtribute flag set to true
         if ( operationContext.isNoAttributes() )
         {
-            for ( Attribute attribute : originalEntry.getAttributes() )
+            for ( Attribute attribute : originalEntry )
             {
                 AttributeType attributeType = attribute.getAttributeType();
                 entry.remove( entry.get( attributeType ) );
@@ -769,7 +769,7 @@ public class ServerEntryUtils
         // the USER attributes, plus the Operational attributes in the returning list 
         if ( operationContext.isAllUserAttributes() )
         {
-            for ( Attribute attribute : originalEntry.getAttributes() )
+            for ( Attribute attribute : originalEntry )
             {
                 AttributeType attributeType = attribute.getAttributeType();
 
@@ -797,7 +797,7 @@ public class ServerEntryUtils
         // the OPERATIONAL attributes, plus the User attributes in the returning list 
         if ( operationContext.isAllOperationalAttributes() )
         {
-            for ( Attribute attribute : originalEntry.getAttributes() )
+            for ( Attribute attribute : originalEntry )
             {
                 AttributeType attributeType = attribute.getAttributeType();
 
@@ -825,7 +825,7 @@ public class ServerEntryUtils
         // Last, not least, check if the attributes are in the returning list
         if ( operationContext.getReturningAttributes() != null )
         {
-            for ( Attribute attribute : originalEntry.getAttributes() )
+            for ( Attribute attribute : originalEntry )
             {
                 if ( !operationContext.contains( schemaManager, attribute.getAttributeType()
) )
                 {



Mime
View raw message