ranger-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mad...@apache.org
Subject [14/16] incubator-ranger git commit: RANGER-487: Fix pagination issues in analytics page
Date Mon, 18 May 2015 04:53:12 GMT
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/tag-policy
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