cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From serg...@apache.org
Subject svn commit: r1489372 - /cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/ext/MessageContextImpl.java
Date Tue, 04 Jun 2013 10:24:42 GMT
Author: sergeyb
Date: Tue Jun  4 10:24:42 2013
New Revision: 1489372

URL: http://svn.apache.org/r1489372
Log:
[CXF-5053] Updating JAX-RS MessageContext to return Message, to be consistent with CXF JAX-WS
MessageContext, patch from Minto van der Sluis applied

Modified:
    cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/ext/MessageContextImpl.java

Modified: cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/ext/MessageContextImpl.java
URL: http://svn.apache.org/viewvc/cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/ext/MessageContextImpl.java?rev=1489372&r1=1489371&r2=1489372&view=diff
==============================================================================
--- cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/ext/MessageContextImpl.java
(original)
+++ cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/ext/MessageContextImpl.java
Tue Jun  4 10:24:42 2013
@@ -83,10 +83,15 @@ public class MessageContextImpl implemen
             return m.getExchange().getOutMessage().get(Message.ATTACHMENTS);
         }
         Object value = m.get(key);
-        if (value == null && m.getExchange() != null) {
-            Message inMessage = m.getExchange().getInMessage();
-            if (inMessage != null && inMessage != m) {
-                value = inMessage.get(key);
+        if (value == null) {
+            if (Message.class.getName().equals(key)) {
+                return m;
+            }
+            if (m.getExchange() != null) {
+                Message inMessage = m.getExchange().getInMessage();
+                if (inMessage != null && inMessage != m) {
+                    value = inMessage.get(key);
+                }
             }
         } 
         return value;



Mime
View raw message