Merge "Rename the default recipe for VFC NS"
[so.git] / adapters / mso-adapter-utils / src / main / java / org / openecomp / mso / openstack / utils / MsoHeatUtilsWithUpdate.java
index 2465b30..75bb003 100644 (file)
@@ -230,7 +230,7 @@ public class MsoHeatUtilsWithUpdate extends MsoHeatUtils {
         if (haveFiles && haveHeatFiles) {
             // Let's do this here - not in the bean
             LOGGER.debug ("Found files AND heatFiles - combine and add!");
-            Map <String, Object> combinedFiles = new HashMap <String, Object> ();
+            Map <String, Object> combinedFiles = new HashMap<>();
             for (String keyString : files.keySet ()) {
                 combinedFiles.put (keyString, files.get (keyString));
             }
@@ -358,23 +358,23 @@ public class MsoHeatUtilsWithUpdate extends MsoHeatUtils {
                        sb.append("(outputs is empty)");
                        return sb;
                }
-               Map<String, Object> outputs = new HashMap<String,Object>();
+               Map<String, Object> outputs = new HashMap<>();
                for (Output outputItem : outputList) {
                        outputs.put(outputItem.getOutputKey(), outputItem.getOutputValue());
                }
                int counter = 0;
                sb.append("OUTPUTS:\n");
                for (String key : outputs.keySet()) {
-                       sb.append("outputs[" + counter++ + "]: " + key + "=");
+                       sb.append("outputs[").append(counter++).append("]: ").append(key).append("=");
                        Object obj = outputs.get(key);
                        if (obj instanceof String) {
-                               sb.append((String)obj +" (a string)");
+                               sb.append((String) obj).append(" (a string)");
                        } else if (obj instanceof JsonNode) {
-                               sb.append(this.convertNode((JsonNode)obj) + " (a JsonNode)");
+                               sb.append(this.convertNode((JsonNode) obj)).append(" (a JsonNode)");
                        } else if (obj instanceof java.util.LinkedHashMap) {
                                try {
                                        String str = JSON_MAPPER.writeValueAsString(obj);
-                                       sb.append(str + " (a java.util.LinkedHashMap)");
+                                       sb.append(str).append(" (a java.util.LinkedHashMap)");
                                } catch (Exception e) {
                                        LOGGER.debug("Exception :", e);
                                        sb.append("(a LinkedHashMap value that would not convert nicely)");
@@ -428,8 +428,6 @@ public class MsoHeatUtilsWithUpdate extends MsoHeatUtils {
                        final Object obj = JSON_MAPPER.treeToValue(node, Object.class);
                        final String json = JSON_MAPPER.writeValueAsString(obj);
                        return json;
-               } catch (JsonParseException jpe) {
-                       LOGGER.debug("Error converting json to string " + jpe.getMessage(), jpe);
                } catch (Exception e) {
                        LOGGER.debug("Error converting json to string " + e.getMessage(), e);
                }