hc-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ol...@apache.org
Subject httpcomponents-client git commit: Removed deprecated code
Date Sun, 01 Oct 2017 09:47:54 GMT
Repository: httpcomponents-client
Updated Branches:
  refs/heads/master f959d44ec -> e2a464084


Removed deprecated code


Project: http://git-wip-us.apache.org/repos/asf/httpcomponents-client/repo
Commit: http://git-wip-us.apache.org/repos/asf/httpcomponents-client/commit/e2a46408
Tree: http://git-wip-us.apache.org/repos/asf/httpcomponents-client/tree/e2a46408
Diff: http://git-wip-us.apache.org/repos/asf/httpcomponents-client/diff/e2a46408

Branch: refs/heads/master
Commit: e2a464084c67ee0ced9de2e2a4395ce4bb17dfa3
Parents: f959d44
Author: Oleg Kalnichevski <olegk@apache.org>
Authored: Sun Oct 1 11:42:51 2017 +0200
Committer: Oleg Kalnichevski <olegk@apache.org>
Committed: Sun Oct 1 11:42:51 2017 +0200

----------------------------------------------------------------------
 .../hc/client5/http/entity/mime/ByteArrayBody.java    |  6 ------
 .../client5/http/entity/mime/ContentDescriptor.java   | 10 ----------
 .../apache/hc/client5/http/entity/mime/FileBody.java  |  5 -----
 .../hc/client5/http/entity/mime/InputStreamBody.java  |  5 -----
 .../org/apache/hc/client5/http/entity/mime/MIME.java  |  8 --------
 .../hc/client5/http/entity/mime/StringBody.java       |  5 -----
 .../http/entity/mime/TestMultipartContentBody.java    | 14 --------------
 7 files changed, 53 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/httpcomponents-client/blob/e2a46408/httpclient5/src/main/java/org/apache/hc/client5/http/entity/mime/ByteArrayBody.java
----------------------------------------------------------------------
diff --git a/httpclient5/src/main/java/org/apache/hc/client5/http/entity/mime/ByteArrayBody.java
b/httpclient5/src/main/java/org/apache/hc/client5/http/entity/mime/ByteArrayBody.java
index f3a56ba..3fdb871 100644
--- a/httpclient5/src/main/java/org/apache/hc/client5/http/entity/mime/ByteArrayBody.java
+++ b/httpclient5/src/main/java/org/apache/hc/client5/http/entity/mime/ByteArrayBody.java
@@ -87,12 +87,6 @@ public class ByteArrayBody extends AbstractContentBody {
     }
 
     @Override
-    @Deprecated
-    public String getTransferEncoding() {
-        return MIME.ENC_BINARY;
-    }
-
-    @Override
     public long getContentLength() {
         return data.length;
     }

http://git-wip-us.apache.org/repos/asf/httpcomponents-client/blob/e2a46408/httpclient5/src/main/java/org/apache/hc/client5/http/entity/mime/ContentDescriptor.java
----------------------------------------------------------------------
diff --git a/httpclient5/src/main/java/org/apache/hc/client5/http/entity/mime/ContentDescriptor.java
b/httpclient5/src/main/java/org/apache/hc/client5/http/entity/mime/ContentDescriptor.java
index cb977ce..720dd37 100644
--- a/httpclient5/src/main/java/org/apache/hc/client5/http/entity/mime/ContentDescriptor.java
+++ b/httpclient5/src/main/java/org/apache/hc/client5/http/entity/mime/ContentDescriptor.java
@@ -73,16 +73,6 @@ public interface ContentDescriptor {
     String getCharset();
 
     /**
-     * Returns the body descriptors transfer encoding.
-     * @return The transfer encoding. Must not be null, but "7bit",
-     *   if no transfer-encoding was specified.
-     *
-     * @deprecated Deprecated per RFC 7578, section 4.7. Do not use
-     */
-    @Deprecated
-    String getTransferEncoding();
-
-    /**
      * Returns the body descriptors content-length.
      * @return Content length, if known, or -1, to indicate the absence of a
      *   content-length header.

http://git-wip-us.apache.org/repos/asf/httpcomponents-client/blob/e2a46408/httpclient5/src/main/java/org/apache/hc/client5/http/entity/mime/FileBody.java
----------------------------------------------------------------------
diff --git a/httpclient5/src/main/java/org/apache/hc/client5/http/entity/mime/FileBody.java
b/httpclient5/src/main/java/org/apache/hc/client5/http/entity/mime/FileBody.java
index 1b359f8..c616f7d 100644
--- a/httpclient5/src/main/java/org/apache/hc/client5/http/entity/mime/FileBody.java
+++ b/httpclient5/src/main/java/org/apache/hc/client5/http/entity/mime/FileBody.java
@@ -87,11 +87,6 @@ public class FileBody extends AbstractContentBody {
     }
 
     @Override
-    public String getTransferEncoding() {
-        return MIME.ENC_BINARY;
-    }
-
-    @Override
     public long getContentLength() {
         return this.file.length();
     }

http://git-wip-us.apache.org/repos/asf/httpcomponents-client/blob/e2a46408/httpclient5/src/main/java/org/apache/hc/client5/http/entity/mime/InputStreamBody.java
----------------------------------------------------------------------
diff --git a/httpclient5/src/main/java/org/apache/hc/client5/http/entity/mime/InputStreamBody.java
b/httpclient5/src/main/java/org/apache/hc/client5/http/entity/mime/InputStreamBody.java
index 202c733..39646f2 100644
--- a/httpclient5/src/main/java/org/apache/hc/client5/http/entity/mime/InputStreamBody.java
+++ b/httpclient5/src/main/java/org/apache/hc/client5/http/entity/mime/InputStreamBody.java
@@ -96,11 +96,6 @@ public class InputStreamBody extends AbstractContentBody {
     }
 
     @Override
-    public String getTransferEncoding() {
-        return MIME.ENC_BINARY;
-    }
-
-    @Override
     public long getContentLength() {
         return this.contentLength;
     }

http://git-wip-us.apache.org/repos/asf/httpcomponents-client/blob/e2a46408/httpclient5/src/main/java/org/apache/hc/client5/http/entity/mime/MIME.java
----------------------------------------------------------------------
diff --git a/httpclient5/src/main/java/org/apache/hc/client5/http/entity/mime/MIME.java b/httpclient5/src/main/java/org/apache/hc/client5/http/entity/mime/MIME.java
index 53e1654..ac6fc1c 100644
--- a/httpclient5/src/main/java/org/apache/hc/client5/http/entity/mime/MIME.java
+++ b/httpclient5/src/main/java/org/apache/hc/client5/http/entity/mime/MIME.java
@@ -34,17 +34,9 @@ package org.apache.hc.client5.http.entity.mime;
 public final class MIME {
 
     public static final String CONTENT_TYPE          = "Content-Type";
-    /**
-     * @deprecated Deprecated per RFC 7578, section 4.7. Do not use
-     */
-    @Deprecated
-    public static final String CONTENT_TRANSFER_ENC  = "Content-Transfer-Encoding";
     public static final String CONTENT_DISPOSITION   = "Content-Disposition";
 
     public static final String FIELD_PARAM_NAME      = "name";
     public static final String FIELD_PARAM_FILENAME  = "filename";
 
-    public static final String ENC_8BIT              = "8bit";
-    public static final String ENC_BINARY            = "binary";
-
 }

