This is an automated email from the ASF dual-hosted git repository.
chufenggao pushed a commit to branch dev
in repository https://gitbox.apache.org/repos/asf/dolphinscheduler.git
The following commit(s) were added to refs/heads/dev by this push:
new 0eef2e3e10 [Improvement][Style] Fix code style of ProcessScheduleTask
and ProcessServiceImpl (#12447)
0eef2e3e10 is described below
commit 0eef2e3e10ca8d20d8a0ad59b0f0674f90ee321c
Author: Yann Ann <[email protected]>
AuthorDate: Thu Oct 20 10:31:16 2022 +0800
[Improvement][Style] Fix code style of ProcessScheduleTask and
ProcessServiceImpl (#12447)
---
.../dolphinscheduler/scheduler/quartz/ProcessScheduleTask.java | 3 ++-
.../apache/dolphinscheduler/service/process/ProcessServiceImpl.java | 6 ++++--
2 files changed, 6 insertions(+), 3 deletions(-)
diff --git
a/dolphinscheduler-scheduler-plugin/dolphinscheduler-scheduler-quartz/src/main/java/org/apache/dolphinscheduler/scheduler/quartz/ProcessScheduleTask.java
b/dolphinscheduler-scheduler-plugin/dolphinscheduler-scheduler-quartz/src/main/java/org/apache/dolphinscheduler/scheduler/quartz/ProcessScheduleTask.java
index f51264d668..31251c108e 100644
---
a/dolphinscheduler-scheduler-plugin/dolphinscheduler-scheduler-quartz/src/main/java/org/apache/dolphinscheduler/scheduler/quartz/ProcessScheduleTask.java
+++
b/dolphinscheduler-scheduler-plugin/dolphinscheduler-scheduler-quartz/src/main/java/org/apache/dolphinscheduler/scheduler/quartz/ProcessScheduleTask.java
@@ -17,7 +17,6 @@
package org.apache.dolphinscheduler.scheduler.quartz;
-import org.apache.commons.lang3.StringUtils;
import org.apache.dolphinscheduler.common.Constants;
import org.apache.dolphinscheduler.common.enums.CommandType;
import org.apache.dolphinscheduler.common.enums.ReleaseState;
@@ -27,6 +26,8 @@ import org.apache.dolphinscheduler.dao.entity.Schedule;
import org.apache.dolphinscheduler.scheduler.quartz.utils.QuartzTaskUtils;
import org.apache.dolphinscheduler.service.process.ProcessService;
+import org.apache.commons.lang3.StringUtils;
+
import java.util.Date;
import org.quartz.JobDataMap;
diff --git
a/dolphinscheduler-service/src/main/java/org/apache/dolphinscheduler/service/process/ProcessServiceImpl.java
b/dolphinscheduler-service/src/main/java/org/apache/dolphinscheduler/service/process/ProcessServiceImpl.java
index 1e75501d5b..c558c64ae0 100644
---
a/dolphinscheduler-service/src/main/java/org/apache/dolphinscheduler/service/process/ProcessServiceImpl.java
+++
b/dolphinscheduler-service/src/main/java/org/apache/dolphinscheduler/service/process/ProcessServiceImpl.java
@@ -32,7 +32,6 @@ import static
org.apache.dolphinscheduler.plugin.task.api.enums.DataType.VARCHAR
import static org.apache.dolphinscheduler.plugin.task.api.enums.Direct.IN;
import static
org.apache.dolphinscheduler.plugin.task.api.utils.DataQualityConstants.TASK_INSTANCE_ID;
-import org.apache.commons.lang3.StringUtils;
import org.apache.dolphinscheduler.common.Constants;
import org.apache.dolphinscheduler.common.enums.AuthorizationType;
import org.apache.dolphinscheduler.common.enums.CommandType;
@@ -138,6 +137,7 @@ import org.apache.dolphinscheduler.service.utils.DagHelper;
import org.apache.dolphinscheduler.spi.enums.ResourceType;
import org.apache.commons.collections.CollectionUtils;
+import org.apache.commons.lang3.StringUtils;
import java.util.ArrayList;
import java.util.Arrays;
@@ -416,7 +416,9 @@ public class ProcessServiceImpl implements ProcessService {
// add command timezone
Schedule schedule =
scheduleMapper.queryByProcessDefinitionCode(command.getProcessDefinitionCode());
if (schedule != null) {
- Map<String, String> commandParams =
StringUtils.isNotBlank(command.getCommandParam()) ?
JSONUtils.toMap(command.getCommandParam()) : new HashMap<>();
+ Map<String, String> commandParams =
+ StringUtils.isNotBlank(command.getCommandParam()) ?
JSONUtils.toMap(command.getCommandParam())
+ : new HashMap<>();
commandParams.put(Constants.SCHEDULE_TIMEZONE,
schedule.getTimezoneId());
command.setCommandParam(JSONUtils.toJsonString(commandParams));
}