--- miscJava/CircuitBreaker/src/main/java/dk/thoerup/circuitbreaker/CircuitBreaker.java 2017/12/28 09:36:34 3214 +++ miscJava/CircuitBreaker/src/main/java/dk/thoerup/circuitbreaker/CircuitBreaker.java 2017/12/28 13:20:04 3215 @@ -116,7 +116,7 @@ private void commonTripBreaker(Event event) { synchronized(this) { - if (currentState != open) { // TODO:Is this conditional necessary ?? + if (currentState != open) { open.trip(); currentState = open; @@ -128,7 +128,7 @@ public void attemptReset() { synchronized(this) { - if (currentState != halfOpen) { // TODO:Is this conditional necessary ?? + if (currentState != halfOpen) { currentState = halfOpen; notifier.sendNotification(this, Event.BreakerAttemptReset); stats.addStatistics(Event.BreakerAttemptReset); @@ -139,7 +139,7 @@ public void reset() { synchronized(this) { - if (currentState != closed) { // TODO: Is this conditional necessary ?? + if (currentState != closed) { internalReset(); notifier.sendNotification(this, Event.BreakerReset); stats.addStatistics(Event.BreakerReset);