directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From elecha...@apache.org
Subject svn commit: r1330734 - in /directory/apacheds/branches/index-work: core-avl/src/main/java/org/apache/directory/server/core/avltree/ core-integ/src/test/java/org/apache/directory/server/core/authz/
Date Thu, 26 Apr 2012 09:46:47 GMT
Author: elecharny
Date: Thu Apr 26 09:46:47 2012
New Revision: 1330734

URL: http://svn.apache.org/viewvc?rev=1330734&view=rev
Log:
Minor refactoring to avoid confusion between local variable names and global variable names

Modified:
    directory/apacheds/branches/index-work/core-avl/src/main/java/org/apache/directory/server/core/avltree/AvlSingletonOrOrderedSetCursor.java
    directory/apacheds/branches/index-work/core-integ/src/test/java/org/apache/directory/server/core/authz/SearchAuthorizationIT.java

Modified: directory/apacheds/branches/index-work/core-avl/src/main/java/org/apache/directory/server/core/avltree/AvlSingletonOrOrderedSetCursor.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/index-work/core-avl/src/main/java/org/apache/directory/server/core/avltree/AvlSingletonOrOrderedSetCursor.java?rev=1330734&r1=1330733&r2=1330734&view=diff
==============================================================================
--- directory/apacheds/branches/index-work/core-avl/src/main/java/org/apache/directory/server/core/avltree/AvlSingletonOrOrderedSetCursor.java
(original)
+++ directory/apacheds/branches/index-work/core-avl/src/main/java/org/apache/directory/server/core/avltree/AvlSingletonOrOrderedSetCursor.java
Thu Apr 26 09:46:47 2012
@@ -173,9 +173,11 @@ public class AvlSingletonOrOrderedSetCur
             case ON_NODE:
             case AFTER_NODE:
                 node = node.next;
+                
                 if ( node == null )
                 {
                     afterLast();
+                    
                     return false;
                 }
                 else

Modified: directory/apacheds/branches/index-work/core-integ/src/test/java/org/apache/directory/server/core/authz/SearchAuthorizationIT.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/index-work/core-integ/src/test/java/org/apache/directory/server/core/authz/SearchAuthorizationIT.java?rev=1330734&r1=1330733&r2=1330734&view=diff
==============================================================================
--- directory/apacheds/branches/index-work/core-integ/src/test/java/org/apache/directory/server/core/authz/SearchAuthorizationIT.java
(original)
+++ directory/apacheds/branches/index-work/core-integ/src/test/java/org/apache/directory/server/core/authz/SearchAuthorizationIT.java
Thu Apr 26 09:46:47 2012
@@ -67,7 +67,6 @@ import org.junit.runner.RunWith;
 @CreateDS(enableAccessControl = true, name = "SearchAuthorizationIT")
 public class SearchAuthorizationIT extends AbstractLdapTestUnit
 {
-
     // to avoid creating too many connections during recursive operations
     private LdapConnection reusableAdminCon;
 
@@ -184,17 +183,17 @@ public class SearchAuthorizationIT exten
      */
     private void recursivelyDelete( Dn rdn ) throws Exception
     {
-        EntryCursor results = reusableAdminCon.search( rdn.getName(), "(objectClass=*)",
+        EntryCursor entries = reusableAdminCon.search( rdn.getName(), "(objectClass=*)",
             SearchScope.ONELEVEL, "*" );
 
-        while ( results.next() )
+        while ( entries.next() )
         {
-            Entry result = results.get();
-            Dn childRdn = result.getDn();
+            Entry entry = entries.get();
+            Dn childRdn = entry.getDn();
             recursivelyDelete( childRdn );
         }
 
-        results.close();
+        entries.close();
         
         reusableAdminCon.delete( rdn );
     }
@@ -341,18 +340,18 @@ public class SearchAuthorizationIT exten
     {
         LdapConnection connection = getAdminConnection();
         Dn base = addSearchData( new Dn( "ou=system" ), 3, 10 );
-
-        EntryCursor results = connection.search( base.getName(), "(objectClass=*)", SearchScope.SUBTREE,
+        
+        EntryCursor entries = connection.search( base.getName(), "(objectClass=*)", SearchScope.SUBTREE,
             "+" );
         int counter = 0;
 
-        while ( results.next() )
+        while ( entries.next() )
         {
-            results.get();
+            entries.get();
             counter++;
         }
         
-        results.close();
+        entries.close();
 
         assertEquals( 10, counter );
         recursivelyDelete( base );



Mime
View raw message