Return-Path: X-Original-To: apmail-cxf-commits-archive@www.apache.org Delivered-To: apmail-cxf-commits-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 4A85818275 for ; Fri, 15 Jan 2016 10:15:58 +0000 (UTC) Received: (qmail 17521 invoked by uid 500); 15 Jan 2016 10:15:58 -0000 Delivered-To: apmail-cxf-commits-archive@cxf.apache.org Received: (qmail 17464 invoked by uid 500); 15 Jan 2016 10:15:58 -0000 Mailing-List: contact commits-help@cxf.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@cxf.apache.org Delivered-To: mailing list commits@cxf.apache.org Received: (qmail 17455 invoked by uid 99); 15 Jan 2016 10:15:58 -0000 Received: from git1-us-west.apache.org (HELO git1-us-west.apache.org) (140.211.11.23) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 15 Jan 2016 10:15:58 +0000 Received: by git1-us-west.apache.org (ASF Mail Server at git1-us-west.apache.org, from userid 33) id DF5DCE042F; Fri, 15 Jan 2016 10:15:57 +0000 (UTC) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: sergeyb@apache.org To: commits@cxf.apache.org Message-Id: X-Mailer: ASF-Git Admin Mailer Subject: cxf git commit: [CXF-6721] Preventing NPE Date: Fri, 15 Jan 2016 10:15:57 +0000 (UTC) Repository: cxf Updated Branches: refs/heads/3.1.x-fixes b0035ade0 -> 8c7a97734 [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/8c7a9773 Tree: http://git-wip-us.apache.org/repos/asf/cxf/tree/8c7a9773 Diff: http://git-wip-us.apache.org/repos/asf/cxf/diff/8c7a9773 Branch: refs/heads/3.1.x-fixes Commit: 8c7a97734fd3db3423bf359d4fdb44305ef45cc4 Parents: b0035ad Author: Sergey Beryozkin Authored: Fri Jan 15 10:14:30 2016 +0000 Committer: Sergey Beryozkin Committed: Fri Jan 15 10:15: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/8c7a9773/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) {