From 013707b78675d0b3ef3f98650cc1a846597eb025 Mon Sep 17 00:00:00 2001 From: elandau Date: Fri, 14 Aug 2015 12:21:47 -0700 Subject: [PATCH] Fix bug testing current lifecycle state in LifecycleManager --- .../src/main/java/com/netflix/governator/LifecycleManager.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/governator-core/src/main/java/com/netflix/governator/LifecycleManager.java b/governator-core/src/main/java/com/netflix/governator/LifecycleManager.java index fbec8a3e..d9ccd19c 100644 --- a/governator-core/src/main/java/com/netflix/governator/LifecycleManager.java +++ b/governator-core/src/main/java/com/netflix/governator/LifecycleManager.java @@ -32,7 +32,7 @@ public enum State { public void addListener(LifecycleListener listener) { if (listeners.add(listener)) { LOG.info("Adding LifecycleListener '{}' {}", listener.getClass().getName(), System.identityHashCode(listener)); - if (state.equals(State.Started)) { + if (state.get().equals(State.Started)) { LOG.info("Starting LifecycleListener '{}'", listener.getClass().getName()); listener.onStarted(); }