@@ -31,6 +31,9 @@ public static void init(ConfigurationService configuration) {
3131 instance = new ExecutorServiceManager (
3232 new InstrumentedExecutorService (configuration .getExecutorService ()),
3333 configuration .getTerminationTimeoutSeconds ());
34+ log .debug ("Initialized ExecutorServiceManager executor: {}, timeout: {}" ,
35+ configuration .getExecutorService ().getClass (),
36+ configuration .getTerminationTimeoutSeconds ());
3437 } else {
3538 log .debug ("Already started, reusing already setup instance!" );
3639 }
@@ -47,6 +50,7 @@ public static void stop() {
4750
4851 public static void useTestInstance () {
4952 if (instance == null ) {
53+ log .debug ("Using test instance" );
5054 instance = new ExecutorServiceManager (
5155 new InstrumentedExecutorService (Executors .newFixedThreadPool (5 )), 1 );
5256 }
@@ -55,7 +59,7 @@ public static void useTestInstance() {
5559 public static ExecutorServiceManager instance () {
5660 if (instance == null ) {
5761 throw new IllegalStateException (
58- "ExecutorServiceManager hasn't been started. Call start method before using!" );
62+ "ExecutorServiceManager hasn't been started. Call init method before using!" );
5963 }
6064 return instance ;
6165 }
@@ -81,6 +85,9 @@ private static class InstrumentedExecutorService implements ExecutorService {
8185 private final ExecutorService executor ;
8286
8387 private InstrumentedExecutorService (ExecutorService executor ) {
88+ if (executor == null ) {
89+ throw new NullPointerException ();
90+ }
8491 this .executor = executor ;
8592 debug = Utils .debugThreadPool ();
8693 }
0 commit comments