http://git-wip-us.apache.org/repos/asf/httpcomponents-client/blob/e2a46408/httpclient5/src/main/java/org/apache/hc/client5/http/entity/mime/StringBody.java
----------------------------------------------------------------------
diff --git a/httpclient5/src/main/java/org/apache/hc/client5/http/entity/mime/StringBody.java
b/httpclient5/src/main/java/org/apache/hc/client5/http/entity/mime/StringBody.java
index 0f1d880..2432951 100644
--- a/httpclient5/src/main/java/org/apache/hc/client5/http/entity/mime/StringBody.java
+++ b/httpclient5/src/main/java/org/apache/hc/client5/http/entity/mime/StringBody.java
@@ -80,11 +80,6 @@ public class StringBody extends AbstractContentBody {
     }
 
     @Override
-    public String getTransferEncoding() {
-        return MIME.ENC_8BIT;
-    }
-
-    @Override
     public long getContentLength() {
         return this.content.length;
     }

http://git-wip-us.apache.org/repos/asf/httpcomponents-client/blob/e2a46408/httpclient5/src/test/java/org/apache/hc/client5/http/entity/mime/TestMultipartContentBody.java
----------------------------------------------------------------------
diff --git a/httpclient5/src/test/java/org/apache/hc/client5/http/entity/mime/TestMultipartContentBody.java
b/httpclient5/src/test/java/org/apache/hc/client5/http/entity/mime/TestMultipartContentBody.java
index 3b426fd..9cc00e8 100644
--- a/httpclient5/src/test/java/org/apache/hc/client5/http/entity/mime/TestMultipartContentBody.java
+++ b/httpclient5/src/test/java/org/apache/hc/client5/http/entity/mime/TestMultipartContentBody.java
@@ -48,8 +48,6 @@ public class TestMultipartContentBody {
         Assert.assertEquals("text", b1.getMediaType());
         Assert.assertEquals("plain", b1.getSubType());
 
-        Assert.assertEquals(MIME.ENC_8BIT, b1.getTransferEncoding());
-
         final StringBody b2 = new StringBody("more text",
                 ContentType.create("text/other", StandardCharsets.ISO_8859_1));
         Assert.assertEquals(9, b2.getContentLength());
@@ -59,18 +57,6 @@ public class TestMultipartContentBody {
         Assert.assertEquals("text/other", b2.getMimeType());
         Assert.assertEquals("text", b2.getMediaType());
         Assert.assertEquals("other", b2.getSubType());
-
-        Assert.assertEquals(MIME.ENC_8BIT, b2.getTransferEncoding());
-    }
-
-    @Test(expected=IllegalArgumentException.class)
-    public void testStringBodyInvalidConstruction1() throws Exception {
-        Assert.assertNotNull(new StringBody(null, ContentType.DEFAULT_TEXT)); // avoid unused
warning
-    }
-
-    @Test(expected=IllegalArgumentException.class)
-    public void testStringBodyInvalidConstruction2() throws Exception {
-        Assert.assertNotNull(new StringBody("stuff", null)); // avoid unused warning
     }
 
     @Test


Mime
View raw message