dcapwell commented on code in PR #2257:
URL: https://github.com/apache/cassandra/pull/2257#discussion_r1154937908


##########
src/java/org/apache/cassandra/service/accord/async/AsyncOperation.java:
##########
@@ -179,7 +179,8 @@ private void finish(R result)
     private void fail(Throwable throwable)
     {
         Invariants.nonNull(throwable);
-        Invariants.checkArgument(state != State.FINISHED && state != 
State.FAILED, "Unexpected state %s", state);
+        if (!(state != State.FINISHED && state != State.FAILED))

Review Comment:
   I pushed the knowledge of complete to the `State` via a `isComplete()` 
method, and switched to `if (state.isComplete())`



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to