You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@dolphinscheduler.apache.org by li...@apache.org on 2020/01/17 13:55:59 UTC

[incubator-dolphinscheduler] branch dev updated: fix return, obj error (#1855)

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

lidongdai 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 16913ba  fix return, obj error (#1855)
16913ba is described below

commit 16913bacd79fbbdc9caa9154e9c9161be0a6ad68
Author: Jave-Chen <ac...@126.com>
AuthorDate: Fri Jan 17 21:55:50 2020 +0800

    fix return, obj error (#1855)
---
 .../dolphinscheduler/api/service/ExecutorService.java     |  4 +++-
 .../dolphinscheduler/common/model/DateInterval.java       | 15 +++++++++------
 2 files changed, 12 insertions(+), 7 deletions(-)

diff --git a/dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/service/ExecutorService.java b/dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/service/ExecutorService.java
index 8fa4c01..3296624 100644
--- a/dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/service/ExecutorService.java
+++ b/dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/service/ExecutorService.java
@@ -550,7 +550,9 @@ public class ExecutorService extends BaseService{
         }else{
             command.setCommandParam(JSONUtils.toJson(cmdParam));
             return processDao.createCommand(command);
-        }  
+        }
+
+        return 0;
     }
 
     /**
diff --git a/dolphinscheduler-common/src/main/java/org/apache/dolphinscheduler/common/model/DateInterval.java b/dolphinscheduler-common/src/main/java/org/apache/dolphinscheduler/common/model/DateInterval.java
index 9dc2f34..4ea764c 100644
--- a/dolphinscheduler-common/src/main/java/org/apache/dolphinscheduler/common/model/DateInterval.java
+++ b/dolphinscheduler-common/src/main/java/org/apache/dolphinscheduler/common/model/DateInterval.java
@@ -35,12 +35,15 @@ public class DateInterval {
 
     @Override
     public boolean equals(Object obj) {
-        if (this == o) return true;
-        if (o == null || getClass() != o.getClass()) return false;
-        DateInterval that = (DateInterval) o;
-        return startTime.equals(that.startTime) &&
-                endTime.equals(that.endTime);
-        
+        if (obj == null || getClass() != obj.getClass()) {
+            return false;
+        } else if (this == obj) {
+            return true;
+        } else {
+            DateInterval that = (DateInterval) obj;
+            return startTime.equals(that.startTime) &&
+                    endTime.equals(that.endTime);
+        }
     }
 
     public Date getStartTime() {