aboutsummaryrefslogtreecommitdiffstats
path: root/asdc-controller/src/main/java/org/openecomp/mso/asdc/util
diff options
context:
space:
mode:
authorSeshu Kumar M <seshu.kumar.m@huawei.com>2018-03-08 07:39:08 +0000
committerGerrit Code Review <gerrit@onap.org>2018-03-08 07:39:08 +0000
commita88ba9fbc4033449dc9675b27dcf08305e8a66a1 (patch)
tree59e562035f4d33086605e08ffdc8340d2bf3d8c7 /asdc-controller/src/main/java/org/openecomp/mso/asdc/util
parent0079db1779ad6f30660e3df85c0b4c0a32bb757e (diff)
parent36edf1a3688ab064918a8be2edff758130795205 (diff)
Merge "Swap StringBuilder with string where makes sense"
Diffstat (limited to 'asdc-controller/src/main/java/org/openecomp/mso/asdc/util')
-rw-r--r--asdc-controller/src/main/java/org/openecomp/mso/asdc/util/ASDCNotificationLogging.java111
1 files changed, 20 insertions, 91 deletions
diff --git a/asdc-controller/src/main/java/org/openecomp/mso/asdc/util/ASDCNotificationLogging.java b/asdc-controller/src/main/java/org/openecomp/mso/asdc/util/ASDCNotificationLogging.java
index 2080be137c..396784add4 100644
--- a/asdc-controller/src/main/java/org/openecomp/mso/asdc/util/ASDCNotificationLogging.java
+++ b/asdc-controller/src/main/java/org/openecomp/mso/asdc/util/ASDCNotificationLogging.java
@@ -42,51 +42,15 @@ public class ASDCNotificationLogging {
if (asdcNotification == null) {
return "NULL";
}
- StringBuilder buffer = new StringBuilder("ASDC Notification:");
- buffer.append(System.lineSeparator());
-
- buffer.append("DistributionID:");
- buffer.append(testNull(asdcNotification.getDistributionID()));
- buffer.append(System.lineSeparator());
-
-
- buffer.append("ServiceName:");
- buffer.append(testNull(asdcNotification.getServiceName()));
- buffer.append(System.lineSeparator());
-
-
- buffer.append("ServiceVersion:");
- buffer.append(testNull(asdcNotification.getServiceVersion()));
- buffer.append(System.lineSeparator());
-
-
- buffer.append("ServiceUUID:");
- buffer.append(testNull(asdcNotification.getServiceUUID()));
- buffer.append(System.lineSeparator());
-
-
- buffer.append("ServiceInvariantUUID:");
- buffer.append(testNull(asdcNotification.getServiceInvariantUUID()));
- buffer.append(System.lineSeparator());
-
-
- buffer.append("ServiceDescription:");
- buffer.append(testNull(asdcNotification.getServiceDescription()));
- buffer.append(System.lineSeparator());
-
-
- buffer.append("Service Artifacts List:");
- buffer.append(System.lineSeparator());
- buffer.append(testNull(dumpArtifactInfoList(asdcNotification.getServiceArtifacts())));
- buffer.append(System.lineSeparator());
-
- buffer.append("Resource Instances List:");
- buffer.append(System.lineSeparator());
- buffer.append(testNull(dumpASDCResourcesList(asdcNotification)));
- buffer.append(System.lineSeparator());
-
-
- return buffer.toString();
+ return "ASDC Notification:" + System.lineSeparator() +
+ "DistributionID:" + testNull(asdcNotification.getDistributionID()) + System.lineSeparator() +
+ "ServiceName:" + testNull(asdcNotification.getServiceName()) + System.lineSeparator() +
+ "ServiceVersion:" + testNull(asdcNotification.getServiceVersion()) + System.lineSeparator() +
+ "ServiceUUID:" + testNull(asdcNotification.getServiceUUID()) + System.lineSeparator() +
+ "ServiceInvariantUUID:" + testNull(asdcNotification.getServiceInvariantUUID()) + System.lineSeparator() +
+ "ServiceDescription:" + testNull(asdcNotification.getServiceDescription()) + System.lineSeparator() +
+ "Service Artifacts List:" + System.lineSeparator() + testNull(dumpArtifactInfoList(asdcNotification.getServiceArtifacts())) + System.lineSeparator() +
+ "Resource Instances List:" + System.lineSeparator() + testNull(dumpASDCResourcesList(asdcNotification)) + System.lineSeparator();
}
public static String dumpCSARNotification(INotificationData asdcNotification, ToscaResourceStructure toscaResourceStructure) {
@@ -418,52 +382,17 @@ public class ASDCNotificationLogging {
return null;
}
- StringBuilder buffer = new StringBuilder("Resource Instance Info:");
- buffer.append(System.lineSeparator());
-
- buffer.append("ResourceInstanceName:");
- buffer.append(testNull(resourceInstance.getResourceInstanceName()));
- buffer.append(System.lineSeparator());
-
- buffer.append("ResourceCustomizationUUID:");
- buffer.append(testNull(resourceInstance.getResourceCustomizationUUID()));
- buffer.append(System.lineSeparator());
-
- buffer.append("ResourceInvariantUUID:");
- buffer.append(testNull(resourceInstance.getResourceInvariantUUID()));
- buffer.append(System.lineSeparator());
-
- buffer.append("ResourceName:");
- buffer.append(testNull(resourceInstance.getResourceName()));
- buffer.append(System.lineSeparator());
-
- buffer.append("ResourceType:");
- buffer.append(testNull(resourceInstance.getResourceType()));
- buffer.append(System.lineSeparator());
-
- buffer.append("ResourceUUID:");
- buffer.append(testNull(resourceInstance.getResourceUUID()));
- buffer.append(System.lineSeparator());
-
- buffer.append("ResourceVersion:");
- buffer.append(testNull(resourceInstance.getResourceVersion()));
- buffer.append(System.lineSeparator());
-
- buffer.append("Category:");
- buffer.append(testNull(resourceInstance.getCategory()));
- buffer.append(System.lineSeparator());
-
- buffer.append("SubCategory:");
- buffer.append(testNull(resourceInstance.getSubcategory()));
- buffer.append(System.lineSeparator());
-
- buffer.append("Resource Artifacts List:");
- buffer.append(System.lineSeparator());
- buffer.append(testNull(dumpArtifactInfoList(resourceInstance.getArtifacts())));
- buffer.append(System.lineSeparator());
-
- return buffer.toString();
-
+ return "Resource Instance Info:" + System.lineSeparator() +
+ "ResourceInstanceName:" + testNull(resourceInstance.getResourceInstanceName()) + System.lineSeparator() +
+ "ResourceCustomizationUUID:" + testNull(resourceInstance.getResourceCustomizationUUID()) + System.lineSeparator() +
+ "ResourceInvariantUUID:" + testNull(resourceInstance.getResourceInvariantUUID()) + System.lineSeparator() +
+ "ResourceName:" + testNull(resourceInstance.getResourceName()) + System.lineSeparator() +
+ "ResourceType:" + testNull(resourceInstance.getResourceType()) + System.lineSeparator() +
+ "ResourceUUID:" + testNull(resourceInstance.getResourceUUID()) + System.lineSeparator() +
+ "ResourceVersion:" + testNull(resourceInstance.getResourceVersion()) + System.lineSeparator() +
+ "Category:" + testNull(resourceInstance.getCategory()) + System.lineSeparator() +
+ "SubCategory:" + testNull(resourceInstance.getSubcategory()) + System.lineSeparator() +
+ "Resource Artifacts List:" + System.lineSeparator() + testNull(dumpArtifactInfoList(resourceInstance.getArtifacts())) + System.lineSeparator();
}