}
finally
{
- if (!executor.isShutdown())
+ if (!executor.isTerminated())
{
log.warn("Forcing shutdown of ExecutorService!");
executor
.shutdownNow()
- .forEach(runnable -> log.warn("Unfinished task: {}", runnable.getClass().getSimpleName()));
+ .forEach(runnable -> log.warn("Unprocessed task: {}", runnable.getClass().getSimpleName()));
}
log.info("Shutdow of ExecutorService finished");
}