diff --git a/dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/controller/BaseController.java b/dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/controller/BaseController.java index 46432569e1..c434398679 100644 --- a/dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/controller/BaseController.java +++ b/dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/controller/BaseController.java @@ -157,8 +157,7 @@ public class BaseController { * @return success result code */ public Result success(String msg, Object list) { - Result result = getResult(msg, list); - return result; + return getResult(msg, list); } /** @@ -168,8 +167,7 @@ public class BaseController { * @return success result code */ public Result success(Object list) { - Result result = getResult(Status.SUCCESS.getMsg(), list); - return result; + return getResult(Status.SUCCESS.getMsg(), list); } /** @@ -181,8 +179,7 @@ public class BaseController { * @return success result code */ public Result success(String msg, Map object) { - Result result = getResult(msg, object); - return result; + return getResult(msg, object); } /** diff --git a/dolphinscheduler-common/src/main/java/org/apache/dolphinscheduler/common/utils/placeholder/BusinessTimeUtils.java b/dolphinscheduler-common/src/main/java/org/apache/dolphinscheduler/common/utils/placeholder/BusinessTimeUtils.java index d6b4e34ce3..23db4b626b 100644 --- a/dolphinscheduler-common/src/main/java/org/apache/dolphinscheduler/common/utils/placeholder/BusinessTimeUtils.java +++ b/dolphinscheduler-common/src/main/java/org/apache/dolphinscheduler/common/utils/placeholder/BusinessTimeUtils.java @@ -33,7 +33,9 @@ import static org.apache.commons.lang.time.DateUtils.addDays; * business time utils */ public class BusinessTimeUtils { - + private BusinessTimeUtils() { + throw new IllegalStateException("BusinessTimeUtils class"); + } /** * get business time in parameters by different command types * diff --git a/dolphinscheduler-common/src/test/java/org/apache/dolphinscheduler/common/queue/BaseTaskQueueTest.java b/dolphinscheduler-common/src/test/java/org/apache/dolphinscheduler/common/queue/BaseTaskQueueTest.java index 0bd4266bb7..433e4fa30f 100644 --- a/dolphinscheduler-common/src/test/java/org/apache/dolphinscheduler/common/queue/BaseTaskQueueTest.java +++ b/dolphinscheduler-common/src/test/java/org/apache/dolphinscheduler/common/queue/BaseTaskQueueTest.java @@ -17,12 +17,12 @@ package org.apache.dolphinscheduler.common.queue; import org.apache.dolphinscheduler.common.zk.ZKServer; -import org.junit.AfterClass; -import org.junit.BeforeClass; +import org.junit.*; /** * base task queue test for only start zk server once */ +@Ignore public class BaseTaskQueueTest { protected static ITaskQueue tasksQueue = null; @@ -40,4 +40,8 @@ public class BaseTaskQueueTest { tasksQueue.delete(); ZKServer.stop(); } + @Test + public void tasksQueueNotNull(){ + Assert.assertNotNull(tasksQueue); + } }