KEYCLOAK-2705

This commit is contained in:
Bill Burke committed 2016-12-06 17:32:41 -05:00
1 parent a0b54ebedc
commit 68c8bfa0e1
4 files changed
+17 -1

No files matched your search

@@ -212,7 +212,7 @@ public class GroupResource {
throw new NotFoundException("Could not find group by id");
}
firstResult = firstResult != null ? firstResult : -1;
firstResult = firstResult != null ? firstResult : 0;
maxResults = maxResults != null ? maxResults : Constants.DEFAULT_MAX_RESULTS;
List<UserRepresentation> results = new ArrayList<UserRepresentation>();
@@ -379,6 +379,8 @@ public class UserStorageManager implements UserProvider, OnUserCache {
protected List<UserModel> query(PaginatedQuery pagedQuery, RealmModel realm, int firstResult, int maxResults) {
if (maxResults == 0) return Collections.EMPTY_LIST;
if (firstResult < 0) firstResult = 0;
if (maxResults < 0) maxResults = Integer.MAX_VALUE - 1;
List<UserQueryProvider> storageProviders = getStorageProviders(session, realm, UserQueryProvider.class);
// we can skip rest of method if there are no storage providers