mirror of
https://github.com/openhab/openhab-addons.git
synced 2025-01-10 15:11:59 +01:00
[cbus] fix exception from threadpool at startup (#11846)
* 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>
This commit is contained in:
parent
e8df66f1d0
commit
8eda5551d1
@ -14,7 +14,7 @@ package org.openhab.binding.cbus.internal;
|
||||
|
||||
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;
|
||||
@ -45,10 +45,10 @@ public class CBusThreadPool extends CGateThreadPool {
|
||||
}
|
||||
|
||||
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
|
||||
|
Loading…
Reference in New Issue
Block a user