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

journey 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 6d4a341  modify saveWorkerGroup may NPE (#1629)
6d4a341 is described below

commit 6d4a3410c86feed171063b760aa4b504662c75a2
Author: samz406 <[email protected]>
AuthorDate: Mon Dec 30 10:31:35 2019 +0800

    modify saveWorkerGroup may NPE (#1629)
    
    * User update  not check params
    
    * user phone update when noteEmpty
    
    * modify saveWorkerGroup may NPE
---
 .../org/apache/dolphinscheduler/api/service/WorkerGroupService.java  | 5 +++++
 1 file changed, 5 insertions(+)

diff --git 
a/dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/service/WorkerGroupService.java
 
b/dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/service/WorkerGroupService.java
index 925d01b..2d0743a 100644
--- 
a/dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/service/WorkerGroupService.java
+++ 
b/dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/service/WorkerGroupService.java
@@ -76,6 +76,11 @@ public class WorkerGroupService extends BaseService {
         WorkerGroup workerGroup = null;
         if(id != 0){
             workerGroup = workerGroupMapper.selectById(id);
+            //check exist
+            if (workerGroup == null){
+                workerGroup = new WorkerGroup();
+                workerGroup.setCreateTime(now);
+            }
         }else{
             workerGroup = new WorkerGroup();
             workerGroup.setCreateTime(now);

Reply via email to