summaryrefslogtreecommitdiffstats
path: root/common/openecomp-common-configuration-management/openecomp-configuration-management-core
diff options
context:
space:
mode:
Diffstat (limited to 'common/openecomp-common-configuration-management/openecomp-configuration-management-core')
-rw-r--r--common/openecomp-common-configuration-management/openecomp-configuration-management-core/src/main/java/org/openecomp/config/ConfigurationUtils.java11
1 files changed, 8 insertions, 3 deletions
diff --git a/common/openecomp-common-configuration-management/openecomp-configuration-management-core/src/main/java/org/openecomp/config/ConfigurationUtils.java b/common/openecomp-common-configuration-management/openecomp-configuration-management-core/src/main/java/org/openecomp/config/ConfigurationUtils.java
index c0a1e0ceb0..889efea3da 100644
--- a/common/openecomp-common-configuration-management/openecomp-configuration-management-core/src/main/java/org/openecomp/config/ConfigurationUtils.java
+++ b/common/openecomp-common-configuration-management/openecomp-configuration-management-core/src/main/java/org/openecomp/config/ConfigurationUtils.java
@@ -584,14 +584,19 @@ public class ConfigurationUtils {
stmt.setString(i + 1, params[i]);
}
}
- ResultSet rs = stmt.executeQuery();
- while (rs.next()) {
- coll.add(rs.getString(1));
+
+ try (ResultSet rs = stmt.executeQuery()) {
+
+ while (rs.next()) {
+ coll.add(rs.getString(1));
+ }
}
+
} catch (Exception exception) {
//exception.printStackTrace();
return null;
}
+
return coll;
}