Skip to content

Commit

Permalink
Merge pull request #196 from hjyun328/develop
Browse files Browse the repository at this point in the history
FIX: May produce NullPointerException when checking that the operatio…
  • Loading branch information
jhpark816 authored Mar 12, 2020
2 parents 55e7cbe + 347d198 commit 01f2377
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
10 changes: 5 additions & 5 deletions src/main/java/net/spy/memcached/ArcusClient.java
Original file line number Diff line number Diff line change
Expand Up @@ -1111,7 +1111,7 @@ public Map<Integer, CollectionOperationStatus> get(long duration,
throw new ExecutionException(op.getException());
}

if (op.isCancelled()) {
if (op != null && op.isCancelled()) {
throw new ExecutionException(new RuntimeException(op.getCancelCause()));
}
}
Expand Down Expand Up @@ -2453,7 +2453,7 @@ public List<SMGetElement<T>> get(long duration, TimeUnit units)
throw new ExecutionException(op.getException());
}

if (op.isCancelled()) {
if (op != null && op.isCancelled()) {
throw new ExecutionException(new RuntimeException(
op.getCancelCause()));
}
Expand Down Expand Up @@ -2711,7 +2711,7 @@ public List<SMGetElement<T>> get(long duration, TimeUnit units)
throw new ExecutionException(op.getException());
}

if (op.isCancelled()) {
if (op != null && op.isCancelled()) {
throw new ExecutionException(new RuntimeException(op.getCancelCause()));
}
}
Expand Down Expand Up @@ -4114,7 +4114,7 @@ public Map<Integer, CollectionOperationStatus> get(long duration,
throw new ExecutionException(op.getException());
}

if (op.isCancelled()) {
if (op != null && op.isCancelled()) {
throw new ExecutionException(new RuntimeException(op.getCancelCause()));
}
}
Expand Down Expand Up @@ -4391,7 +4391,7 @@ public Map<String, CollectionOperationStatus> get(long duration,
throw new ExecutionException(op.getException());
}

if (op.isCancelled()) {
if (op != null && op.isCancelled()) {
throw new ExecutionException(new RuntimeException(op.getCancelCause()));
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ public T get(long duration, TimeUnit units) throws InterruptedException, Timeout
if (op != null && op.hasErrored()) {
throw new ExecutionException(op.getException());
}
if (op.isCancelled()) {
if (op != null && op.isCancelled()) {
throw new ExecutionException(new RuntimeException(op.getCancelCause()));
}
}
Expand Down

0 comments on commit 01f2377

Please sign in to comment.