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/08/30 09:43:15 UTC

httpcomponents-client git commit: Removed duplicate class (no functional changes)

Repository: httpcomponents-client
Updated Branches:
  refs/heads/master 1614c2516 -> cbe00beb5


Removed duplicate class (no functional changes)


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

Branch: refs/heads/master
Commit: cbe00beb5665e402df5d66c7b49994279e4690ed
Parents: 1614c25
Author: Oleg Kalnichevski <ol...@apache.org>
Authored: Thu Aug 30 11:36:46 2018 +0200
Committer: Oleg Kalnichevski <ol...@apache.org>
Committed: Thu Aug 30 11:36:46 2018 +0200

----------------------------------------------------------------------
 .../http/impl/cache/ConsumableInputStream.java  |  2 +-
 .../impl/HttpProxyConfigurationActivator.java   |  2 +-
 .../testing/sync/LocalServerTestBase.java       |  2 +-
 .../http/impl/async/MinimalHttpAsyncClient.java |  2 +-
 .../socket/PlainConnectionSocketFactory.java    |  2 +-
 .../http/ssl/SSLConnectionSocketFactory.java    |  2 +-
 .../apache/hc/client5/http/utils/Closer.java    | 53 --------------------
 7 files changed, 6 insertions(+), 59 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/httpcomponents-client/blob/cbe00beb/httpclient5-cache/src/test/java/org/apache/hc/client5/http/impl/cache/ConsumableInputStream.java
----------------------------------------------------------------------
diff --git a/httpclient5-cache/src/test/java/org/apache/hc/client5/http/impl/cache/ConsumableInputStream.java b/httpclient5-cache/src/test/java/org/apache/hc/client5/http/impl/cache/ConsumableInputStream.java
index 8f5ce27..4506020 100644
--- a/httpclient5-cache/src/test/java/org/apache/hc/client5/http/impl/cache/ConsumableInputStream.java
+++ b/httpclient5-cache/src/test/java/org/apache/hc/client5/http/impl/cache/ConsumableInputStream.java
@@ -30,7 +30,7 @@ import java.io.ByteArrayInputStream;
 import java.io.IOException;
 import java.io.InputStream;
 
