mirror of
https://github.com/apache/cloudstack
synced 2026-08-02 05:26:35 +00:00
CLOUDSTACK-9788: Fix exception listNetworks with pagesize=0
This commit is contained in:
parent
6dced70aa8
commit
c883e294d3
@ -296,8 +296,8 @@ public class StringUtils {
|
||||
public static <T> List<T> applyPagination(final List<T> originalList, final Long startIndex, final Long pageSizeVal) {
|
||||
// Most likely pageSize will never exceed int value, and we need integer to partition the listToReturn
|
||||
final boolean applyPagination = startIndex != null && pageSizeVal != null
|
||||
&& startIndex <= Integer.MAX_VALUE && startIndex >= Integer.MIN_VALUE && pageSizeVal <= Integer.MAX_VALUE
|
||||
&& pageSizeVal >= Integer.MIN_VALUE;
|
||||
&& startIndex <= Integer.MAX_VALUE && startIndex >= 0 && pageSizeVal <= Integer.MAX_VALUE
|
||||
&& pageSizeVal > 0;
|
||||
List<T> listWPagination = null;
|
||||
if (applyPagination) {
|
||||
listWPagination = new ArrayList<>();
|
||||
|
||||
Loading…
Reference in New Issue
Block a user