cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From serg...@apache.org
Subject svn commit: r923895 - in /cxf/trunk: rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/provider/ systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/
Date Tue, 16 Mar 2010 17:46:05 GMT
Author: sergeyb
Date: Tue Mar 16 17:46:05 2010
New Revision: 923895

URL: http://svn.apache.org/viewvc?rev=923895&view=rev
Log:
Mostly reverting the previous changes

Modified:
    cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/provider/PrimitiveTextProvider.java
    cxf/trunk/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/JAXRSMultipartTest.java
    cxf/trunk/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/MultipartStore.java

Modified: cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/provider/PrimitiveTextProvider.java
URL: http://svn.apache.org/viewvc/cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/provider/PrimitiveTextProvider.java?rev=923895&r1=923894&r2=923895&view=diff
==============================================================================
--- cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/provider/PrimitiveTextProvider.java
(original)
+++ cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/provider/PrimitiveTextProvider.java
Tue Mar 16 17:46:05 2010
@@ -24,7 +24,6 @@ import java.io.OutputStream;
 import java.lang.annotation.Annotation;
 import java.lang.reflect.Type;
 
-import javax.ws.rs.Encoded;
 import javax.ws.rs.core.MediaType;
 import javax.ws.rs.core.MultivaluedMap;
 import javax.ws.rs.ext.MessageBodyReader;
@@ -32,7 +31,6 @@ import javax.ws.rs.ext.MessageBodyWriter
 
 import org.apache.cxf.helpers.IOUtils;
 import org.apache.cxf.jaxrs.model.ParameterType;
-import org.apache.cxf.jaxrs.utils.AnnotationUtils;
 import org.apache.cxf.jaxrs.utils.InjectionUtils;
 
 public class PrimitiveTextProvider 
@@ -49,14 +47,8 @@ public class PrimitiveTextProvider 
     public Object readFrom(Class<Object> type, Type genType, Annotation[] anns, MediaType
mt, 
                            MultivaluedMap<String, String> headers, InputStream is)
throws IOException {
         
-        String value = IOUtils.readStringFromStream(is);
-        if (type.isAssignableFrom(String.class)) {
-            value = InjectionUtils.decodeValue(value, 
-                              AnnotationUtils.getAnnotation(anns, Encoded.class) == null,
-                              ParameterType.REQUEST_BODY);
-        }
         return InjectionUtils.handleParameter(
-                    value, 
+                    IOUtils.readStringFromStream(is), 
                     type,
                     ParameterType.REQUEST_BODY, null);
         

Modified: cxf/trunk/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/JAXRSMultipartTest.java
URL: http://svn.apache.org/viewvc/cxf/trunk/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/JAXRSMultipartTest.java?rev=923895&r1=923894&r2=923895&view=diff
==============================================================================
--- cxf/trunk/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/JAXRSMultipartTest.java
(original)
+++ cxf/trunk/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/JAXRSMultipartTest.java
Tue Mar 16 17:46:05 2010
@@ -155,12 +155,6 @@ public class JAXRSMultipartTest extends 
     }
     
     @Test
-    public void testAddBookFormParam2() throws Exception {
-        String address = "http://localhost:9085/bookstore/books/formparam2";
-        doAddBook("multipart/form-data", address, "attachmentForm", 200);               
-    }
-    
-    @Test
     public void testAddBookFormBody() throws Exception {
         String address = "http://localhost:9085/bookstore/books/formbody";
         doAddBook("multipart/form-data", address, "attachmentForm", 200);               

Modified: cxf/trunk/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/MultipartStore.java
URL: http://svn.apache.org/viewvc/cxf/trunk/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/MultipartStore.java?rev=923895&r1=923894&r2=923895&view=diff
==============================================================================
--- cxf/trunk/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/MultipartStore.java
(original)
+++ cxf/trunk/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/MultipartStore.java
Tue Mar 16 17:46:05 2010
@@ -162,14 +162,6 @@ public class MultipartStore {
     }
     
     @POST
-    @Path("/books/formparam2")
-    @Produces("text/xml")
-    public Response addBookFromFormParam2(@Multipart("name") String title, 
-                                          @Multipart("id") Long id) throws Exception {
-        return addBookFromFormParam(title, id);
-    }
-    
-    @POST
     @Path("/books/formparambean")
     @Produces("text/xml")
     public Response addBookFromFormBean(@FormParam("") Book b) throws Exception {



Mime
View raw message