directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From plusplusjia...@apache.org
Subject directory-kerby git commit: Having getIdentities method implement page querying in MemoryIdentityBackend. Contributed by Yaning.
Date Thu, 02 Jul 2015 06:10:27 GMT
Repository: directory-kerby
Updated Branches:
  refs/heads/master 9170df749 -> 7f98de0bc


Having getIdentities method implement page querying in MemoryIdentityBackend. Contributed
by Yaning.


Project: http://git-wip-us.apache.org/repos/asf/directory-kerby/repo
Commit: http://git-wip-us.apache.org/repos/asf/directory-kerby/commit/7f98de0b
Tree: http://git-wip-us.apache.org/repos/asf/directory-kerby/tree/7f98de0b
Diff: http://git-wip-us.apache.org/repos/asf/directory-kerby/diff/7f98de0b

Branch: refs/heads/master
Commit: 7f98de0bcfb006863863732273c927a743de59fb
Parents: 9170df7
Author: plusplusjiajia <jiajia.li@intel.com>
Authored: Thu Jul 2 14:15:50 2015 +0800
Committer: plusplusjiajia <jiajia.li@intel.com>
Committed: Thu Jul 2 14:15:50 2015 +0800

----------------------------------------------------------------------
 .../kerberos/kerb/identity/backend/MemoryIdentityBackend.java  | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/directory-kerby/blob/7f98de0b/kerby-kerb/kerb-identity/src/main/java/org/apache/kerby/kerberos/kerb/identity/backend/MemoryIdentityBackend.java
----------------------------------------------------------------------
diff --git a/kerby-kerb/kerb-identity/src/main/java/org/apache/kerby/kerberos/kerb/identity/backend/MemoryIdentityBackend.java
b/kerby-kerb/kerb-identity/src/main/java/org/apache/kerby/kerberos/kerb/identity/backend/MemoryIdentityBackend.java
index 0678c89..2129661 100644
--- a/kerby-kerb/kerb-identity/src/main/java/org/apache/kerby/kerberos/kerb/identity/backend/MemoryIdentityBackend.java
+++ b/kerby-kerb/kerb-identity/src/main/java/org/apache/kerby/kerberos/kerb/identity/backend/MemoryIdentityBackend.java
@@ -57,7 +57,11 @@ public class MemoryIdentityBackend extends AbstractIdentityBackend {
 
     @Override
     public List<String> getIdentities(int start, int limit) {
-        return getIdentities().subList(start, limit);
+        List<String> identities = getIdentities();
+        if (limit == -1 || start + limit > identities.size()) {
+            return identities;
+        }
+        return identities.subList(start, start + limit);
     }
 
 


Mime
View raw message