cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From cohei...@apache.org
Subject [2/2] cxf git commit: NullPointerException when using org.apache.cxf.logging.enable and logging interceptors This closes #225
Date Mon, 23 Jan 2017 11:18:08 GMT
NullPointerException when using org.apache.cxf.logging.enable and logging interceptors
This closes #225


Project: http://git-wip-us.apache.org/repos/asf/cxf/repo
Commit: http://git-wip-us.apache.org/repos/asf/cxf/commit/293a340d
Tree: http://git-wip-us.apache.org/repos/asf/cxf/tree/293a340d
Diff: http://git-wip-us.apache.org/repos/asf/cxf/diff/293a340d

Branch: refs/heads/3.0.x-fixes
Commit: 293a340d437fb7806f0e2c3392a1df9caaf1eb87
Parents: 8a43e82
Author: Ingo Weiss <ingo@redhat.com>
Authored: Mon Jan 23 09:53:40 2017 +0000
Committer: Colm O hEigeartaigh <coheigea@apache.org>
Committed: Mon Jan 23 11:18:02 2017 +0000

----------------------------------------------------------------------
 .../main/java/org/apache/cxf/interceptor/LoggingInInterceptor.java | 2 +-
 .../java/org/apache/cxf/interceptor/LoggingOutInterceptor.java     | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cxf/blob/293a340d/core/src/main/java/org/apache/cxf/interceptor/LoggingInInterceptor.java
----------------------------------------------------------------------
diff --git a/core/src/main/java/org/apache/cxf/interceptor/LoggingInInterceptor.java b/core/src/main/java/org/apache/cxf/interceptor/LoggingInInterceptor.java
index fedea47..086b1d9 100644
--- a/core/src/main/java/org/apache/cxf/interceptor/LoggingInInterceptor.java
+++ b/core/src/main/java/org/apache/cxf/interceptor/LoggingInInterceptor.java
@@ -76,7 +76,7 @@ public class LoggingInInterceptor extends AbstractLoggingInterceptor {
     
     public void handleMessage(Message message) throws Fault {
         Logger logger = getMessageLogger(message);
-        if (writer != null || logger.isLoggable(Level.INFO)) {
+        if (logger != null && (writer != null || logger.isLoggable(Level.INFO)))
{
             logging(logger, message);
         }
     }

http://git-wip-us.apache.org/repos/asf/cxf/blob/293a340d/core/src/main/java/org/apache/cxf/interceptor/LoggingOutInterceptor.java
----------------------------------------------------------------------
diff --git a/core/src/main/java/org/apache/cxf/interceptor/LoggingOutInterceptor.java b/core/src/main/java/org/apache/cxf/interceptor/LoggingOutInterceptor.java
index edd4f8a..cf608ce 100644
--- a/core/src/main/java/org/apache/cxf/interceptor/LoggingOutInterceptor.java
+++ b/core/src/main/java/org/apache/cxf/interceptor/LoggingOutInterceptor.java
@@ -68,7 +68,7 @@ public class LoggingOutInterceptor extends AbstractLoggingInterceptor {
             return;
         }
         Logger logger = getMessageLogger(message);
-        if (logger.isLoggable(Level.INFO) || writer != null) {
+        if (logger != null && (logger.isLoggable(Level.INFO) || writer != null))
{
             // Write the output while caching it for the log message
             boolean hasLogged = message.containsKey(LOG_SETUP);
             if (!hasLogged) {


Mime
View raw message