cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From cohei...@apache.org
Subject cxf git commit: NullPointerException when using org.apache.cxf.logging.enable and logging interceptors This closes #225
Date Mon, 23 Jan 2017 10:05:04 GMT
Repository: cxf
Updated Branches:
  refs/heads/master dd81c1eb7 -> 2d3145fe8


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/2d3145fe
Tree: http://git-wip-us.apache.org/repos/asf/cxf/tree/2d3145fe
Diff: http://git-wip-us.apache.org/repos/asf/cxf/diff/2d3145fe

Branch: refs/heads/master
Commit: 2d3145fe8323533e371b11f40888ecc70a424df7
Parents: dd81c1e
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 10:04:59 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/2d3145fe/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 bf524fa..d214f46 100644
--- a/core/src/main/java/org/apache/cxf/interceptor/LoggingInInterceptor.java
+++ b/core/src/main/java/org/apache/cxf/interceptor/LoggingInInterceptor.java
@@ -78,7 +78,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/2d3145fe/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 bd4617a..043aa37 100644
--- a/core/src/main/java/org/apache/cxf/interceptor/LoggingOutInterceptor.java
+++ b/core/src/main/java/org/apache/cxf/interceptor/LoggingOutInterceptor.java
@@ -69,7 +69,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