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 2019/10/05 10:27:59 UTC

[httpcomponents-core] 01/01: Removed deprecated code

This is an automated email from the ASF dual-hosted git repository.

olegk pushed a commit to branch development
in repository https://gitbox.apache.org/repos/asf/httpcomponents-core.git

commit be70135a6dc1b336be953a6141f618bbbf9a592d
Author: Oleg Kalnichevski <ol...@apache.org>
AuthorDate: Sat Oct 5 12:23:28 2019 +0200

    Removed deprecated code
---
 .../core5/http2/impl/nio/bootstrap/H2RequesterBootstrap.java  |  8 --------
 .../hc/core5/http2/impl/nio/bootstrap/H2ServerBootstrap.java  |  8 --------
 .../java/org/apache/hc/core5/benchmark/HttpBenchmark.java     |  5 -----
 .../org/apache/hc/core5/testing/nio/LoggingIOSession.java     |  5 -----
 .../hc/core5/http/impl/bootstrap/AsyncRequesterBootstrap.java |  8 --------
 .../hc/core5/http/impl/bootstrap/AsyncServerBootstrap.java    |  8 --------
 .../apache/hc/core5/http/impl/bootstrap/ServerBootstrap.java  |  8 --------
 .../src/main/java/org/apache/hc/core5/reactor/IOSession.java  | 11 -----------
 .../main/java/org/apache/hc/core5/reactor/IOSessionImpl.java  |  5 -----
 .../java/org/apache/hc/core5/reactor/InternalDataChannel.java |  5 -----
 .../java/org/apache/hc/core5/reactor/ssl/SSLIOSession.java    |  5 -----
 11 files changed, 76 deletions(-)

