Skip to content

Commit

Permalink
Added comment to explain why NPEs can end up in the log during shutdo…
Browse files Browse the repository at this point in the history
…wn if there async requests are queued up.
  • Loading branch information
jayjwylie committed Oct 11, 2012
1 parent a34e62a commit 79d9163
Showing 1 changed file with 5 additions and 0 deletions.
Expand Up @@ -317,6 +317,11 @@ public void handleException(Exception e) {
e = new UnreachableStoreException("Failure in " + operationName + ": "
+ e.getMessage(), e);
try {
// Because PerformParallel(Put||Delete|GetAll)Requests define
// 'callback' via an anonymous class, callback can be null if
// the client factory closes down and some other thread invokes
// this code. This can cause NullPointerExceptions during
// shutdown if async resource requests are queued up.
callback.requestComplete(e, 0);
} catch(Exception ex) {
if(logger.isEnabledFor(Level.WARN))
Expand Down

0 comments on commit 79d9163

Please sign in to comment.