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 2014/12/05 15:54:02 UTC

logging-log4j2 git commit: Null guard in case something something goes wrong during test init (seeing an NPE now...)

Repository: logging-log4j2
Updated Branches:
  refs/heads/master 42b9976d5 -> 683c91397


Null guard in case something something goes wrong during test init
(seeing an NPE now...)

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

Branch: refs/heads/master
Commit: 683c913973f6e5aefa4221dc0ab382ef6e2ebe7c
Parents: 42b9976
Author: Gary Gregory <ga...@gmail.com>
Authored: Fri Dec 5 09:53:48 2014 -0500
Committer: Gary Gregory <ga...@gmail.com>
Committed: Fri Dec 5 09:53:48 2014 -0500

----------------------------------------------------------------------
 .../logging/log4j/core/appender/AsyncAppenderNoLocationTest.java | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/logging-log4j2/blob/683c9139/log4j-core/src/test/java/org/apache/logging/log4j/core/appender/AsyncAppenderNoLocationTest.java
----------------------------------------------------------------------
diff --git a/log4j-core/src/test/java/org/apache/logging/log4j/core/appender/AsyncAppenderNoLocationTest.java b/log4j-core/src/test/java/org/apache/logging/log4j/core/appender/AsyncAppenderNoLocationTest.java
index 896cdee..cbed499 100644
--- a/log4j-core/src/test/java/org/apache/logging/log4j/core/appender/AsyncAppenderNoLocationTest.java
+++ b/log4j-core/src/test/java/org/apache/logging/log4j/core/appender/AsyncAppenderNoLocationTest.java
@@ -45,7 +45,9 @@ public class AsyncAppenderNoLocationTest {
 
     @After
     public void after() {
-        app.clear();
+        if (app != null) {
+            app.clear();
+        }
     }
 
     @Test