Change the Exception from Generic to Specific 47/34747/2
authorGuangrongFu <fu.guangrong@zte.com.cn>
Thu, 8 Mar 2018 10:14:50 +0000 (18:14 +0800)
committerGuangrongFu <fu.guangrong@zte.com.cn>
Thu, 8 Mar 2018 10:24:30 +0000 (18:24 +0800)
Change-Id: I6d84339a95953e09171eef883f0b3c2fbeb71d96
Issue-ID: HOLMES-118
Signed-off-by: GuangrongFu <fu.guangrong@zte.com.cn>
holmes-actions/src/main/java/org/onap/holmes/common/utils/HttpsUtils.java
holmes-actions/src/test/java/org/onap/holmes/common/utils/MSBRegisterUtilTest.java

index 41db955..a2c4852 100644 (file)
@@ -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);
index 8eefd4e..76aad81 100644 (file)
 \r
 package org.onap.holmes.common.utils;\r
 \r
-import com.eclipsesource.jaxrs.consumer.ConsumerFactory;\r
-import javax.ws.rs.QueryParam;\r
-\r
 import org.easymock.EasyMock;\r
 import org.junit.Rule;\r
 import org.junit.Test;\r
-import org.junit.runner.RunWith;\r
-import org.onap.holmes.common.exception.CorrelationException;\r
-import org.onap.holmes.common.msb.MicroserviceBusRest;\r
-import org.onap.holmes.common.api.entity.ServiceRegisterEntity;\r
 import org.onap.holmes.common.config.MicroServiceConfig;\r
+import org.onap.holmes.common.exception.CorrelationException;\r
 import org.onap.msb.sdk.discovery.entity.MicroServiceFullInfo;\r
 import org.onap.msb.sdk.discovery.entity.MicroServiceInfo;\r
 import org.onap.msb.sdk.httpclient.msb.MSBServiceClient;\r
 import org.powermock.api.easymock.PowerMock;\r
 import org.powermock.core.classloader.annotations.PowerMockIgnore;\r
 import org.powermock.core.classloader.annotations.PrepareForTest;\r
-import org.powermock.modules.junit4.PowerMockRunner;\r
 import org.powermock.modules.junit4.rule.PowerMockRule;\r
 \r
 @PrepareForTest({MicroServiceConfig.class, MSBServiceClient.class, MSBRegisterUtil.class})\r