cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From serg...@apache.org
Subject svn commit: r1175951 - /cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/provider/FormEncodingProvider.java
Date Mon, 26 Sep 2011 16:52:27 GMT
Author: sergeyb
Date: Mon Sep 26 16:52:27 2011
New Revision: 1175951

URL: http://svn.apache.org/viewvc?rev=1175951&view=rev
Log:
[CXF-3821] Adding an NPE guard to FormEncodingProvider

Modified:
    cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/provider/FormEncodingProvider.java

Modified: cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/provider/FormEncodingProvider.java
URL: http://svn.apache.org/viewvc/cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/provider/FormEncodingProvider.java?rev=1175951&r1=1175950&r2=1175951&view=diff
==============================================================================
--- cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/provider/FormEncodingProvider.java
(original)
+++ cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/provider/FormEncodingProvider.java
Mon Sep 26 16:52:27 2011
@@ -89,6 +89,9 @@ public class FormEncodingProvider implem
         Class<Object> clazz, Type genericType, Annotation[] annotations, MediaType
mt, 
         MultivaluedMap<String, String> headers, InputStream is) 
         throws IOException {
+        if (is == null) {
+            return null;
+        }
         try {
             if (mt.isCompatible(MediaType.MULTIPART_FORM_DATA_TYPE)) {
                 MultipartBody body = AttachmentUtils.getMultipartBody(mc);



Mime
View raw message