Remove the ConnectTimeoutException 49/13649/1
authorluxin <luxin7@huawei.com>
Wed, 20 Sep 2017 03:49:46 +0000 (11:49 +0800)
committerluxin <luxin7@huawei.com>
Wed, 20 Sep 2017 03:49:46 +0000 (11:49 +0800)
Remove the ConnectTimeoutException which is a subclass of
IOException

Change-Id: Iab8a2497dd9f6e15848e4023972eb0a11ce22e7c
Issue-Id:VFC-375
Signed-off-by: luxin <luxin7@huawei.com>
huawei/vnfmadapter/VnfmadapterService/service/src/main/java/org/onap/vfc/nfvo/vnfm/svnfm/vnfmadapter/service/csm/connect/SslAnonymousSocket.java
huawei/vnfmadapter/VnfmadapterService/service/src/main/java/org/onap/vfc/nfvo/vnfm/svnfm/vnfmadapter/service/csm/connect/SslCertificateSocket.java

index b8b3838..d105e5d 100644 (file)
@@ -23,7 +23,6 @@ import java.security.GeneralSecurityException;
 
 import javax.net.ssl.SSLSocketFactory;
 
-import org.apache.commons.httpclient.ConnectTimeoutException;
 import org.apache.commons.httpclient.params.HttpConnectionParams;
 import org.apache.commons.httpclient.protocol.ControllerThreadSocketFactory;
 import org.apache.commons.httpclient.protocol.SecureProtocolSocketFactory;
@@ -45,7 +44,7 @@ public class SslAnonymousSocket extends AbstractSslContext implements SecureProt
      * <br>
      *
      * @throws VnfmException
-     * @since  VFC 1.0
+     * @since VFC 1.0
      */
     public void init() throws VnfmException {
         try {
@@ -68,7 +67,7 @@ public class SslAnonymousSocket extends AbstractSslContext implements SecureProt
 
     @Override
     public Socket createSocket(String host, int port, InetAddress localAddress, int localPort,
-            HttpConnectionParams params) throws IOException, ConnectTimeoutException {
+            HttpConnectionParams params) throws IOException {
         if(params == null) {
             throw new IOException("Illegal socket parameters!");
         } else {
index a525907..fba805e 100644 (file)
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
+
 package org.onap.vfc.nfvo.vnfm.svnfm.vnfmadapter.service.csm.connect;
 
-import org.apache.commons.httpclient.ConnectTimeoutException;
+import java.io.IOException;
+import java.net.InetAddress;
+import java.net.Socket;
+import java.security.GeneralSecurityException;
+
+import javax.net.ssl.SSLSocketFactory;
+
 import org.apache.commons.httpclient.params.HttpConnectionParams;
 import org.apache.commons.httpclient.protocol.ControllerThreadSocketFactory;
 import org.apache.commons.httpclient.protocol.SecureProtocolSocketFactory;
@@ -23,12 +30,6 @@ import org.onap.vfc.nfvo.vnfm.svnfm.vnfmadapter.common.VnfmException;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
-import javax.net.ssl.SSLSocketFactory;
-import java.io.IOException;
-import java.net.InetAddress;
-import java.net.Socket;
-import java.security.GeneralSecurityException;
-
 /**
  * Created by QuanZhong on 2017/3/6.
  */
@@ -43,7 +44,7 @@ public class SslCertificateSocket extends AbstractSslContext implements SecurePr
      * <br>
      *
      * @throws VnfmException
-     * @since  VFC 1.0
+     * @since VFC 1.0
      */
     public void init() throws VnfmException {
         try {
@@ -66,7 +67,7 @@ public class SslCertificateSocket extends AbstractSslContext implements SecurePr
 
     @Override
     public Socket createSocket(String host, int port, InetAddress localAddress, int localPort,
-                               HttpConnectionParams params) throws IOException, ConnectTimeoutException {
+            HttpConnectionParams params) throws IOException {
         if(params == null) {
             throw new IOException("Illegal socket parameters!");
         } else {