This is an automated email from the ASF dual-hosted git repository.

technoboy pushed a commit to branch dev
in repository https://gitbox.apache.org/repos/asf/incubator-dolphinscheduler.git


The following commit(s) were added to refs/heads/dev by this push:
     new d91e015  1when queue or queName is null,return info param is null 2 
update queue may NPE
     new 87738af  Merge pull request #1615 from samz406/1227-queue
d91e015 is described below

commit d91e0155c749ad01dc7ffdb8aa2743f7ba1b0b5c
Author: lilin <[email protected]>
AuthorDate: Fri Dec 27 17:35:15 2019 +0800

    1when queue or queName is null,return info param is null
    2 update queue may NPE
---
 .../dolphinscheduler/api/service/QueueService.java     | 18 ++++++++++++++----
 1 file changed, 14 insertions(+), 4 deletions(-)

diff --git 
a/dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/service/QueueService.java
 
b/dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/service/QueueService.java
index f860517..862c895 100644
--- 
a/dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/service/QueueService.java
+++ 
b/dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/service/QueueService.java
@@ -115,12 +115,12 @@ public class QueueService extends BaseService {
         }
 
         if (StringUtils.isEmpty(queue)) {
-            putMsg(result, Status.REQUEST_PARAMS_NOT_VALID_ERROR, queue);
+            putMsg(result, Status.REQUEST_PARAMS_NOT_VALID_ERROR, "queue");
             return result;
         }
 
         if (StringUtils.isEmpty(queueName)) {
-            putMsg(result, Status.REQUEST_PARAMS_NOT_VALID_ERROR, queueName);
+            putMsg(result, Status.REQUEST_PARAMS_NOT_VALID_ERROR, "queueName");
             return result;
         }
 
@@ -163,6 +163,16 @@ public class QueueService extends BaseService {
             return result;
         }
 
+        if (StringUtils.isEmpty(queue)) {
+            putMsg(result, Status.REQUEST_PARAMS_NOT_VALID_ERROR, "queue");
+            return result;
+        }
+
+        if (StringUtils.isEmpty(queueName)) {
+            putMsg(result, Status.REQUEST_PARAMS_NOT_VALID_ERROR, "queueName");
+            return result;
+        }
+
         Queue queueObj = queueMapper.selectById(id);
         if (queueObj == null) {
             putMsg(result, Status.QUEUE_NOT_EXIST, id);
@@ -222,12 +232,12 @@ public class QueueService extends BaseService {
         Result result = new Result();
 
         if (StringUtils.isEmpty(queue)) {
-            putMsg(result, Status.REQUEST_PARAMS_NOT_VALID_ERROR, queue);
+            putMsg(result, Status.REQUEST_PARAMS_NOT_VALID_ERROR, "queue");
             return result;
         }
 
         if (StringUtils.isEmpty(queueName)) {
-            putMsg(result, Status.REQUEST_PARAMS_NOT_VALID_ERROR, queueName);
+            putMsg(result, Status.REQUEST_PARAMS_NOT_VALID_ERROR, "queueName");
             return result;
         }
 

Reply via email to