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 EF37A176CE for ; Thu, 30 Apr 2015 09:49:19 +0000 (UTC) Received: (qmail 35352 invoked by uid 500); 30 Apr 2015 09:49:18 -0000 Delivered-To: apmail-cxf-commits-archive@cxf.apache.org Received: (qmail 35298 invoked by uid 500); 30 Apr 2015 09:49:18 -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 35289 invoked by uid 99); 30 Apr 2015 09:49:18 -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; Thu, 30 Apr 2015 09:49:18 +0000 Received: by git1-us-west.apache.org (ASF Mail Server at git1-us-west.apache.org, from userid 33) id E5CE1E0061; Thu, 30 Apr 2015 09:49:17 +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: <434782d531d04d7684e67b6ec168227b@git.apache.org> X-Mailer: ASF-Git Admin Mailer Subject: cxf git commit: Preventing an unexpected NPE in AbstractHttpDestination in the MTOM test Date: Thu, 30 Apr 2015 09:49:17 +0000 (UTC) Repository: cxf Updated Branches: refs/heads/3.0.x-fixes e2b40f680 -> fa6d04a44 Preventing an unexpected NPE in AbstractHttpDestination in the MTOM test Project: http://git-wip-us.apache.org/repos/asf/cxf/repo Commit: http://git-wip-us.apache.org/repos/asf/cxf/commit/fa6d04a4 Tree: http://git-wip-us.apache.org/repos/asf/cxf/tree/fa6d04a4 Diff: http://git-wip-us.apache.org/repos/asf/cxf/diff/fa6d04a4 Branch: refs/heads/3.0.x-fixes Commit: fa6d04a44b35dd8982b873bc01822c0332f72555 Parents: e2b40f6 Author: Sergey Beryozkin Authored: Thu Apr 30 10:48:06 2015 +0100 Committer: Sergey Beryozkin Committed: Thu Apr 30 10:48:44 2015 +0100 ---------------------------------------------------------------------- .../org/apache/cxf/transport/http/AbstractHTTPDestination.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/cxf/blob/fa6d04a4/rt/transports/http/src/main/java/org/apache/cxf/transport/http/AbstractHTTPDestination.java ---------------------------------------------------------------------- diff --git a/rt/transports/http/src/main/java/org/apache/cxf/transport/http/AbstractHTTPDestination.java b/rt/transports/http/src/main/java/org/apache/cxf/transport/http/AbstractHTTPDestination.java index d994634..5983e42 100644 --- a/rt/transports/http/src/main/java/org/apache/cxf/transport/http/AbstractHTTPDestination.java +++ b/rt/transports/http/src/main/java/org/apache/cxf/transport/http/AbstractHTTPDestination.java @@ -685,7 +685,9 @@ public abstract class AbstractHTTPDestination } private boolean isResponseRedirected(Message outMessage) { - return Boolean.TRUE.equals(outMessage.getExchange().get(REQUEST_REDIRECTED)); + Exchange exchange = outMessage.getExchange(); + return exchange != null + && Boolean.TRUE.equals(exchange.get(REQUEST_REDIRECTED)); } /**