KEYCLOAK-3074 Change the TestingResourceProvider to always both firstResults and maxResults in JPA criteria query

This commit is contained in:
mposolda 2016-06-03 10:30:34 +02:00
parent 13bf36ce49
commit c42b8f81e3

View file

@ -447,10 +447,14 @@ public class TestingResourceProvider implements RealmResourceProvider {
query.toTime(to);
}
if (firstResult != null) {
if (firstResult != null || maxResults != null) {
if (firstResult == null) {
firstResult = 0;
}
if (maxResults == null) {
maxResults = 100;
}
query.firstResult(firstResult);
}
if (maxResults != null) {
query.maxResults(maxResults);
}