ConnectTimeoutException class in httpclient instead for commons-httpclient

84 views Asked by At

I have updgraded to httpclient from commons-httpclient for security vulnerability issues.

https://mvnrepository.com/artifact/commons-httpclient/commons-httpclient

But, can not find ConnectTimeoutException class in httpclient.

What is the class for ConnectTimeoutException in httpclient?

commons-httpclient

<exclusion>
        <groupId>commons-httpclient</groupId>
         <artifactId>commons-httpclient</artifactId>
</exclusion>

httpclient

 <dependency>
            <groupId>org.apache.httpcomponents</groupId>
            <artifactId>httpclient</artifactId>
            <version>4.5.14</version>
  </dependency>
1

There are 1 answers

2
softwareguy On

There is a ConnectTimeoutException class in HttpClient 4.5.14. Try using:

import org.apache.http.conn.ConnectTimeoutException

For more information, please see ConnectTimeoutException