You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@shardingsphere.apache.org by to...@apache.org on 2023/05/31 06:05:05 UTC

[shardingsphere] branch master updated: Remove unnecessary cast in PipelineJobProgressDetector (#25956)

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

totalo pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/shardingsphere.git


The following commit(s) were added to refs/heads/master by this push:
     new 03279e953ba Remove unnecessary cast in PipelineJobProgressDetector (#25956)
03279e953ba is described below

commit 03279e953ba439ad2d35a3200d2b601875bd3d02
Author: 吴伟杰 <wu...@apache.org>
AuthorDate: Wed May 31 14:04:58 2023 +0800

    Remove unnecessary cast in PipelineJobProgressDetector (#25956)
---
 .../data/pipeline/core/job/progress/PipelineJobProgressDetector.java   | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/kernel/data-pipeline/core/src/main/java/org/apache/shardingsphere/data/pipeline/core/job/progress/PipelineJobProgressDetector.java b/kernel/data-pipeline/core/src/main/java/org/apache/shardingsphere/data/pipeline/core/job/progress/PipelineJobProgressDetector.java
index d018ddf09ed..91331a41063 100644
--- a/kernel/data-pipeline/core/src/main/java/org/apache/shardingsphere/data/pipeline/core/job/progress/PipelineJobProgressDetector.java
+++ b/kernel/data-pipeline/core/src/main/java/org/apache/shardingsphere/data/pipeline/core/job/progress/PipelineJobProgressDetector.java
@@ -21,7 +21,6 @@ import lombok.AccessLevel;
 import lombok.NoArgsConstructor;
 import lombok.extern.slf4j.Slf4j;
 import org.apache.shardingsphere.data.pipeline.api.ingest.position.FinishedPosition;
-import org.apache.shardingsphere.data.pipeline.api.task.progress.InventoryTaskProgress;
 import org.apache.shardingsphere.data.pipeline.core.task.PipelineTask;
 
 import java.util.Collection;
@@ -43,6 +42,6 @@ public final class PipelineJobProgressDetector {
         if (inventoryTasks.isEmpty()) {
             log.warn("inventoryTasks is empty");
         }
-        return inventoryTasks.stream().allMatch(each -> ((InventoryTaskProgress) each.getTaskProgress()).getPosition() instanceof FinishedPosition);
+        return inventoryTasks.stream().allMatch(each -> each.getTaskProgress().getPosition() instanceof FinishedPosition);
     }
 }