-import org.apache.hc.client5.http.utils.Closer;
+import org.apache.hc.core5.io.Closer;
 
 public class ConsumableInputStream extends InputStream {
 

http://git-wip-us.apache.org/repos/asf/httpcomponents-client/blob/cbe00beb/httpclient5-osgi/src/main/java/org/apache/hc/client5/http/osgi/impl/HttpProxyConfigurationActivator.java
----------------------------------------------------------------------
diff --git a/httpclient5-osgi/src/main/java/org/apache/hc/client5/http/osgi/impl/HttpProxyConfigurationActivator.java b/httpclient5-osgi/src/main/java/org/apache/hc/client5/http/osgi/impl/HttpProxyConfigurationActivator.java
index 6ae8af0..ffcd999 100644
--- a/httpclient5-osgi/src/main/java/org/apache/hc/client5/http/osgi/impl/HttpProxyConfigurationActivator.java
+++ b/httpclient5-osgi/src/main/java/org/apache/hc/client5/http/osgi/impl/HttpProxyConfigurationActivator.java
@@ -37,7 +37,7 @@ import org.apache.hc.client5.http.impl.classic.CloseableHttpClient;
 import org.apache.hc.client5.http.osgi.services.CachingHttpClientBuilderFactory;
 import org.apache.hc.client5.http.osgi.services.HttpClientBuilderFactory;
 import org.apache.hc.client5.http.osgi.services.ProxyConfiguration;
-import org.apache.hc.client5.http.utils.Closer;
+import org.apache.hc.core5.io.Closer;
 import org.osgi.framework.BundleActivator;
 import org.osgi.framework.BundleContext;
 import org.osgi.framework.Constants;

http://git-wip-us.apache.org/repos/asf/httpcomponents-client/blob/cbe00beb/httpclient5-testing/src/test/java/org/apache/hc/client5/testing/sync/LocalServerTestBase.java
----------------------------------------------------------------------
diff --git a/httpclient5-testing/src/test/java/org/apache/hc/client5/testing/sync/LocalServerTestBase.java b/httpclient5-testing/src/test/java/org/apache/hc/client5/testing/sync/LocalServerTestBase.java
index ed0938b..8c9dabc 100644
--- a/httpclient5-testing/src/test/java/org/apache/hc/client5/testing/sync/LocalServerTestBase.java
+++ b/httpclient5-testing/src/test/java/org/apache/hc/client5/testing/sync/LocalServerTestBase.java
@@ -33,7 +33,6 @@ import org.apache.hc.client5.http.config.RequestConfig;
 import org.apache.hc.client5.http.impl.classic.CloseableHttpClient;
 import org.apache.hc.client5.http.impl.classic.HttpClientBuilder;
 import org.apache.hc.client5.http.impl.io.PoolingHttpClientConnectionManager;
-import org.apache.hc.client5.http.utils.Closer;
 import org.apache.hc.client5.testing.SSLTestContexts;
 import org.apache.hc.client5.testing.classic.EchoHandler;
 import org.apache.hc.client5.testing.classic.RandomHandler;
@@ -44,6 +43,7 @@ import org.apache.hc.core5.http.io.HttpServerRequestHandler;
 import org.apache.hc.core5.http.io.SocketConfig;
 import org.apache.hc.core5.http.protocol.HttpProcessor;
 import org.apache.hc.core5.io.CloseMode;
+import org.apache.hc.core5.io.Closer;
 import org.apache.hc.core5.testing.classic.ClassicTestServer;
 import org.apache.hc.core5.util.Timeout;
 import org.junit.Rule;

http://git-wip-us.apache.org/repos/asf/httpcomponents-client/blob/cbe00beb/httpclient5/src/main/java/org/apache/hc/client5/http/impl/async/MinimalHttpAsyncClient.java
----------------------------------------------------------------------
diff --git a/httpclient5/src/main/java/org/apache/hc/client5/http/impl/async/MinimalHttpAsyncClient.java b/httpclient5/src/main/java/org/apache/hc/client5/http/impl/async/MinimalHttpAsyncClient.java
index c07c4d2..3f473a3 100644
--- a/httpclient5/src/main/java/org/apache/hc/client5/http/impl/async/MinimalHttpAsyncClient.java
+++ b/httpclient5/src/main/java/org/apache/hc/client5/http/impl/async/MinimalHttpAsyncClient.java
@@ -46,7 +46,6 @@ import org.apache.hc.client5.http.nio.AsyncClientConnectionManager;
 import org.apache.hc.client5.http.nio.AsyncConnectionEndpoint;
 import org.apache.hc.client5.http.protocol.HttpClientContext;
 import org.apache.hc.client5.http.routing.RoutingSupport;
-import org.apache.hc.client5.http.utils.Closer;
 import org.apache.hc.core5.concurrent.BasicFuture;
 import org.apache.hc.core5.concurrent.Cancellable;
 import org.apache.hc.core5.concurrent.ComplexCancellable;
@@ -71,6 +70,7 @@ import org.apache.hc.core5.http.nio.command.ShutdownCommand;
 import org.apache.hc.core5.http.protocol.HttpContext;
 import org.apache.hc.core5.http2.HttpVersionPolicy;
 import org.apache.hc.core5.io.CloseMode;
+import org.apache.hc.core5.io.Closer;
 import org.apache.hc.core5.reactor.Command;
 import org.apache.hc.core5.reactor.DefaultConnectingIOReactor;
 import org.apache.hc.core5.reactor.IOEventHandlerFactory;

http://git-wip-us.apache.org/repos/asf/httpcomponents-client/blob/cbe00beb/httpclient5/src/main/java/org/apache/hc/client5/http/socket/PlainConnectionSocketFactory.java
----------------------------------------------------------------------
diff --git a/httpclient5/src/main/java/org/apache/hc/client5/http/socket/PlainConnectionSocketFactory.java b/httpclient5/src/main/java/org/apache/hc/client5/http/socket/PlainConnectionSocketFactory.java
index aeceaa4..2da5562 100644
--- a/httpclient5/src/main/java/org/apache/hc/client5/http/socket/PlainConnectionSocketFactory.java
+++ b/httpclient5/src/main/java/org/apache/hc/client5/http/socket/PlainConnectionSocketFactory.java
@@ -31,11 +31,11 @@ import java.io.IOException;
 import java.net.InetSocketAddress;
 import java.net.Socket;
 
-import org.apache.hc.client5.http.utils.Closer;
 import org.apache.hc.core5.annotation.Contract;
 import org.apache.hc.core5.annotation.ThreadingBehavior;
 import org.apache.hc.core5.http.HttpHost;
 import org.apache.hc.core5.http.protocol.HttpContext;
+import org.apache.hc.core5.io.Closer;
 import org.apache.hc.core5.util.TimeValue;
 
 /**

http://git-wip-us.apache.org/repos/asf/httpcomponents-client/blob/cbe00beb/httpclient5/src/main/java/org/apache/hc/client5/http/ssl/SSLConnectionSocketFactory.java
----------------------------------------------------------------------
diff --git a/httpclient5/src/main/java/org/apache/hc/client5/http/ssl/SSLConnectionSocketFactory.java b/httpclient5/src/main/java/org/apache/hc/client5/http/ssl/SSLConnectionSocketFactory.java
index 586d4b2..cf88c85 100644
--- a/httpclient5/src/main/java/org/apache/hc/client5/http/ssl/SSLConnectionSocketFactory.java
+++ b/httpclient5/src/main/java/org/apache/hc/client5/http/ssl/SSLConnectionSocketFactory.java
@@ -49,11 +49,11 @@ import javax.security.auth.x500.X500Principal;
 
 import org.apache.hc.client5.http.psl.PublicSuffixMatcherLoader;
 import org.apache.hc.client5.http.socket.LayeredConnectionSocketFactory;
-import org.apache.hc.client5.http.utils.Closer;
 import org.apache.hc.core5.annotation.Contract;
 import org.apache.hc.core5.annotation.ThreadingBehavior;
 import org.apache.hc.core5.http.HttpHost;
 import org.apache.hc.core5.http.protocol.HttpContext;
+import org.apache.hc.core5.io.Closer;
 import org.apache.hc.core5.ssl.SSLContexts;
 import org.apache.hc.core5.ssl.SSLInitializationException;
 import org.apache.hc.core5.util.Args;

http://git-wip-us.apache.org/repos/asf/httpcomponents-client/blob/cbe00beb/httpclient5/src/main/java/org/apache/hc/client5/http/utils/Closer.java
----------------------------------------------------------------------
diff --git a/httpclient5/src/main/java/org/apache/hc/client5/http/utils/Closer.java b/httpclient5/src/main/java/org/apache/hc/client5/http/utils/Closer.java
deleted file mode 100644
index 3254e3e..0000000
--- a/httpclient5/src/main/java/org/apache/hc/client5/http/utils/Closer.java
+++ /dev/null
@@ -1,53 +0,0 @@
-/*
- * ====================================================================
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *   http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- * ====================================================================
- *
- * This software consists of voluntary contributions made by many
- * individuals on behalf of the Apache Software Foundation.  For more
- * information on the Apache Software Foundation, please see
- * <http://www.apache.org/>.
- *
- */
-
-package org.apache.hc.client5.http.utils;
-
-import java.io.Closeable;
-import java.io.IOException;
-
-/**
- * Closes resources. TODO: Use the HttpCore version when the next beta comes out.
- */
-public class Closer {
-
-    /**
-     * Closes the given closeable quietly even in the event of an exception.
-     *
-     * @param closeable
-     *            what to close.
-     */
-    public static void closeQuietly(final Closeable closeable) {
-        if (closeable != null) {
-            try {
-                closeable.close();
-            } catch (final IOException e) {
-                // Quietly ignore
-            }
-        }
-    }
-}