Fix NPE in toString().
@@ -259,6 +259,7 @@ public class ConfigurationScheduler extends AbstractLifeCycle {
final StringBuilder sb = new StringBuilder("ConfigurationScheduler [name=");
sb.append(name);
sb.append(", [");
+ if (executorService != null) {
final Queue<Runnable> queue = ((ScheduledThreadPoolExecutor) executorService).getQueue();
boolean first = true;
for (final Runnable runnable : queue) {
@@ -268,6 +269,7 @@ public class ConfigurationScheduler extends AbstractLifeCycle {
sb.append(runnable.toString());
first = false;
}
+ }
sb.append("]");
return sb.toString();
}
