You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@kylin.apache.org by li...@apache.org on 2017/06/29 05:48:45 UTC

[38/50] kylin git commit: minor, fix NPE when limit or offset is null

minor, fix NPE when limit or offset is null


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

Branch: refs/heads/master
Commit: ba7bfd6131f3bb296dacbec3066340ffdce5765b
Parents: 3280172
Author: Hongbin Ma <ma...@apache.org>
Authored: Fri Jun 23 21:04:28 2017 +0800
Committer: Hongbin Ma <ma...@kyligence.io>
Committed: Fri Jun 23 21:26:05 2017 +0800

----------------------------------------------------------------------
 .../src/main/java/org/apache/kylin/rest/request/SQLRequest.java  | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/kylin/blob/ba7bfd61/server-base/src/main/java/org/apache/kylin/rest/request/SQLRequest.java
----------------------------------------------------------------------
diff --git a/server-base/src/main/java/org/apache/kylin/rest/request/SQLRequest.java b/server-base/src/main/java/org/apache/kylin/rest/request/SQLRequest.java
index 4b3d9c8..54900ba 100644
--- a/server-base/src/main/java/org/apache/kylin/rest/request/SQLRequest.java
+++ b/server-base/src/main/java/org/apache/kylin/rest/request/SQLRequest.java
@@ -68,7 +68,7 @@ public class SQLRequest implements Serializable {
     }
 
     public Integer getOffset() {
-        return offset;
+        return offset == null ? 0 : offset;
     }
 
     public void setOffset(Integer offset) {
@@ -76,7 +76,7 @@ public class SQLRequest implements Serializable {
     }
 
     public Integer getLimit() {
-        return limit;
+        return limit == null ? 0 : limit;
     }
 
     public void setLimit(Integer limit) {