Skip to content

Commit c8eb471

Browse files
committed
Move wrapping location
1 parent 66aee8e commit c8eb471

File tree

1 file changed

+7
-5
lines changed

1 file changed

+7
-5
lines changed

operator/src/main/java/oracle/kubernetes/operator/helpers/ClientPool.java

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -29,10 +29,7 @@ public class ClientPool extends Pool<ApiClient> {
2929
private static final ClientFactory FACTORY = new DefaultClientFactory();
3030

3131
public static void initialize(ThreadFactory threadFactory) {
32-
ClientPool.threadFactory =
33-
(r) -> {
34-
return threadFactory.newThread(wrapRunnable(r));
35-
};
32+
ClientPool.threadFactory = threadFactory;
3633
}
3734

3835
private static Runnable wrapRunnable(Runnable r) {
@@ -108,7 +105,12 @@ public ApiClient get() {
108105
60,
109106
TimeUnit.SECONDS,
110107
new SynchronousQueue<Runnable>(),
111-
threadFactory);
108+
threadFactory) {
109+
@Override
110+
public void execute(Runnable command) {
111+
wrapRunnable(command);
112+
}
113+
};
112114
client.getHttpClient().setDispatcher(new Dispatcher(exec));
113115
}
114116

0 commit comments

Comments
 (0)