diff options
author | Steve Smokowski <ss835w@att.com> | 2019-06-18 12:16:04 +0000 |
---|---|---|
committer | Gerrit Code Review <gerrit@onap.org> | 2019-06-18 12:16:04 +0000 |
commit | b4cb184735a29c3a804432f5cdebff8fc6175d18 (patch) | |
tree | 4f80f8734abc80fe39c01680f2f0562784a9971c /asdc-controller/src/main/java | |
parent | 095c81fe69ca0c54cd7923888fa9bf4f7924b369 (diff) | |
parent | 17a5fbcb3a2b5e2fb9135a19000f305e030325b5 (diff) |
Merge "Fix sonar issue in asdc-controller"
Diffstat (limited to 'asdc-controller/src/main/java')
-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); } |