github-advanced-security[bot] commented on code in PR #15278:
URL:
https://github.com/apache/dolphinscheduler/pull/15278#discussion_r1414939325
##########
dolphinscheduler-master/src/main/java/org/apache/dolphinscheduler/server/master/runner/execute/PriorityDelayTaskExecuteRunnable.java:
##########
@@ -17,60 +17,55 @@
package org.apache.dolphinscheduler.server.master.runner.execute;
-import static com.google.common.base.Preconditions.checkNotNull;
-
+import org.apache.dolphinscheduler.common.utils.DateUtils;
import org.apache.dolphinscheduler.dao.entity.ProcessInstance;
import org.apache.dolphinscheduler.dao.entity.TaskInstance;
import org.apache.dolphinscheduler.plugin.task.api.TaskExecutionContext;
-import org.jetbrains.annotations.NotNull;
-
-public abstract class PriorityTaskExecuteRunnable implements
TaskExecuteRunnable, Comparable<TaskExecuteRunnable> {
-
- private final ProcessInstance workflowInstance;
- private final TaskInstance taskInstance;
- private final TaskExecutionContext taskExecutionContext;
-
- public PriorityTaskExecuteRunnable(ProcessInstance workflowInstance,
- TaskInstance taskInstance,
- TaskExecutionContext
taskExecutionContext) {
- this.taskInstance = checkNotNull(taskInstance);
- this.workflowInstance = checkNotNull(workflowInstance);
- this.taskExecutionContext = checkNotNull(taskExecutionContext);
- }
+import java.util.concurrent.Delayed;
+import java.util.concurrent.TimeUnit;
- @Override
- public ProcessInstance getWorkflowInstance() {
- return workflowInstance;
- }
+public abstract class PriorityDelayTaskExecuteRunnable extends
BaseTaskExecuteRunnable implements Delayed {
Review Comment:
## Inconsistent compareTo
This class declares [compareTo](1) but inherits equals; the two could be
inconsistent.
[Show more
details](https://github.com/apache/dolphinscheduler/security/code-scanning/3678)
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]