summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGuangrongFu <fu.guangrong@zte.com.cn>2018-03-08 18:14:50 +0800
committerGuangrongFu <fu.guangrong@zte.com.cn>2018-03-08 18:24:30 +0800
commitb1105dd8f4fa2cf21cc4eb4a6f825685a185173b (patch)
tree81d54986cef286ddc1f00d97d6b0f9fecf6611dd
parent8109b02052d5a66f442d8418340ad3bd7272ff99 (diff)
Change the Exception from Generic to Specific
Change-Id: I6d84339a95953e09171eef883f0b3c2fbeb71d96 Issue-ID: HOLMES-118 Signed-off-by: GuangrongFu <fu.guangrong@zte.com.cn>
-rw-r--r--holmes-actions/src/main/java/org/onap/holmes/common/utils/HttpsUtils.java2
-rw-r--r--holmes-actions/src/test/java/org/onap/holmes/common/utils/MSBRegisterUtilTest.java9
2 files changed, 2 insertions, 9 deletions
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})