Skip to content

Commit

Permalink
Fixing NPE in during client pool shutdown
Browse files Browse the repository at this point in the history
  • Loading branch information
vinothchandar committed Sep 19, 2013
1 parent ef28f0a commit 0de0e46
Showing 1 changed file with 4 additions and 2 deletions.
Expand Up @@ -349,9 +349,11 @@ public void handleException(Exception e) {
// 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
// this code. Hence, protect against NullPointerExceptions during
// shutdown if async resource requests are queued up.
callback.requestComplete(e, 0);
if (callback != null){
callback.requestComplete(e, 0);
}
} catch(Exception ex) {
if(logger.isEnabledFor(Level.WARN))
logger.warn(ex, ex);
Expand Down

0 comments on commit 0de0e46

Please sign in to comment.