diff --git a/core/src/main/java/org/springframework/ldap/control/PagedResultsCookie.java b/core/src/main/java/org/springframework/ldap/control/PagedResultsCookie.java index 9ab314e2..7869a5bd 100644 --- a/core/src/main/java/org/springframework/ldap/control/PagedResultsCookie.java +++ b/core/src/main/java/org/springframework/ldap/control/PagedResultsCookie.java @@ -47,7 +47,8 @@ public class PagedResultsCookie { /** * Get the cookie. * - * @return the cookie. + * @return the cookie. This value may be null, indicating that there are no more requests, + * or that the control wasn't supported by the server. */ public byte[] getCookie() { if (cookie != null) { diff --git a/core/src/main/java/org/springframework/ldap/control/PagedResultsDirContextProcessor.java b/core/src/main/java/org/springframework/ldap/control/PagedResultsDirContextProcessor.java index 912fa054..a96babc4 100644 --- a/core/src/main/java/org/springframework/ldap/control/PagedResultsDirContextProcessor.java +++ b/core/src/main/java/org/springframework/ldap/control/PagedResultsDirContextProcessor.java @@ -84,7 +84,10 @@ public class PagedResultsDirContextProcessor extends AbstractFallbackRequestAndR /** * Get the cookie. * - * @return the cookie. + * @return the cookie. The cookie will always be set after at leas one query, however the actual cookie content + * can be null, indicating that there are no more results, in which case {@link #hasMore()} will return + * false. + * @see #hasMore() */ public PagedResultsCookie getCookie() { return cookie;