cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From serg...@apache.org
Subject cxf git commit: [CXF-6721] Preventing NPE
Date Fri, 15 Jan 2016 10:14:50 GMT
Repository: cxf
Updated Branches:
  refs/heads/master f0d6854a8 -> 26aec8750


[CXF-6721] Preventing NPE


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

Branch: refs/heads/master
Commit: 26aec8750ada9e05d829efbc3e3bba8991710998
Parents: f0d6854
Author: Sergey Beryozkin <sberyozkin@gmail.com>
Authored: Fri Jan 15 10:14:30 2016 +0000
Committer: Sergey Beryozkin <sberyozkin@gmail.com>
Committed: Fri Jan 15 10:14:30 2016 +0000

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


http://git-wip-us.apache.org/repos/asf/cxf/blob/26aec875/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 a9fe043..17a07bf 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
@@ -191,7 +191,8 @@ public class DefaultLogEventMapper implements LogEventMapper {
     private String getMessageId(Message message) {
         AddressingProperties addrProp = ContextUtils.retrieveMAPs(message, false,
                                                                   MessageUtils.isOutbound(message),
false);
-        return (addrProp != null) ? addrProp.getMessageID().getValue() : UUID.randomUUID().toString();
+        return addrProp != null && addrProp.getMessageID() != null
+            ? addrProp.getMessageID().getValue() : UUID.randomUUID().toString();
     }
 
     private String getOperationName(Message message) {


Mime
View raw message