From 84b45ae3d08734cb12337ac56809c36339f5c9fd Mon Sep 17 00:00:00 2001 From: keertk Date: Tue, 16 May 2023 09:50:27 +0000 Subject: [PATCH] Automatic code cleanup. (#18417) PiperOrigin-RevId: 488722109 Change-Id: Ia0422938fd88d4260b39b1e3a54a548766c91ef9 Co-authored-by: Googler --- .../devtools/build/lib/cmdline/ParallelVisitorTest.java | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/src/test/java/com/google/devtools/build/lib/cmdline/ParallelVisitorTest.java b/src/test/java/com/google/devtools/build/lib/cmdline/ParallelVisitorTest.java index f14724a3ad3c60..32dfd0f670b3f4 100644 --- a/src/test/java/com/google/devtools/build/lib/cmdline/ParallelVisitorTest.java +++ b/src/test/java/com/google/devtools/build/lib/cmdline/ParallelVisitorTest.java @@ -23,7 +23,6 @@ import com.google.devtools.build.lib.concurrent.ThreadSafety.ThreadSafe; import com.google.devtools.build.lib.testutil.TestThread; import java.util.ArrayList; -import java.util.Optional; import java.util.Set; import java.util.concurrent.CountDownLatch; import java.util.concurrent.Executors; @@ -153,12 +152,7 @@ protected Visit getVisitResult(Iterable values) { synchronized (this) { visits.add(values); } - return new Visit( - values, - Iterables.concat( - Iterables.transform( - values, - v -> Optional.ofNullable(successorMap.get(v)).orElse(ImmutableList.of())))); + return new Visit(values, Iterables.concat(Iterables.transform(values, successorMap::get))); } @Override