Skip to content

Commit

Permalink
[cbus] fix exception from threadpool at startup (#11846)
Browse files Browse the repository at this point in the history
* update to use executorservice to fix crash caused by change in underlying threadpool implementation

* Remove explicit cast

Signed-off-by: John Harvey <john.p.harvey@btinternet.com>
  • Loading branch information
jpharvey authored Jan 2, 2022
1 parent e8df66f commit 8eda555
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@

import java.util.HashMap;
import java.util.Map;
import java.util.concurrent.ThreadPoolExecutor;
import java.util.concurrent.ExecutorService;

import org.eclipse.jdt.annotation.NonNullByDefault;
import org.eclipse.jdt.annotation.Nullable;
Expand Down Expand Up @@ -45,10 +45,10 @@ protected synchronized CGateThreadPoolExecutor CreateExecutor(@Nullable String n
}

public class CBusThreadPoolExecutor extends CGateThreadPoolExecutor {
private final ThreadPoolExecutor threadPool;
private final ExecutorService threadPool;

public CBusThreadPoolExecutor(@Nullable String poolName) {
threadPool = (ThreadPoolExecutor) ThreadPoolManager.getPool("binding.cbus-" + poolName);
threadPool = ThreadPoolManager.getPool("binding.cbus-" + poolName);
}

@Override
Expand Down

0 comments on commit 8eda555

Please sign in to comment.