diff options
author | seshukm <seshu.kumar.m@huawei.com> | 2017-09-18 11:47:20 +0530 |
---|---|---|
committer | seshukm <seshu.kumar.m@huawei.com> | 2017-09-18 11:47:20 +0530 |
commit | 5e2aa1fec3c51e8eb0e6b43285c8414105a51b2f (patch) | |
tree | 291e6a39ce0cf6e9b0e60c5645fa816226c3c974 /adapters/mso-adapter-utils/src/main/java/org/openecomp/mso/openstack/utils/MsoHeatEnvironmentEntry.java | |
parent | 5d8490e4c2aabebe4e34a28bc47a42a17fbfa1f1 (diff) |
Fixed Issues In adapter code.
Issue-Id : SO-141
Change-Id: I0e901537013634dfc3f0950921c2ebbc2afa411f
Signed-off-by: seshukm <seshu.kumar.m@huawei.com>
Diffstat (limited to 'adapters/mso-adapter-utils/src/main/java/org/openecomp/mso/openstack/utils/MsoHeatEnvironmentEntry.java')
-rw-r--r-- | adapters/mso-adapter-utils/src/main/java/org/openecomp/mso/openstack/utils/MsoHeatEnvironmentEntry.java | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/adapters/mso-adapter-utils/src/main/java/org/openecomp/mso/openstack/utils/MsoHeatEnvironmentEntry.java b/adapters/mso-adapter-utils/src/main/java/org/openecomp/mso/openstack/utils/MsoHeatEnvironmentEntry.java index fd252b634a..3aa77c2c7a 100644 --- a/adapters/mso-adapter-utils/src/main/java/org/openecomp/mso/openstack/utils/MsoHeatEnvironmentEntry.java +++ b/adapters/mso-adapter-utils/src/main/java/org/openecomp/mso/openstack/utils/MsoHeatEnvironmentEntry.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. @@ -26,9 +27,12 @@ import java.util.HashSet; import java.util.ArrayList; import java.util.Set; import org.openecomp.mso.db.catalog.beans.HeatTemplateParam; +import org.openecomp.mso.logger.MsoLogger; public class MsoHeatEnvironmentEntry { + private static final MsoLogger LOGGER = MsoLogger.getMsoLogger (MsoLogger.Catalog.RA); + private Set<MsoHeatEnvironmentParameter> parameters = null; private Set<MsoHeatEnvironmentResource> resources = null; private StringBuilder rawEntry = null; @@ -48,7 +52,7 @@ public class MsoHeatEnvironmentEntry { private void processRawEntry() { try { - if (this.rawEntry == null || this.rawEntry.equals("")) + if (this.rawEntry == null || "".equals(this.rawEntry)) return; byte[] b = this.rawEntry.toString().getBytes(); MsoYamlEditorWithEnvt yaml = new MsoYamlEditorWithEnvt(b); @@ -61,6 +65,7 @@ public class MsoHeatEnvironmentEntry { this.resourceRegistryEntryRaw = sb; } } catch (Exception e) { + LOGGER.debug("Exception:", e); this.valid = false; this.errorString = e.getMessage(); //e.printStackTrace(); @@ -97,13 +102,13 @@ public class MsoHeatEnvironmentEntry { public void addParameter(MsoHeatEnvironmentParameter hep) { if (this.parameters == null) { - this.parameters = new HashSet<MsoHeatEnvironmentParameter>(); + this.parameters = new HashSet<>(); } this.parameters.add(hep); } public void addResource(MsoHeatEnvironmentResource her) { if (this.resources == null) { - this.resources = new HashSet<MsoHeatEnvironmentResource>(); + this.resources = new HashSet<>(); } this.resources.add(her); } |