Skip to content

Commit a576cf1

Browse files
author
Simon MacMullen
committed
Inline, reduce distance from default.
1 parent f3efd25 commit a576cf1

File tree

1 file changed

+2
-9
lines changed

1 file changed

+2
-9
lines changed

src/com/rabbitmq/client/impl/ConsumerWorkService.java

Lines changed: 2 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,8 @@ final class ConsumerWorkService {
3131

3232
public ConsumerWorkService(ExecutorService executor) {
3333
this.privateExecutor = (executor == null);
34-
this.executor = this.executorFrom(executor);
34+
this.executor = (executor == null) ? Executors.newFixedThreadPool(DEFAULT_NUM_THREADS)
35+
: executor;
3536
this.workPool = new WorkPool<Channel, Runnable>();
3637
}
3738

@@ -92,12 +93,4 @@ public void run() {
9293
}
9394
}
9495
}
95-
96-
private ExecutorService executorFrom(ExecutorService executor) {
97-
if (executor == null) {
98-
return Executors.newFixedThreadPool(DEFAULT_NUM_THREADS);
99-
} else {
100-
return executor;
101-
}
102-
}
10396
}

0 commit comments

Comments
 (0)