directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From elecha...@apache.org
Subject svn commit: r1485895 - /directory/apacheds/trunk/protocol-ldap/src/main/java/org/apache/directory/server/ldap/handlers/request/SearchRequestHandler.java
Date Thu, 23 May 2013 23:10:13 GMT
Author: elecharny
Date: Thu May 23 23:10:13 2013
New Revision: 1485895

URL: http://svn.apache.org/r1485895
Log:
Simplified the code

Modified:
    directory/apacheds/trunk/protocol-ldap/src/main/java/org/apache/directory/server/ldap/handlers/request/SearchRequestHandler.java

Modified: directory/apacheds/trunk/protocol-ldap/src/main/java/org/apache/directory/server/ldap/handlers/request/SearchRequestHandler.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/protocol-ldap/src/main/java/org/apache/directory/server/ldap/handlers/request/SearchRequestHandler.java?rev=1485895&r1=1485894&r2=1485895&view=diff
==============================================================================
--- directory/apacheds/trunk/protocol-ldap/src/main/java/org/apache/directory/server/ldap/handlers/request/SearchRequestHandler.java
(original)
+++ directory/apacheds/trunk/protocol-ldap/src/main/java/org/apache/directory/server/ldap/handlers/request/SearchRequestHandler.java
Thu May 23 23:10:13 2013
@@ -900,26 +900,26 @@ public class SearchRequestHandler extend
                 {
                     ldapUrl = new LdapUrl( url );
                     ldapUrl.setForceScopeRendering( true );
+
+                    switch ( req.getScope() )
+                    {
+                        case SUBTREE:
+                            ldapUrl.setScope( SearchScope.SUBTREE.getScope() );
+                            break;
+
+                        case ONELEVEL: // one level here is object level on remote server
+                            ldapUrl.setScope( SearchScope.OBJECT.getScope() );
+                            break;
+
+                        default:
+                            ldapUrl.setScope( SearchScope.OBJECT.getScope() );
+                    }
                 }
                 catch ( LdapURLEncodingException e )
                 {
                     LOG.error( I18n.err( I18n.ERR_165, url, entry ) );
                 }
 
-                switch ( req.getScope() )
-                {
-                    case SUBTREE:
-                        ldapUrl.setScope( SearchScope.SUBTREE.getScope() );
-                        break;
-
-                    case ONELEVEL: // one level here is object level on remote server
-                        ldapUrl.setScope( SearchScope.OBJECT.getScope() );
-                        break;
-
-                    default:
-                        ldapUrl.setScope( SearchScope.OBJECT.getScope() );
-                }
-
                 respRef.getReferral().addLdapUrl( ldapUrl.toString() );
             }
 



Mime
View raw message