diff options
author | Parshad Patel <pars.patel@samsung.com> | 2019-06-04 16:59:41 +0900 |
---|---|---|
committer | Parshad Patel <pars.patel@samsung.com> | 2019-06-18 20:14:11 +0900 |
commit | 17a5fbcb3a2b5e2fb9135a19000f305e030325b5 (patch) | |
tree | 32060ec20cfe806584da52e0100d1b9ca36a5d32 /asdc-controller/src/main/java/org | |
parent | 984f8da49f06c1563b4496572c54147014aa94bb (diff) |
Fix sonar issue in asdc-controller
Fix Either log or rethrow this exception
Issue-ID: SO-1841
Change-Id: I2a333d94b040b7bf4ac646fc6f729874eb0fe054
Signed-off-by: Parshad Patel <pars.patel@samsung.com>
Diffstat (limited to 'asdc-controller/src/main/java/org')
-rw-r--r-- | asdc-controller/src/main/java/org/onap/so/asdc/activity/ActivitySpecsActions.java | 4 | ||||
-rw-r--r-- | asdc-controller/src/main/java/org/onap/so/asdc/client/ASDCConfiguration.java | 13 |
2 files changed, 7 insertions, 10 deletions
diff --git a/asdc-controller/src/main/java/org/onap/so/asdc/activity/ActivitySpecsActions.java b/asdc-controller/src/main/java/org/onap/so/asdc/activity/ActivitySpecsActions.java index afa6ccced1..c37eccf594 100644 --- a/asdc-controller/src/main/java/org/onap/so/asdc/activity/ActivitySpecsActions.java +++ b/asdc-controller/src/main/java/org/onap/so/asdc/activity/ActivitySpecsActions.java @@ -86,7 +86,7 @@ public class ActivitySpecsActions { } } } catch (Exception e) { - logger.warn(LoggingAnchor.TWO, "Exception creating activitySpec", e.getMessage()); + logger.warn(LoggingAnchor.TWO, "Exception creating activitySpec", e); } return activitySpecId; @@ -120,7 +120,7 @@ public class ActivitySpecsActions { } } catch (Exception e) { - logger.warn(LoggingAnchor.TWO, "Exception certifying activitySpec", e.getMessage()); + logger.warn(LoggingAnchor.TWO, "Exception certifying activitySpec", e); } return certificationResult; diff --git a/asdc-controller/src/main/java/org/onap/so/asdc/client/ASDCConfiguration.java b/asdc-controller/src/main/java/org/onap/so/asdc/client/ASDCConfiguration.java index 60abdc33ef..639a96eab6 100644 --- a/asdc-controller/src/main/java/org/onap/so/asdc/client/ASDCConfiguration.java +++ b/asdc-controller/src/main/java/org/onap/so/asdc/client/ASDCConfiguration.java @@ -22,7 +22,6 @@ package org.onap.so.asdc.client; - import java.security.GeneralSecurityException; import java.util.Arrays; import java.util.Collections; @@ -40,11 +39,11 @@ import org.springframework.stereotype.Component; public class ASDCConfiguration implements IConfiguration { // SHell command to obtain the same encryption, 128 bits key, key must be HEX - // echo -n "This is a test string" | openssl aes-128-ecb -e -K 546573746F736973546573746F736973 -nosalt | xxd + // echo -n "This is a test string" | openssl aes-128-ecb -e -K 546573746F736973546573746F736973 + // -nosalt | xxd private static Logger logger = LoggerFactory.getLogger(ASDCConfiguration.class); - private String asdcControllerName; public static final String HEAT = "HEAT"; @@ -74,7 +73,6 @@ public class ASDCConfiguration implements IConfiguration { @Value("${mso.asdc-connections.asdc-controller1.messageBusAddress}") private String[] messageBusAddress; - public void setAsdcControllerName(String asdcControllerName) { this.asdcControllerName = asdcControllerName; } @@ -96,15 +94,12 @@ public class ASDCConfiguration implements IConfiguration { } else { return Collections.emptyList(); } - - } public String getAsdcControllerName() { return asdcControllerName; } - @Override public String getConsumerGroup() { return getPropertyOrNull("mso.asdc-connections.asdc-controller1.consumerGroup"); @@ -172,6 +167,7 @@ public class ASDCConfiguration implements IConfiguration { try { return Boolean.valueOf(config); } catch (Exception e) { + logger.warn("Exception while getting boolean property with default property", e); return defaultValue; } } @@ -194,7 +190,8 @@ public class ASDCConfiguration implements IConfiguration { @Override public List<String> getRelevantArtifactTypes() { - // DO not return the Static List SUPPORTED_ARTIFACT_TYPES_LIST because the ASDC Client will try to modify it !!! + // DO not return the Static List SUPPORTED_ARTIFACT_TYPES_LIST because the ASDC Client will + // try to modify it !!! return Arrays.asList(SUPPORTED_ARTIFACT_TYPES); } |