summaryrefslogtreecommitdiffstats
path: root/asdc-controller
diff options
context:
space:
mode:
authorGary Wu <gary.i.wu@huawei.com>2017-04-11 11:43:21 -0700
committerGary Wu <gary.i.wu@huawei.com>2017-04-11 11:49:51 -0700
commit7ee20399328e30044ebad93f2e561934b7811e51 (patch)
treed1afc27b4b579c2826ff4b1dd145ada81f48d2c8 /asdc-controller
parentb6b7bef8bdcad15af01ac88a038dd763ce59f68f (diff)
Fix resources leaks: CatalogDatabase
Change-Id: I3274dc7a64637cd7cf18d705258c0fc4985171ee Signed-off-by: Gary Wu <gary.i.wu@huawei.com>
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();