diff options
author | Gary Wu <gary.i.wu@huawei.com> | 2017-04-11 11:43:21 -0700 |
---|---|---|
committer | Gary Wu <gary.i.wu@huawei.com> | 2017-04-11 11:49:51 -0700 |
commit | 7ee20399328e30044ebad93f2e561934b7811e51 (patch) | |
tree | d1afc27b4b579c2826ff4b1dd145ada81f48d2c8 /asdc-controller/src/main/java/org/openecomp/mso/asdc | |
parent | b6b7bef8bdcad15af01ac88a038dd763ce59f68f (diff) |
Fix resources leaks: CatalogDatabase
Change-Id: I3274dc7a64637cd7cf18d705258c0fc4985171ee
Signed-off-by: Gary Wu <gary.i.wu@huawei.com>
Diffstat (limited to 'asdc-controller/src/main/java/org/openecomp/mso/asdc')
-rw-r--r-- | asdc-controller/src/main/java/org/openecomp/mso/asdc/installer/heat/VfResourceInstaller.java | 3 |
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(); |