You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@logging.apache.org by gg...@apache.org on 2016/09/06 06:56:40 UTC

logging-log4j2 git commit: Bullet-proofing.

Repository: logging-log4j2
Updated Branches:
  refs/heads/master 9ba97f2fb -> 7e7f53e96


Bullet-proofing.

Project: http://git-wip-us.apache.org/repos/asf/logging-log4j2/repo
Commit: http://git-wip-us.apache.org/repos/asf/logging-log4j2/commit/7e7f53e9
Tree: http://git-wip-us.apache.org/repos/asf/logging-log4j2/tree/7e7f53e9
Diff: http://git-wip-us.apache.org/repos/asf/logging-log4j2/diff/7e7f53e9

Branch: refs/heads/master
Commit: 7e7f53e96c54ab9db3d0889e33ad70116d25858f
Parents: 9ba97f2
Author: Gary Gregory <gg...@apache.org>
Authored: Tue Sep 6 02:56:37 2016 -0400
Committer: Gary Gregory <gg...@apache.org>
Committed: Tue Sep 6 02:56:37 2016 -0400

----------------------------------------------------------------------
 .../java/org/apache/logging/log4j/core/util/ExecutorServices.java  | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/logging-log4j2/blob/7e7f53e9/log4j-core/src/main/java/org/apache/logging/log4j/core/util/ExecutorServices.java
----------------------------------------------------------------------
diff --git a/log4j-core/src/main/java/org/apache/logging/log4j/core/util/ExecutorServices.java b/log4j-core/src/main/java/org/apache/logging/log4j/core/util/ExecutorServices.java
index efd7ed1..6b75a83 100644
--- a/log4j-core/src/main/java/org/apache/logging/log4j/core/util/ExecutorServices.java
+++ b/log4j-core/src/main/java/org/apache/logging/log4j/core/util/ExecutorServices.java
@@ -45,7 +45,7 @@ public class ExecutorServices {
      *         termination.
      */
     public static boolean shutdown(ExecutorService executorService, long timeout, TimeUnit timeUnit, String source) {
-        if (executorService.isTerminated()) {
+        if (executorService == null || executorService.isTerminated()) {
             return true;
         }
         executorService.shutdown(); // Disable new tasks from being submitted