cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dk...@apache.org
Subject [06/10] cxf git commit: Fix NPE if message is null
Date Tue, 14 Feb 2017 21:26:05 GMT
Fix NPE if message is null


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

Branch: refs/heads/3.1.x-fixes
Commit: 18f06322f8e14ca7e7ffed682851c8448181cd2c
Parents: 02ed401
Author: Daniel Kulp <dkulp@apache.org>
Authored: Thu Feb 9 12:05:39 2017 -0500
Committer: Daniel Kulp <dkulp@apache.org>
Committed: Tue Feb 14 09:53:27 2017 -0500

----------------------------------------------------------------------
 .../org/apache/cxf/ext/logging/event/DefaultLogEventMapper.java    | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cxf/blob/18f06322/rt/features/logging/src/main/java/org/apache/cxf/ext/logging/event/DefaultLogEventMapper.java
----------------------------------------------------------------------
diff --git a/rt/features/logging/src/main/java/org/apache/cxf/ext/logging/event/DefaultLogEventMapper.java
b/rt/features/logging/src/main/java/org/apache/cxf/ext/logging/event/DefaultLogEventMapper.java
index 66082bc..8324dae 100644
--- a/rt/features/logging/src/main/java/org/apache/cxf/ext/logging/event/DefaultLogEventMapper.java
+++ b/rt/features/logging/src/main/java/org/apache/cxf/ext/logging/event/DefaultLogEventMapper.java
@@ -269,7 +269,7 @@ public class DefaultLogEventMapper implements LogEventMapper {
     }
     
     private static String safeGet(Message message, String key) {
-        if (!message.containsKey(key)) {
+        if (message == null || !message.containsKey(key)) {
             return null;
         }
         Object value = message.get(key);


Mime
View raw message