From 6829598077b60c903a5a8d86437bb3f74ed5e789 Mon Sep 17 00:00:00 2001 From: Mattias Hellborg Arthursson Date: Tue, 10 Sep 2013 15:03:55 +0200 Subject: [PATCH] LDAP-128: Improved javadoc documentation of PagedResults and cookies. --- .../org/springframework/ldap/control/PagedResultsCookie.java | 3 ++- .../ldap/control/PagedResultsDirContextProcessor.java | 5 ++++- 2 files changed, 6 insertions(+), 2 deletions(-) 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;