Removed duplicate class (no functional changes)
This commit is contained in:
parent
1614c25168
commit
cbe00beb56
|
@ -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 {
|
||||
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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;
|
||||
|
||||
/**
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue