summaryrefslogtreecommitdiffstats
path: root/asdc-controller
diff options
context:
space:
mode:
authorChristophe Closset <cc697w@intl.att.com>2017-05-02 09:13:25 +0000
committerGerrit Code Review <gerrit@onap.org>2017-05-02 09:13:25 +0000
commited682f2abf0c83d036cd85cad9b91b972b8b896a (patch)
tree6a9df94fa44df117d19a17cacceda047a613a66f /asdc-controller
parentf25267232637e4f0c1ca2bb75dfd71e6e05ab443 (diff)
parent7ee20399328e30044ebad93f2e561934b7811e51 (diff)
Merge "Fix resources leaks: CatalogDatabase"
Diffstat (limited to 'asdc-controller')
-rw-r--r--asdc-controller/src/main/java/org/openecomp/mso/asdc/installer/heat/VfResourceInstaller.java3
1 files changed, 1 insertions, 2 deletions
diff --git a/asdc-controller/src/main/java/org/openecomp/mso/asdc/installer/heat/VfResourceInstaller.java b/asdc-controller/src/main/java/org/openecomp/mso/asdc/installer/heat/VfResourceInstaller.java
index 114f6f246b..e2ed1a3d79 100644
--- a/asdc-controller/src/main/java/org/openecomp/mso/asdc/installer/heat/VfResourceInstaller.java
+++ b/asdc-controller/src/main/java/org/openecomp/mso/asdc/installer/heat/VfResourceInstaller.java
@@ -69,11 +69,10 @@ public class VfResourceInstaller implements IVfResourceInstaller {
public boolean isResourceAlreadyDeployed(VfResourceStructure vfResourceStruct)
throws ArtifactInstallerException {
- CatalogDatabase db = new CatalogDatabase();
boolean status = false;
VfResourceStructure vfResourceStructure = (VfResourceStructure)vfResourceStruct;
- try {
+ try(CatalogDatabase db = new CatalogDatabase()) {
String resourceType = vfResourceStruct.getResourceInstance().getResourceType();
String category = vfResourceStruct.getResourceInstance().getCategory();