cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ilgro...@apache.org
Subject [2/2] cxf git commit: [CXF-6845] Partially reverting the change in MessageUtils#isOutbound due to test failures
Date Mon, 04 Apr 2016 10:58:24 GMT
[CXF-6845] Partially reverting the change in MessageUtils#isOutbound due to test failures


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

Branch: refs/heads/3.0.x-fixes
Commit: b20a66cc33837ad52535cf11778dd3f81825dc84
Parents: ff8b78e
Author: Francesco Chicchiriccò <ilgrosso@apache.org>
Authored: Mon Apr 4 12:58:09 2016 +0200
Committer: Francesco Chicchiriccò <ilgrosso@apache.org>
Committed: Mon Apr 4 12:58:09 2016 +0200

----------------------------------------------------------------------
 .../main/java/org/apache/cxf/message/MessageUtils.java   | 11 +++++++----
 1 file changed, 7 insertions(+), 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cxf/blob/b20a66cc/core/src/main/java/org/apache/cxf/message/MessageUtils.java
----------------------------------------------------------------------
diff --git a/core/src/main/java/org/apache/cxf/message/MessageUtils.java b/core/src/main/java/org/apache/cxf/message/MessageUtils.java
index b7f8137..5bcfe23 100644
--- a/core/src/main/java/org/apache/cxf/message/MessageUtils.java
+++ b/core/src/main/java/org/apache/cxf/message/MessageUtils.java
@@ -42,10 +42,13 @@ public final class MessageUtils {
      * @return true if the message direction is outbound
      */
     public static boolean isOutbound(Message message) {
-        return message != null 
-               && message.getExchange() != null
-               && (message == message.getExchange().getOutMessage() 
-                || message == message.getExchange().getOutFaultMessage());
+        if (message == null) {
+            return false;
+        }
+
+        Exchange exchange = message.getExchange();
+        return exchange != null
+               && (message == exchange.getOutMessage() || message == exchange.getOutFaultMessage());
     }
 
     /**


Mime
View raw message