diff options
author | 2017-09-07 14:37:51 +0000 | |
---|---|---|
committer | 2017-09-07 14:37:51 +0000 | |
commit | 75c572279398dc2be7652263843c8802a9406c4f (patch) | |
tree | 6b4fb827b0f1f731efcdaf6e40a62814bc1e9928 /common/openecomp-common-configuration-management/openecomp-configuration-management-core/src/main/java/org/openecomp/config/ConfigurationUtils.java | |
parent | d8b91a969d1631793761cf1fdc17d52d4f82ca95 (diff) | |
parent | b7375b2488df93ba9df57ad13ec628bbff663819 (diff) |
Merge "Fixed a few static analysis violations"
Diffstat (limited to 'common/openecomp-common-configuration-management/openecomp-configuration-management-core/src/main/java/org/openecomp/config/ConfigurationUtils.java')
-rw-r--r-- | common/openecomp-common-configuration-management/openecomp-configuration-management-core/src/main/java/org/openecomp/config/ConfigurationUtils.java | 11 |
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; } |