Author: bdaw
Date: 2007-02-19 16:49:56 -0500 (Mon, 19 Feb 2007)
New Revision: 6350
Modified:
trunk/identity/src/main/org/jboss/portal/identity/ldap/LDAPExtUserModuleImpl.java
trunk/identity/src/main/org/jboss/portal/identity/ldap/LDAPUserModuleImpl.java
Log:
- correction in LDAPExtUserModuleImpl
Modified:
trunk/identity/src/main/org/jboss/portal/identity/ldap/LDAPExtUserModuleImpl.java
===================================================================
---
trunk/identity/src/main/org/jboss/portal/identity/ldap/LDAPExtUserModuleImpl.java 2007-02-19
21:24:41 UTC (rev 6349)
+++
trunk/identity/src/main/org/jboss/portal/identity/ldap/LDAPExtUserModuleImpl.java 2007-02-19
21:49:56 UTC (rev 6350)
@@ -168,24 +168,24 @@
int size = uf.size();
- if (offset == 0 && size <= (offset+limit))
+ if (offset == 0 && size <= limit)
{
return Tools.toSet(uf.iterator());
}
+
+ Collections.sort(uf, new LDAPUserImpl.LDAPUserComparator());
+
+ if (offset + limit <= size)
+ {
+ return Tools.toSet(uf.subList(offset, offset + limit).iterator());
+ }
else if (offset >= size)
{
return new HashSet();
}
- else if (offset + limit > size)
- {
- limit = size;
- }
- Collections.sort(uf, new LDAPUserImpl.LDAPUserComparator());
-
-
- return Tools.toSet(uf.subList(offset, offset + limit).iterator());
+ return Tools.toSet(uf.subList(offset, size).iterator());
}
public int getUserCount() throws IdentityException, IllegalArgumentException
Modified: trunk/identity/src/main/org/jboss/portal/identity/ldap/LDAPUserModuleImpl.java
===================================================================
---
trunk/identity/src/main/org/jboss/portal/identity/ldap/LDAPUserModuleImpl.java 2007-02-19
21:24:41 UTC (rev 6349)
+++
trunk/identity/src/main/org/jboss/portal/identity/ldap/LDAPUserModuleImpl.java 2007-02-19
21:49:56 UTC (rev 6350)
@@ -312,12 +312,6 @@
return Tools.toSet(uf.subList(offset, size).iterator());
-
- //should not happen
-
-
-
-
}
public int getUserCount() throws IdentityException, IllegalArgumentException
Show replies by date