cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From serg...@apache.org
Subject svn commit: r1458774 - in /cxf/branches/2.7.x-fixes: ./ rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/client/WebClient.java rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/client/spec/ClientRequestContextImpl.java
Date Wed, 20 Mar 2013 11:43:27 GMT
Author: sergeyb
Date: Wed Mar 20 11:43:27 2013
New Revision: 1458774

URL: http://svn.apache.org/r1458774
Log:
Merged revisions 1457863 via svnmerge from 
https://svn.apache.org/repos/asf/cxf/trunk

........
  r1457863 | sergeyb | 2013-03-18 16:59:19 +0000 (Mon, 18 Mar 2013) | 1 line
  
  Minor update to JAX-RS ClientRequestContextImpl
........

Modified:
    cxf/branches/2.7.x-fixes/   (props changed)
    cxf/branches/2.7.x-fixes/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/client/WebClient.java
    cxf/branches/2.7.x-fixes/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/client/spec/ClientRequestContextImpl.java

Propchange: cxf/branches/2.7.x-fixes/
------------------------------------------------------------------------------
  Merged /cxf/trunk:r1457863

Propchange: cxf/branches/2.7.x-fixes/
------------------------------------------------------------------------------
Binary property 'svnmerge-integrated' - no diff available.

Modified: cxf/branches/2.7.x-fixes/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/client/WebClient.java
URL: http://svn.apache.org/viewvc/cxf/branches/2.7.x-fixes/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/client/WebClient.java?rev=1458774&r1=1458773&r2=1458774&view=diff
==============================================================================
--- cxf/branches/2.7.x-fixes/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/client/WebClient.java
(original)
+++ cxf/branches/2.7.x-fixes/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/client/WebClient.java
Wed Mar 20 11:43:27 2013
@@ -1103,6 +1103,11 @@ public class WebClient extends AbstractC
                 requestClass = (Class<?>)requestContext.get(REQUEST_CLASS);
                 requestType = (Type)requestContext.get(REQUEST_TYPE);
             }
+            Annotation[] anns = new Annotation[]{};
+            Annotation[] customAnns = (Annotation[])outMessage.get(Annotation.class.getName());
+            if (customAnns != null) {
+                anns = customAnns;
+            }
             boolean isAssignable = requestClass != null && requestClass.isAssignableFrom(body.getClass());
             try {
                 writeBody(body, outMessage, 

Modified: cxf/branches/2.7.x-fixes/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/client/spec/ClientRequestContextImpl.java
URL: http://svn.apache.org/viewvc/cxf/branches/2.7.x-fixes/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/client/spec/ClientRequestContextImpl.java?rev=1458774&r1=1458773&r2=1458774&view=diff
==============================================================================
--- cxf/branches/2.7.x-fixes/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/client/spec/ClientRequestContextImpl.java
(original)
+++ cxf/branches/2.7.x-fixes/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/client/spec/ClientRequestContextImpl.java
Wed Mar 20 11:43:27 2013
@@ -69,8 +69,8 @@ public class ClientRequestContextImpl ex
 
     @Override
     public Annotation[] getEntityAnnotations() {
-        // TODO Auto-generated method stub
-        return null;
+        Annotation[] anns = (Annotation[])m.get(Annotation.class.getName());
+        return anns == null ? new Annotation[] {} : anns;
     }
 
     @Override
@@ -103,6 +103,9 @@ public class ClientRequestContextImpl ex
             headers.putSingle(HttpHeaders.CONTENT_TYPE, mt);
             m.put(Message.CONTENT_TYPE, mt.toString());
         }
+        if (anns != null) {
+            m.put(Annotation.class.getName(), anns);
+        }
         m.put(List.class, entity == null ? new MessageContentsList() : new MessageContentsList(entity));
     }
 



Mime
View raw message