From ae657813d9409f4326c86324c9a41a391b30bb11 Mon Sep 17 00:00:00 2001 From: luxin Date: Wed, 20 Sep 2017 11:49:46 +0800 Subject: Remove the ConnectTimeoutException Remove the ConnectTimeoutException which is a subclass of IOException Change-Id: Iab8a2497dd9f6e15848e4023972eb0a11ce22e7c Issue-Id:VFC-375 Signed-off-by: luxin --- .../service/csm/connect/SslAnonymousSocket.java | 5 ++--- .../service/csm/connect/SslCertificateSocket.java | 19 ++++++++++--------- 2 files changed, 12 insertions(+), 12 deletions(-) (limited to 'huawei/vnfmadapter') diff --git a/huawei/vnfmadapter/VnfmadapterService/service/src/main/java/org/onap/vfc/nfvo/vnfm/svnfm/vnfmadapter/service/csm/connect/SslAnonymousSocket.java b/huawei/vnfmadapter/VnfmadapterService/service/src/main/java/org/onap/vfc/nfvo/vnfm/svnfm/vnfmadapter/service/csm/connect/SslAnonymousSocket.java index b8b38388..d105e5d4 100644 --- a/huawei/vnfmadapter/VnfmadapterService/service/src/main/java/org/onap/vfc/nfvo/vnfm/svnfm/vnfmadapter/service/csm/connect/SslAnonymousSocket.java +++ b/huawei/vnfmadapter/VnfmadapterService/service/src/main/java/org/onap/vfc/nfvo/vnfm/svnfm/vnfmadapter/service/csm/connect/SslAnonymousSocket.java @@ -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 *
* * @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 { diff --git a/huawei/vnfmadapter/VnfmadapterService/service/src/main/java/org/onap/vfc/nfvo/vnfm/svnfm/vnfmadapter/service/csm/connect/SslCertificateSocket.java b/huawei/vnfmadapter/VnfmadapterService/service/src/main/java/org/onap/vfc/nfvo/vnfm/svnfm/vnfmadapter/service/csm/connect/SslCertificateSocket.java index a525907a..fba805e8 100644 --- a/huawei/vnfmadapter/VnfmadapterService/service/src/main/java/org/onap/vfc/nfvo/vnfm/svnfm/vnfmadapter/service/csm/connect/SslCertificateSocket.java +++ b/huawei/vnfmadapter/VnfmadapterService/service/src/main/java/org/onap/vfc/nfvo/vnfm/svnfm/vnfmadapter/service/csm/connect/SslCertificateSocket.java @@ -13,9 +13,16 @@ * 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 *
* * @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 { -- cgit 1.2.3-korg