It looks like SearchExecutor passes a null reference instead of a newly created ExecutorService object:
...
} else if(getNumberOfThreads() > 1) {
executorService = Executors.newFixedThreadPool(getNumberOfThreads());
problem = new DistributedProblem(problem, getExecutorService());
}
...
It should instead read:
problem = new DistributedProblem(problem, executorService);
In the context, executorService refers to a local variable. It does not refer to the (private) field executorService from the superclass whose value can be accessed using getExecutorService(). Hence, calling getExecutorService() does not return the newly created executorService, but instead null.
It looks like SearchExecutor passes a null reference instead of a newly created ExecutorService object:
It should instead read:
In the context,
executorService
refers to a local variable. It does not refer to the (private) fieldexecutorService
from the superclass whose value can be accessed usinggetExecutorService()
. Hence, callinggetExecutorService()
does not return the newly createdexecutorService
, but instead null.