Skip to content

Commit 7e37be1

Browse files
committed
refactor: use final var instead of reassigning var 🥧
1 parent 766e033 commit 7e37be1

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

cffu-core/src/main/java/io/foldright/cffu/CffuFactoryBuilder.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -87,15 +87,15 @@ static CffuFactory withDefaultExecutor(CffuFactory fac, Executor defaultExecutor
8787
return new CffuFactory(makeExecutor(defaultExecutor), fac.forbidObtrudeMethods());
8888
}
8989

90-
private static Executor makeExecutor(Executor defaultExecutor) {
90+
private static Executor makeExecutor(final Executor defaultExecutor) {
9191
// check CffuMadeExecutor interface to avoid re-wrapping.
9292
if (defaultExecutor instanceof CffuMadeExecutor) return defaultExecutor;
93-
9493
requireNonNull(defaultExecutor, "defaultExecutor is null");
94+
9595
// because wraps the input executor below, MUST call `screenExecutor` translation beforehand;
9696
// otherwise the sequent operations can NOT recognize the input executor.
97-
defaultExecutor = LLCF.screenExecutor(defaultExecutor);
98-
Executor wrapByProviders = wrapExecutorByProviders(defaultExecutor);
97+
final Executor screenExecutor = LLCF.screenExecutor(defaultExecutor);
98+
final Executor wrapByProviders = wrapExecutorByProviders(screenExecutor);
9999
return wrapMadeInterface(wrapByProviders);
100100
}
101101

0 commit comments

Comments
 (0)