From 7ee20399328e30044ebad93f2e561934b7811e51 Mon Sep 17 00:00:00 2001 From: Gary Wu Date: Tue, 11 Apr 2017 11:43:21 -0700 Subject: Fix resources leaks: CatalogDatabase Change-Id: I3274dc7a64637cd7cf18d705258c0fc4985171ee Signed-off-by: Gary Wu --- .../org/openecomp/mso/asdc/installer/heat/VfResourceInstaller.java | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'asdc-controller/src/main/java/org/openecomp/mso') 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(); -- cgit 1.2.3-korg