From: GuangrongFu Date: Thu, 8 Mar 2018 10:14:50 +0000 (+0800) Subject: Change the Exception from Generic to Specific X-Git-Tag: 1.2.0~33 X-Git-Url: https://gerrit.onap.org/r/gitweb?p=holmes%2Fcommon.git;a=commitdiff_plain;h=b1105dd8f4fa2cf21cc4eb4a6f825685a185173b Change the Exception from Generic to Specific Change-Id: I6d84339a95953e09171eef883f0b3c2fbeb71d96 Issue-ID: HOLMES-118 Signed-off-by: GuangrongFu --- diff --git a/holmes-actions/src/main/java/org/onap/holmes/common/utils/HttpsUtils.java b/holmes-actions/src/main/java/org/onap/holmes/common/utils/HttpsUtils.java index 41db955..a2c4852 100644 --- a/holmes-actions/src/main/java/org/onap/holmes/common/utils/HttpsUtils.java +++ b/holmes-actions/src/main/java/org/onap/holmes/common/utils/HttpsUtils.java @@ -200,7 +200,7 @@ public class HttpsUtils { } private static HttpResponse executeRequest(CloseableHttpClient httpClient, HttpRequestBase httpRequest) - throws Exception { + throws CorrelationException, IOException { HttpResponse httpResponse; try { httpResponse = httpClient.execute(httpRequest); diff --git a/holmes-actions/src/test/java/org/onap/holmes/common/utils/MSBRegisterUtilTest.java b/holmes-actions/src/test/java/org/onap/holmes/common/utils/MSBRegisterUtilTest.java index 8eefd4e..76aad81 100644 --- a/holmes-actions/src/test/java/org/onap/holmes/common/utils/MSBRegisterUtilTest.java +++ b/holmes-actions/src/test/java/org/onap/holmes/common/utils/MSBRegisterUtilTest.java @@ -16,24 +16,17 @@ package org.onap.holmes.common.utils; -import com.eclipsesource.jaxrs.consumer.ConsumerFactory; -import javax.ws.rs.QueryParam; - import org.easymock.EasyMock; import org.junit.Rule; import org.junit.Test; -import org.junit.runner.RunWith; -import org.onap.holmes.common.exception.CorrelationException; -import org.onap.holmes.common.msb.MicroserviceBusRest; -import org.onap.holmes.common.api.entity.ServiceRegisterEntity; import org.onap.holmes.common.config.MicroServiceConfig; +import org.onap.holmes.common.exception.CorrelationException; import org.onap.msb.sdk.discovery.entity.MicroServiceFullInfo; import org.onap.msb.sdk.discovery.entity.MicroServiceInfo; import org.onap.msb.sdk.httpclient.msb.MSBServiceClient; import org.powermock.api.easymock.PowerMock; import org.powermock.core.classloader.annotations.PowerMockIgnore; import org.powermock.core.classloader.annotations.PrepareForTest; -import org.powermock.modules.junit4.PowerMockRunner; import org.powermock.modules.junit4.rule.PowerMockRule; @PrepareForTest({MicroServiceConfig.class, MSBServiceClient.class, MSBRegisterUtil.class})