aboutsummaryrefslogtreecommitdiffstats
path: root/bpmn/MSOCommonBPMN/src/main/java/org/openecomp
diff options
context:
space:
mode:
authorSumapriya Sarvepalli <SS00493505@TechMahindra.com>2018-02-06 16:30:19 +0530
committerSumapriya Sarvepalli <SS00493505@TechMahindra.com>2018-02-06 16:31:26 +0530
commitf843c9280e3eba6b059f287d44e122d9fadd6c90 (patch)
tree353ff4c670e25d8b032620a3ab549b3ab031965f /bpmn/MSOCommonBPMN/src/main/java/org/openecomp
parente42d72fb3a557fc66a787d1348d3bd389eb9d9a1 (diff)
Sonar:Critical
Define and throw a dedicated exception instead of using a generic one ApplicationControllerClient.java:L79 L121 L132 Sonar Link: https://sonar.onap.org/account/issues#resolved=false|rules=squid%3AS00112 Location:src/main/java/org/openecomp/mso/client/appc/ApplicationControllerClient.java Change-Id: Iba0d52ad2310fed17bb1012611e4ca0bf0ae2180 Issue-ID: SO-400 Signed-off-by: Sumapriya Sarvepalli <SS00493505@TechMahindra.com>
Diffstat (limited to 'bpmn/MSOCommonBPMN/src/main/java/org/openecomp')
-rw-r--r--bpmn/MSOCommonBPMN/src/main/java/org/openecomp/mso/client/appc/ApplicationControllerClient.java6
1 files changed, 3 insertions, 3 deletions
diff --git a/bpmn/MSOCommonBPMN/src/main/java/org/openecomp/mso/client/appc/ApplicationControllerClient.java b/bpmn/MSOCommonBPMN/src/main/java/org/openecomp/mso/client/appc/ApplicationControllerClient.java
index 26c1c4acd2..f66034f5e9 100644
--- a/bpmn/MSOCommonBPMN/src/main/java/org/openecomp/mso/client/appc/ApplicationControllerClient.java
+++ b/bpmn/MSOCommonBPMN/src/main/java/org/openecomp/mso/client/appc/ApplicationControllerClient.java
@@ -76,7 +76,7 @@ public class ApplicationControllerClient {
private LifeCycleManagerStateful client;
public Status runCommand(Action action, ActionIdentifiers identifier, Flags flags, Payload payload,
- String requestID) throws Exception {
+ String requestID) throws IllegalAccessException,NoSuchMethodException,AppcClientException,JsonProcessingException,InvocationTargetException {
Object requestObject = createRequest(action, identifier, flags, payload, requestID);
client = getAppCClient();
Method lcmMethod = appCSupport.getAPIMethod(action.name(), client, false);
@@ -118,7 +118,7 @@ public class ApplicationControllerClient {
}
public Object createRequest(Action action, ActionIdentifiers identifier, Flags flags, Payload payload,
- String requestId) throws Exception {
+ String requestId) throws IllegalAccessException,NoSuchMethodException,InvocationTargetException {
Object requestObject = appCSupport.getInput(action.name());
try {
org.openecomp.appc.client.lcm.model.CommonHeader commonHeader = buildCommonHeader(requestId);
@@ -129,7 +129,7 @@ public class ApplicationControllerClient {
.invoke(requestObject, identifier);
} catch (IllegalAccessException | NoSuchMethodException | InvocationTargetException e) {
LOGGER.debug("Exception:", e);
- throw new Exception("Error Building AppC Request: " + e.getMessage());
+ throw new IllegalAccessException("Error Building AppC Request: " + e.getMessage());
}
return requestObject;
}