hc-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ol...@apache.org
Subject svn commit: r1666566 - in /httpcomponents/httpclient/trunk/httpmime/src: main/java/org/apache/http/entity/mime/MultipartFormEntity.java test/java/org/apache/http/entity/mime/TestMultipartEntityBuilder.java
Date Fri, 13 Mar 2015 20:20:11 GMT
Author: olegk
Date: Fri Mar 13 20:20:11 2015
New Revision: 1666566

URL: http://svn.apache.org/r1666566
Log:
Fixed deprecation warnings

Modified:
    httpcomponents/httpclient/trunk/httpmime/src/main/java/org/apache/http/entity/mime/MultipartFormEntity.java
    httpcomponents/httpclient/trunk/httpmime/src/test/java/org/apache/http/entity/mime/TestMultipartEntityBuilder.java

Modified: httpcomponents/httpclient/trunk/httpmime/src/main/java/org/apache/http/entity/mime/MultipartFormEntity.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpclient/trunk/httpmime/src/main/java/org/apache/http/entity/mime/MultipartFormEntity.java?rev=1666566&r1=1666565&r2=1666566&view=diff
==============================================================================
--- httpcomponents/httpclient/trunk/httpmime/src/main/java/org/apache/http/entity/mime/MultipartFormEntity.java
(original)
+++ httpcomponents/httpclient/trunk/httpmime/src/main/java/org/apache/http/entity/mime/MultipartFormEntity.java
Fri Mar 13 20:20:11 2015
@@ -37,6 +37,7 @@ import java.io.IOException;
 import java.io.InputStream;
 import java.io.OutputStream;
 
+@SuppressWarnings("deprecation")
 class MultipartFormEntity implements HttpEntity {
 
     private final AbstractMultipartForm multipart;
@@ -88,12 +89,7 @@ class MultipartFormEntity implements Htt
     }
 
     @Override
-    public void consumeContent()
-        throws IOException, UnsupportedOperationException{
-        if (isStreaming()) {
-            throw new UnsupportedOperationException(
-                    "Streaming entity does not implement #consumeContent()");
-        }
+    public void consumeContent() {
     }
 
     @Override

Modified: httpcomponents/httpclient/trunk/httpmime/src/test/java/org/apache/http/entity/mime/TestMultipartEntityBuilder.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpclient/trunk/httpmime/src/test/java/org/apache/http/entity/mime/TestMultipartEntityBuilder.java?rev=1666566&r1=1666565&r2=1666566&view=diff
==============================================================================
--- httpcomponents/httpclient/trunk/httpmime/src/test/java/org/apache/http/entity/mime/TestMultipartEntityBuilder.java
(original)
+++ httpcomponents/httpclient/trunk/httpmime/src/test/java/org/apache/http/entity/mime/TestMultipartEntityBuilder.java
Fri Mar 13 20:20:11 2015
@@ -78,7 +78,7 @@ public class TestMultipartEntityBuilder
     @Test
     public void testMultipartCustomContentType() throws Exception {
         final MultipartFormEntity entity = MultipartEntityBuilder.create()
-                .seContentType(ContentType.APPLICATION_XML)
+                .setContentType(ContentType.APPLICATION_XML)
                 .setBoundary("blah-blah")
                 .setCharset(Consts.UTF_8)
                 .setLaxMode()
@@ -92,7 +92,7 @@ public class TestMultipartEntityBuilder
     @Test
     public void testMultipartContentTypeParameter() throws Exception {
         final MultipartFormEntity entity = MultipartEntityBuilder.create()
-                .seContentType(ContentType.MULTIPART_FORM_DATA.withParameters(
+                .setContentType(ContentType.MULTIPART_FORM_DATA.withParameters(
                         new BasicNameValuePair("boundary", "yada-yada"),
                         new BasicNameValuePair("charset", "ascii")))
                 .buildEntity();
@@ -108,7 +108,7 @@ public class TestMultipartEntityBuilder
     @Test
     public void testMultipartCustomContentTypeParameterOverrides() throws Exception {
         final MultipartFormEntity entity = MultipartEntityBuilder.create()
-                .seContentType(ContentType.MULTIPART_FORM_DATA.withParameters(
+                .setContentType(ContentType.MULTIPART_FORM_DATA.withParameters(
                         new BasicNameValuePair("boundary", "yada-yada"),
                         new BasicNameValuePair("charset", "ascii"),
                         new BasicNameValuePair("my", "stuff")))



Mime
View raw message