You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hc.apache.org by ol...@apache.org on 2018/12/01 13:15:16 UTC

httpcomponents-core git commit: Removed methods deprecated in the previous BETA release

Repository: httpcomponents-core
Updated Branches:
  refs/heads/master 5e88e5126 -> 7560895fc


Removed methods deprecated in the previous BETA release


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

Branch: refs/heads/master
Commit: 7560895fcee88272dfe2840021e035ffc64c2596
Parents: 5e88e51
Author: Oleg Kalnichevski <ol...@apache.org>
Authored: Sat Dec 1 14:12:58 2018 +0100
Committer: Oleg Kalnichevski <ol...@apache.org>
Committed: Sat Dec 1 14:12:58 2018 +0100

----------------------------------------------------------------------
 .../apache/hc/core5/http/MessageHeaders.java    | 36 ----------------
 .../http/message/AbstractMessageWrapper.java    | 30 -------------
 .../hc/core5/http/message/HeaderGroup.java      | 44 --------------------
 3 files changed, 110 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/httpcomponents-core/blob/7560895f/httpcore5/src/main/java/org/apache/hc/core5/http/MessageHeaders.java
----------------------------------------------------------------------
diff --git a/httpcore5/src/main/java/org/apache/hc/core5/http/MessageHeaders.java b/httpcore5/src/main/java/org/apache/hc/core5/http/MessageHeaders.java
index bedcbb7..48a16e6 100644
--- a/httpcore5/src/main/java/org/apache/hc/core5/http/MessageHeaders.java
+++ b/httpcore5/src/main/java/org/apache/hc/core5/http/MessageHeaders.java
@@ -50,32 +50,10 @@ public interface MessageHeaders {
      *
      * @param name the header name to check for.
      * @return number of occurrences of the header in the message.
-     * @deprecated Will be removed in the next beta.
-     * @see #countHeaders(String)
-     */
-    @Deprecated
-    int containsHeaders(String name);
-
-    /**
-     * Checks if a certain header is present in this message and how many times.
-     *
-     * @param name the header name to check for.
-     * @return number of occurrences of the header in the message.
      */
     int countHeaders(String name);
 
     /**
-     * Returns all the headers of this message. Headers are orderd in the sequence
-     * they will be sent over a connection.
-     *
-     * @return all the headers of this message
-     * @deprecated Will be removed in the next beta.
-     * @see #getHeaders()
-     */
-    @Deprecated
-    Header[] getAllHeaders();
-
-    /**
      * Returns the first header with a specified name of this message. Header
      * values are ignored. If there is more than one matching header in the
      * message the first element of {@link #getHeaders(String)} is returned.
@@ -130,20 +108,6 @@ public interface MessageHeaders {
     Header getLastHeader(String name);
 
     /**
-     * Gets single first header with the given name.
-     *
-     * <p>Header name comparison is case insensitive.
-     *
-     * @param name the name of the header to get
-     * @return the first header or {@code null}
-     * @throws ProtocolException in case multiple headers with the given name are found.
-     * @deprecated Will be removed in the next beta.
-     * @see #getHeader(String)
-     */
-    @Deprecated
-    Header getSingleHeader(String name) throws ProtocolException;
-
-    /**
      * Returns an iterator of all the headers.
      *
      * @return Iterator that returns Header objects in the sequence they are

http://git-wip-us.apache.org/repos/asf/httpcomponents-core/blob/7560895f/httpcore5/src/main/java/org/apache/hc/core5/http/message/AbstractMessageWrapper.java
----------------------------------------------------------------------
diff --git a/httpcore5/src/main/java/org/apache/hc/core5/http/message/AbstractMessageWrapper.java b/httpcore5/src/main/java/org/apache/hc/core5/http/message/AbstractMessageWrapper.java
index 29d0fa1..16604d8 100644
--- a/httpcore5/src/main/java/org/apache/hc/core5/http/message/AbstractMessageWrapper.java
+++ b/httpcore5/src/main/java/org/apache/hc/core5/http/message/AbstractMessageWrapper.java
@@ -96,16 +96,6 @@ public abstract class AbstractMessageWrapper implements HttpMessage {
         return message.containsHeader(name);
     }
 
-    /**
-     * @deprecated Will be removed in the next beta.
-     * @see #countHeaders(String)
-     */
-    @Deprecated
-    @Override
-    public int containsHeaders(final String name) {
-        return message.containsHeaders(name);
-    }
-
     @Override
     public int countHeaders(final String name) {
         return message.countHeaders(name);
@@ -121,16 +111,6 @@ public abstract class AbstractMessageWrapper implements HttpMessage {
         return message.getHeader(name);
     }
 
-    /**
-     * @deprecated Will be removed in the next beta.
-     * @see #getHeader(String)
-     */
-    @Override
-    @Deprecated
-    public Header getSingleHeader(final String name) throws ProtocolException {
-        return message.getSingleHeader(name);
-    }
-
     @Override
     public Header getFirstHeader(final String name) {
         return message.getFirstHeader(name);
@@ -146,16 +126,6 @@ public abstract class AbstractMessageWrapper implements HttpMessage {
         return message.getHeaders();
     }
 
-    /**
-     * @deprecated Will be removed in the next beta.
-     * @see #getHeaders(String)
-     */
-    @Deprecated
-    @Override
-    public Header[] getAllHeaders() {
-        return message.getAllHeaders();
-    }
-
     @Override
     public Iterator<Header> headerIterator() {
         return message.headerIterator();

http://git-wip-us.apache.org/repos/asf/httpcomponents-core/blob/7560895f/httpcore5/src/main/java/org/apache/hc/core5/http/message/HeaderGroup.java
----------------------------------------------------------------------
diff --git a/httpcore5/src/main/java/org/apache/hc/core5/http/message/HeaderGroup.java b/httpcore5/src/main/java/org/apache/hc/core5/http/message/HeaderGroup.java
index c66483b..9d414b0 100644
--- a/httpcore5/src/main/java/org/apache/hc/core5/http/message/HeaderGroup.java
+++ b/httpcore5/src/main/java/org/apache/hc/core5/http/message/HeaderGroup.java
@@ -269,23 +269,6 @@ public class HeaderGroup implements MessageHeaders, Serializable {
     }
 
     /**
-     * Gets single first header with the given name.
-     *
-     * <p>Header name comparison is case insensitive.
-     *
-     * @param name the name of the header to get
-     * @return the first header or {@code null}
-     * @throws ProtocolException in case multiple headers with the given name are found.
-     * @deprecated Will be removed in the next beta.
-     * @see #getHeader(String)
-     */
-    @Deprecated
-    @Override
-    public Header getSingleHeader(final String name) throws ProtocolException {
-        return getHeader(name);
-    }
-
-    /**
      * Gets the last header with the given name.
      *
      * <p>Header name comparison is case insensitive.
@@ -317,19 +300,6 @@ public class HeaderGroup implements MessageHeaders, Serializable {
     }
 
     /**
-     * Gets all of the headers contained within this group.
-     *
-     * @return an array of length &ge; 0
-     * @deprecated Will be removed in the next beta.
-     * @see #getHeaders()
-     */
-    @Deprecated
-    @Override
-    public Header[] getAllHeaders() {
-        return headers.toArray(new Header[headers.size()]);
-    }
-
-    /**
      * Tests if headers with the given name are contained within this group.
      *
      * <p>Header name comparison is case insensitive.
@@ -352,20 +322,6 @@ public class HeaderGroup implements MessageHeaders, Serializable {
 
     /**
      * Checks if a certain header is present in this message and how many times.
-     *
-     * @param name the header name to check for.
-     * @return number of occurrences of the header in the message.
-     * @deprecated Will be removed in the next beta.
-     * @see #countHeaders(String)
-     */
-    @Override
-    @Deprecated
-    public int containsHeaders(final String name) {
-        return countHeaders(name);
-    }
-
-    /**
-     * Checks if a certain header is present in this message and how many times.
      * <p>Header name comparison is case insensitive.
      *
      * @param name the header name to check for.