aboutsummaryrefslogtreecommitdiffstats
path: root/adapters/mso-adapter-utils/src/main/java/org/openecomp/mso/openstack/utils/MsoHeatUtilsWithUpdate.java
diff options
context:
space:
mode:
authorseshukm <seshu.kumar.m@huawei.com>2017-09-12 16:13:47 +0530
committerseshukm <seshu.kumar.m@huawei.com>2017-09-12 16:13:47 +0530
commit171ec7b74a11658277f9e9fe1dcc893a8225db9e (patch)
tree8f475fddfc39f1639ee17b77545a1fbada48ed44 /adapters/mso-adapter-utils/src/main/java/org/openecomp/mso/openstack/utils/MsoHeatUtilsWithUpdate.java
parent92ffbb4a56b1f84ed130b04ca3a9954ce610a02a (diff)
Fix for SONAR critical issues
Issue-Id : SO-117 Change-Id: Icdc64605b475e20af7e871135af327f7d0e38792 Signed-off-by: seshukm <seshu.kumar.m@huawei.com>
Diffstat (limited to 'adapters/mso-adapter-utils/src/main/java/org/openecomp/mso/openstack/utils/MsoHeatUtilsWithUpdate.java')
-rw-r--r--adapters/mso-adapter-utils/src/main/java/org/openecomp/mso/openstack/utils/MsoHeatUtilsWithUpdate.java12
1 files changed, 9 insertions, 3 deletions
diff --git a/adapters/mso-adapter-utils/src/main/java/org/openecomp/mso/openstack/utils/MsoHeatUtilsWithUpdate.java b/adapters/mso-adapter-utils/src/main/java/org/openecomp/mso/openstack/utils/MsoHeatUtilsWithUpdate.java
index 1497e2d5ea..dba52d4306 100644
--- a/adapters/mso-adapter-utils/src/main/java/org/openecomp/mso/openstack/utils/MsoHeatUtilsWithUpdate.java
+++ b/adapters/mso-adapter-utils/src/main/java/org/openecomp/mso/openstack/utils/MsoHeatUtilsWithUpdate.java
@@ -3,6 +3,7 @@
* ONAP - SO
* ================================================================================
* Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * Copyright (C) 2017 Huawei Technologies Co., Ltd. All rights reserved.
* ================================================================================
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -281,7 +282,7 @@ public class MsoHeatUtilsWithUpdate extends MsoHeatUtils {
try {
LOGGER.debug("Current stack " + this.getOutputsAsStringBuilder(heatStack).toString());
} catch (Exception e) {
- LOGGER.debug("an error occurred trying to print out the current outputs of the stack");
+ LOGGER.debug("an error occurred trying to print out the current outputs of the stack", e);
}
@@ -378,6 +379,7 @@ public class MsoHeatUtilsWithUpdate extends MsoHeatUtils {
String str = JSON_MAPPER.writeValueAsString(obj);
sb.append(str + " (a java.util.LinkedHashMap)");
} catch (Exception e) {
+ LOGGER.debug("Exception :", e);
sb.append("(a LinkedHashMap value that would not convert nicely)");
}
} else if (obj instanceof Integer) {
@@ -385,6 +387,7 @@ public class MsoHeatUtilsWithUpdate extends MsoHeatUtils {
try {
str = obj.toString() + " (an Integer)\n";
} catch (Exception e) {
+ LOGGER.debug("Exception :", e);
str = "(an Integer unable to call .toString() on)";
}
sb.append(str);
@@ -393,6 +396,7 @@ public class MsoHeatUtilsWithUpdate extends MsoHeatUtils {
try {
str = obj.toString() + " (an ArrayList)";
} catch (Exception e) {
+ LOGGER.debug("Exception :", e);
str = "(an ArrayList unable to call .toString() on?)";
}
sb.append(str);
@@ -401,6 +405,7 @@ public class MsoHeatUtilsWithUpdate extends MsoHeatUtils {
try {
str = obj.toString() + " (a Boolean)";
} catch (Exception e) {
+ LOGGER.debug("Exception :", e);
str = "(an Boolean unable to call .toString() on?)";
}
sb.append(str);
@@ -410,6 +415,7 @@ public class MsoHeatUtilsWithUpdate extends MsoHeatUtils {
try {
str = obj.toString() + " (unknown Object type)";
} catch (Exception e) {
+ LOGGER.debug("Exception :", e);
str = "(a value unable to call .toString() on?)";
}
sb.append(str);
@@ -426,9 +432,9 @@ public class MsoHeatUtilsWithUpdate extends MsoHeatUtils {
final String json = JSON_MAPPER.writeValueAsString(obj);
return json;
} catch (JsonParseException jpe) {
- LOGGER.debug("Error converting json to string " + jpe.getMessage());
+ LOGGER.debug("Error converting json to string " + jpe.getMessage(), jpe);
} catch (Exception e) {
- LOGGER.debug("Error converting json to string " + e.getMessage());
+ LOGGER.debug("Error converting json to string " + e.getMessage(), e);
}
return "[Error converting json to string]";
}