[Improvement-14052][Log] Remove the useless filter in getAppIdsFromLogFile (#14053)

This commit is contained in:
Rick Cheng 2023-05-06 17:00:53 +08:00 committed by GitHub
parent f269ccbd4a
commit 84edea7593
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -164,10 +164,7 @@ public class LogUtils {
}
Set<String> appIds = new HashSet<>();
try (Stream<String> 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();