directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From elecha...@apache.org
Subject svn commit: r1588238 - /directory/shared/trunk/ldap/client/api/src/main/java/org/apache/directory/ldap/client/api/SearchCursorImpl.java
Date Thu, 17 Apr 2014 13:07:36 GMT
Author: elecharny
Date: Thu Apr 17 13:07:35 2014
New Revision: 1588238

URL: http://svn.apache.org/r1588238
Log:
The SearchCursor.getEntry() now throws a LdapReferralException when the returned value is
a referral

Modified:
    directory/shared/trunk/ldap/client/api/src/main/java/org/apache/directory/ldap/client/api/SearchCursorImpl.java

Modified: directory/shared/trunk/ldap/client/api/src/main/java/org/apache/directory/ldap/client/api/SearchCursorImpl.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/client/api/src/main/java/org/apache/directory/ldap/client/api/SearchCursorImpl.java?rev=1588238&r1=1588237&r2=1588238&view=diff
==============================================================================
--- directory/shared/trunk/ldap/client/api/src/main/java/org/apache/directory/ldap/client/api/SearchCursorImpl.java
(original)
+++ directory/shared/trunk/ldap/client/api/src/main/java/org/apache/directory/ldap/client/api/SearchCursorImpl.java
Thu Apr 17 13:07:35 2014
@@ -31,6 +31,7 @@ import org.apache.directory.api.ldap.mod
 import org.apache.directory.api.ldap.model.cursor.SearchCursor;
 import org.apache.directory.api.ldap.model.entry.Entry;
 import org.apache.directory.api.ldap.model.exception.LdapException;
+import org.apache.directory.api.ldap.model.exception.LdapReferralException;
 import org.apache.directory.api.ldap.model.message.IntermediateResponse;
 import org.apache.directory.api.ldap.model.message.Referral;
 import org.apache.directory.api.ldap.model.message.Response;
@@ -365,6 +366,12 @@ public class SearchCursorImpl extends Ab
         {
             return ( ( SearchResultEntry ) response ).getEntry();
         }
+        
+        if ( isReferral() )
+        {
+            Referral referral = ( ( SearchResultReference ) response ).getReferral();
+            throw new LdapReferralException( referral.getLdapUrls() );
+        }
 
         throw new LdapException();
     }



Mime
View raw message