cloudstack-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From raj...@apache.org
Subject [3/9] git commit: updated refs/heads/4.9 to b95bf8f
Date Tue, 28 Feb 2017 00:21:41 GMT
CLOUDSTACK-9788: Fix exception listNetworks with pagesize=0


Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo
Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/c883e294
Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/c883e294
Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/c883e294

Branch: refs/heads/4.9
Commit: c883e294d36f64d09bed2f7e22086ab413f28d33
Parents: 6dced70
Author: Wei Zhou <w.zhou@tech.leaseweb.com>
Authored: Thu Feb 16 12:01:44 2017 +0100
Committer: Wei Zhou <w.zhou@tech.leaseweb.com>
Committed: Thu Feb 16 14:08:21 2017 +0100

----------------------------------------------------------------------
 utils/src/main/java/com/cloud/utils/StringUtils.java | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/c883e294/utils/src/main/java/com/cloud/utils/StringUtils.java
----------------------------------------------------------------------
diff --git a/utils/src/main/java/com/cloud/utils/StringUtils.java b/utils/src/main/java/com/cloud/utils/StringUtils.java
index 71cebe1..9554e87 100644
--- a/utils/src/main/java/com/cloud/utils/StringUtils.java
+++ b/utils/src/main/java/com/cloud/utils/StringUtils.java
@@ -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<>();


Mime
View raw message