ranger-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sneet...@apache.org
Subject incubator-ranger git commit: RANGER-487: Fix pagination issues in analytics page
Date Sun, 17 May 2015 22:30:50 GMT
Repository: incubator-ranger
Updated Branches:
  refs/heads/master 33ec87ec6 -> 103104129


RANGER-487: Fix pagination issues in analytics page

Signed-off-by: sneethiraj <sneethir@apache.org>


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

Branch: refs/heads/master
Commit: 1031041296e64d193e4234e80823ebc8e4ee7e91
Parents: 33ec87e
Author: Velmurugan Periasamy <vel@apache.org>
Authored: Sun May 17 18:19:07 2015 -0400
Committer: sneethiraj <sneethir@apache.org>
Committed: Sun May 17 18:30:27 2015 -0400

----------------------------------------------------------------------
 .../src/main/java/org/apache/ranger/common/RangerSearchUtil.java   | 1 +
 .../src/main/java/org/apache/ranger/common/SearchUtil.java         | 2 ++
 2 files changed, 3 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-ranger/blob/10310412/security-admin/src/main/java/org/apache/ranger/common/RangerSearchUtil.java
----------------------------------------------------------------------
diff --git a/security-admin/src/main/java/org/apache/ranger/common/RangerSearchUtil.java b/security-admin/src/main/java/org/apache/ranger/common/RangerSearchUtil.java
index 8b276d5..897ed5d 100644
--- a/security-admin/src/main/java/org/apache/ranger/common/RangerSearchUtil.java
+++ b/security-admin/src/main/java/org/apache/ranger/common/RangerSearchUtil.java
@@ -152,6 +152,7 @@ public class RangerSearchUtil extends SearchUtil {
 		int startIndex = restErrorUtil.parseInt(request.getParameter(SearchFilter.START_INDEX),
0,
 				"Invalid value for parameter startIndex", MessageEnums.INVALID_INPUT_DATA, null,
 				SearchFilter.START_INDEX);
+		startIndex = startIndex < 0 ? 0 : startIndex;
 		ret.setStartIndex(startIndex);
 
 		int pageSize = restErrorUtil.parseInt(request.getParameter(SearchFilter.PAGE_SIZE),

http://git-wip-us.apache.org/repos/asf/incubator-ranger/blob/10310412/security-admin/src/main/java/org/apache/ranger/common/SearchUtil.java
----------------------------------------------------------------------
diff --git a/security-admin/src/main/java/org/apache/ranger/common/SearchUtil.java b/security-admin/src/main/java/org/apache/ranger/common/SearchUtil.java
index 731ce46..e3cb28f 100644
--- a/security-admin/src/main/java/org/apache/ranger/common/SearchUtil.java
+++ b/security-admin/src/main/java/org/apache/ranger/common/SearchUtil.java
@@ -70,6 +70,7 @@ public class SearchUtil {
 				request.getParameter("startIndex"), 0,
 				"Invalid value for parameter startIndex",
 				MessageEnums.INVALID_INPUT_DATA, null, "startIndex");
+		startIndex = startIndex < 0 ? 0 : startIndex;
 		searchCriteria.setStartIndex(startIndex);
 
 		int pageSize = restErrorUtil.parseInt(request.getParameter("pageSize"),
@@ -120,6 +121,7 @@ public class SearchUtil {
 				request.getParameter("startIndex"), 0,
 				"Invalid value for parameter startIndex",
 				MessageEnums.INVALID_INPUT_DATA, null, "startIndex");
+		startIndex = startIndex < 0 ? 0 : startIndex;
 		searchCriteria.setStartIndex(startIndex);
 
 		int pageSize = restErrorUtil.parseInt(request.getParameter("pageSize"),


Mime
View raw message