diff --git a/httpcore5-h2/src/main/java/org/apache/hc/core5/http2/impl/nio/bootstrap/H2RequesterBootstrap.java b/httpcore5-h2/src/main/java/org/apache/hc/core5/http2/impl/nio/bootstrap/H2RequesterBootstrap.java
index c45e677..049ed16 100644
--- a/httpcore5-h2/src/main/java/org/apache/hc/core5/http2/impl/nio/bootstrap/H2RequesterBootstrap.java
+++ b/httpcore5-h2/src/main/java/org/apache/hc/core5/http2/impl/nio/bootstrap/H2RequesterBootstrap.java
@@ -145,14 +145,6 @@ public class H2RequesterBootstrap {
     }
 
     /**
-     * @deprecated Use {@link #setHttp1Config(Http1Config)}
-     */
-    @Deprecated
-    public final H2RequesterBootstrap sethttp1Config(final Http1Config http1Config) {
-        return setHttp1Config(http1Config);
-    }
-
-    /**
      * Sets message char coding.
      */
     public final H2RequesterBootstrap setCharCodingConfig(final CharCodingConfig charCodingConfig) {
diff --git a/httpcore5-h2/src/main/java/org/apache/hc/core5/http2/impl/nio/bootstrap/H2ServerBootstrap.java b/httpcore5-h2/src/main/java/org/apache/hc/core5/http2/impl/nio/bootstrap/H2ServerBootstrap.java
index c37b71b..5d42e29 100644
--- a/httpcore5-h2/src/main/java/org/apache/hc/core5/http2/impl/nio/bootstrap/H2ServerBootstrap.java
+++ b/httpcore5-h2/src/main/java/org/apache/hc/core5/http2/impl/nio/bootstrap/H2ServerBootstrap.java
@@ -160,14 +160,6 @@ public class H2ServerBootstrap {
     }
 
     /**
-     * @deprecated Use {@link #setHttp1Config(Http1Config)}
-     */
-    @Deprecated
-    public final H2ServerBootstrap sethttp1Config(final Http1Config http1Config) {
-        return setHttp1Config(http1Config);
-    }
-
-    /**
      * Sets message char coding.
      */
     public final H2ServerBootstrap setCharset(final CharCodingConfig charCodingConfig) {
diff --git a/httpcore5-testing/src/main/java/org/apache/hc/core5/benchmark/HttpBenchmark.java b/httpcore5-testing/src/main/java/org/apache/hc/core5/benchmark/HttpBenchmark.java
index 9d2c558..03848fb 100644
--- a/httpcore5-testing/src/main/java/org/apache/hc/core5/benchmark/HttpBenchmark.java
+++ b/httpcore5-testing/src/main/java/org/apache/hc/core5/benchmark/HttpBenchmark.java
@@ -273,11 +273,6 @@ public class HttpBenchmark {
                             }
 
                             @Override
-                            public boolean isClosed() {
-                                return ioSession.isClosed();
-                            }
-
-                            @Override
                             public Timeout getSocketTimeout() {
                                 return ioSession.getSocketTimeout();
                             }
diff --git a/httpcore5-testing/src/main/java/org/apache/hc/core5/testing/nio/LoggingIOSession.java b/httpcore5-testing/src/main/java/org/apache/hc/core5/testing/nio/LoggingIOSession.java
index f8e6b83..4ae953d 100644
--- a/httpcore5-testing/src/main/java/org/apache/hc/core5/testing/nio/LoggingIOSession.java
+++ b/httpcore5-testing/src/main/java/org/apache/hc/core5/testing/nio/LoggingIOSession.java
@@ -167,11 +167,6 @@ public class LoggingIOSession implements IOSession {
     }
 
     @Override
-    public boolean isClosed() {
-        return this.session.isClosed();
-    }
-
-    @Override
     public boolean isOpen() {
         return session.isOpen();
     }
diff --git a/httpcore5/src/main/java/org/apache/hc/core5/http/impl/bootstrap/AsyncRequesterBootstrap.java b/httpcore5/src/main/java/org/apache/hc/core5/http/impl/bootstrap/AsyncRequesterBootstrap.java
index 5d031ba..604c9e2 100644
--- a/httpcore5/src/main/java/org/apache/hc/core5/http/impl/bootstrap/AsyncRequesterBootstrap.java
+++ b/httpcore5/src/main/java/org/apache/hc/core5/http/impl/bootstrap/AsyncRequesterBootstrap.java
@@ -102,14 +102,6 @@ public class AsyncRequesterBootstrap {
     }
 
     /**
-     * @deprecated Use {@link #setHttp1Config(Http1Config)}
-     */
-    @Deprecated
-    public final AsyncRequesterBootstrap sethttp1Config(final Http1Config http1Config) {
-        return setHttp1Config(http1Config);
-    }
-
-    /**
      * Sets message char coding.
      */
     public final AsyncRequesterBootstrap setCharCodingConfig(final CharCodingConfig charCodingConfig) {
diff --git a/httpcore5/src/main/java/org/apache/hc/core5/http/impl/bootstrap/AsyncServerBootstrap.java b/httpcore5/src/main/java/org/apache/hc/core5/http/impl/bootstrap/AsyncServerBootstrap.java
index d660b00..33088c5 100644
--- a/httpcore5/src/main/java/org/apache/hc/core5/http/impl/bootstrap/AsyncServerBootstrap.java
+++ b/httpcore5/src/main/java/org/apache/hc/core5/http/impl/bootstrap/AsyncServerBootstrap.java
@@ -125,14 +125,6 @@ public class AsyncServerBootstrap {
     }
 
     /**
-     * @deprecated Use {@link #setHttp1Config(Http1Config)}
-     */
-    @Deprecated
-    public final AsyncServerBootstrap sethttp1Config(final Http1Config http1Config) {
-        return setHttp1Config(http1Config);
-    }
-
-    /**
      * Sets connection configuration.
      */
     public final AsyncServerBootstrap setCharCodingConfig(final CharCodingConfig charCodingConfig) {
diff --git a/httpcore5/src/main/java/org/apache/hc/core5/http/impl/bootstrap/ServerBootstrap.java b/httpcore5/src/main/java/org/apache/hc/core5/http/impl/bootstrap/ServerBootstrap.java
index 2966284..82a90b8 100644
--- a/httpcore5/src/main/java/org/apache/hc/core5/http/impl/bootstrap/ServerBootstrap.java
+++ b/httpcore5/src/main/java/org/apache/hc/core5/http/impl/bootstrap/ServerBootstrap.java
@@ -149,14 +149,6 @@ public class ServerBootstrap {
     }
 
     /**
-     * @deprecated Use {@link #setHttp1Config(Http1Config)}
-     */
-    @Deprecated
-    public final ServerBootstrap sethttp1Config(final Http1Config http1Config) {
-        return setHttp1Config(http1Config);
-    }
-
-    /**
      * Sets connection configuration.
      */
     public final ServerBootstrap setCharCodingConfig(final CharCodingConfig charCodingConfig) {
diff --git a/httpcore5/src/main/java/org/apache/hc/core5/reactor/IOSession.java b/httpcore5/src/main/java/org/apache/hc/core5/reactor/IOSession.java
index f2a09cd..214f4a9 100644
--- a/httpcore5/src/main/java/org/apache/hc/core5/reactor/IOSession.java
+++ b/httpcore5/src/main/java/org/apache/hc/core5/reactor/IOSession.java
@@ -176,17 +176,6 @@ public interface IOSession extends ByteChannel, SocketModalCloseable, Identifiab
     int getStatus();
 
     /**
-     * Determines if the session has been terminated.
-     *
-     * @return {@code true} if the session has been terminated,
-     *   {@code false} otherwise.
-     *
-     * @deprecated Use {@link #isOpen()}
-     */
-    @Deprecated
-    boolean isClosed();
-
-    /**
      * Returns value of the socket timeout in milliseconds. The value of
      * {@code 0} signifies the session cannot time out.
      *
diff --git a/httpcore5/src/main/java/org/apache/hc/core5/reactor/IOSessionImpl.java b/httpcore5/src/main/java/org/apache/hc/core5/reactor/IOSessionImpl.java
index 6cd742a..ac111af 100644
--- a/httpcore5/src/main/java/org/apache/hc/core5/reactor/IOSessionImpl.java
+++ b/httpcore5/src/main/java/org/apache/hc/core5/reactor/IOSessionImpl.java
@@ -236,11 +236,6 @@ class IOSessionImpl implements IOSession {
         return this.status.get();
     }
 
-    @Override
-    public boolean isClosed() {
-        return isStatusClosed() || !this.channel.isOpen();
-    }
-
     private boolean isStatusClosed() {
         return this.status.get() == CLOSED;
     }
diff --git a/httpcore5/src/main/java/org/apache/hc/core5/reactor/InternalDataChannel.java b/httpcore5/src/main/java/org/apache/hc/core5/reactor/InternalDataChannel.java
index 5fa01db..df02971 100644
--- a/httpcore5/src/main/java/org/apache/hc/core5/reactor/InternalDataChannel.java
+++ b/httpcore5/src/main/java/org/apache/hc/core5/reactor/InternalDataChannel.java
@@ -280,11 +280,6 @@ final class InternalDataChannel extends InternalChannel implements ProtocolIOSes
     }
 
     @Override
-    public boolean isClosed() {
-        return getSessionImpl().isClosed();
-    }
-
-    @Override
     public void enqueue(final Command command, final Command.Priority priority) {
         getSessionImpl().enqueue(command, priority);
     }
diff --git a/httpcore5/src/main/java/org/apache/hc/core5/reactor/ssl/SSLIOSession.java b/httpcore5/src/main/java/org/apache/hc/core5/reactor/ssl/SSLIOSession.java
index 883e4d2..29f0920 100644
--- a/httpcore5/src/main/java/org/apache/hc/core5/reactor/ssl/SSLIOSession.java
+++ b/httpcore5/src/main/java/org/apache/hc/core5/reactor/ssl/SSLIOSession.java
@@ -672,11 +672,6 @@ public class SSLIOSession implements IOSession {
     }
 
     @Override
-    public boolean isClosed() {
-        return this.status >= CLOSING || this.session.isClosed();
-    }
-
-    @Override
     public void enqueue(final Command command, final Command.Priority priority) {
         this.session.getLock().lock();
         try {