Adjusting based on comments.

This commit is contained in:
Chris Earle 2016-03-01 14:15:56 -05:00
parent 8fa0d8e905
commit ea2792e278
1 changed files with 3 additions and 6 deletions

View File

@ -46,11 +46,8 @@ public abstract class AbstractLifecycleRunnable extends AbstractRunnable {
* @throws NullPointerException if any parameter is {@code null}
*/
public AbstractLifecycleRunnable(Lifecycle lifecycle, ESLogger logger) {
Objects.requireNonNull(lifecycle, "lifecycle must not be null");
Objects.requireNonNull(logger, "logger must not be null");
this.lifecycle = lifecycle;
this.logger = logger;
this.lifecycle = Objects.requireNonNull(lifecycle, "lifecycle must not be null");
this.logger = Objects.requireNonNull(logger, "logger must not be null");
}
/**
@ -63,7 +60,7 @@ public abstract class AbstractLifecycleRunnable extends AbstractRunnable {
protected final void doRun() throws Exception {
// prevent execution if the service is stopped
if (lifecycle.stoppedOrClosed()) {
logger.trace("service is stopping. exiting");
logger.trace("lifecycle is stopping. exiting");
return;
}