Permalink
Browse files

Check if op is null before asserting in OperationFuture

On another note, the change Matt put in that added this causes
two other test failures that I didn't have time to fix. I should
have run make test before pushing his change.

Change-Id: I8bc580f3305191521949a28ce70bca0da8b24d2b
Reviewed-on: http://review.couchbase.org/17026
Reviewed-by: Matt Ingenthron <matt@couchbase.com>
Tested-by: Michael Wiederhold <mike@couchbase.com>
  • Loading branch information...
1 parent 3c03623 commit cead32ee3601a166aa5c473ed41d483a8bd88718 @mikewied mikewied committed Jun 11, 2012
Showing with 3 additions and 1 deletion.
  1. +3 −1 src/main/java/net/spy/memcached/internal/OperationFuture.java
@@ -172,7 +172,9 @@ public T get(long duration, TimeUnit units) throws InterruptedException,
"Operation timed out.", op));
}
- assert op.getState() == OperationState.COMPLETE;
+ if (op != null) {
+ assert op.getState() == OperationState.COMPLETE;
+ }
return objRef.get();
}

0 comments on commit cead32e

Please sign in to comment.