diff --git a/dolphinscheduler-task-plugin/dolphinscheduler-task-api/src/main/java/org/apache/dolphinscheduler/plugin/task/api/utils/LogUtils.java b/dolphinscheduler-task-plugin/dolphinscheduler-task-api/src/main/java/org/apache/dolphinscheduler/plugin/task/api/utils/LogUtils.java index de2f8d68a1..b2aee43325 100644 --- a/dolphinscheduler-task-plugin/dolphinscheduler-task-api/src/main/java/org/apache/dolphinscheduler/plugin/task/api/utils/LogUtils.java +++ b/dolphinscheduler-task-plugin/dolphinscheduler-task-api/src/main/java/org/apache/dolphinscheduler/plugin/task/api/utils/LogUtils.java @@ -164,10 +164,7 @@ public class LogUtils { } Set appIds = new HashSet<>(); try (Stream stream = Files.lines(Paths.get(logPath))) { - stream.filter(line -> { - Matcher matcher = APPLICATION_REGEX.matcher(line); - return matcher.find(); - }).forEach(line -> { + stream.forEach(line -> { Matcher matcher = APPLICATION_REGEX.matcher(line); if (matcher.find()) { String appId = matcher.group();