summaryrefslogtreecommitdiffstats
path: root/common/openecomp-common-configuration-management
diff options
context:
space:
mode:
Diffstat (limited to 'common/openecomp-common-configuration-management')
-rw-r--r--common/openecomp-common-configuration-management/openecomp-configuration-management-core/pom.xml54
-rw-r--r--common/openecomp-common-configuration-management/openecomp-configuration-management-core/src/main/java/org/openecomp/config/ConfigurationUtils.java11
2 files changed, 35 insertions, 30 deletions
diff --git a/common/openecomp-common-configuration-management/openecomp-configuration-management-core/pom.xml b/common/openecomp-common-configuration-management/openecomp-configuration-management-core/pom.xml
index 609e8abdf7..186a50849a 100644
--- a/common/openecomp-common-configuration-management/openecomp-configuration-management-core/pom.xml
+++ b/common/openecomp-common-configuration-management/openecomp-configuration-management-core/pom.xml
@@ -24,62 +24,62 @@
<artifactId>jackson-dataformat-yaml</artifactId>
<version>${jackson.version}</version>
</dependency>
- <dependency>
+ <dependency>
<groupId>org.apache.commons</groupId>
<artifactId>commons-configuration2</artifactId>
<version>2.1</version>
</dependency>
- <dependency>
+ <dependency>
<groupId>commons-logging</groupId>
<artifactId>commons-logging</artifactId>
<version>1.2</version>
</dependency>
- <dependency>
+ <dependency>
<groupId>commons-beanutils</groupId>
<artifactId>commons-beanutils</artifactId>
<version>${commons.beanutils.version}</version>
</dependency>
- <dependency>
+ <dependency>
<groupId>org.apache.commons</groupId>
<artifactId>commons-lang3</artifactId>
<version>3.3.2</version>
</dependency>
- <dependency>
+ <dependency>
<groupId>com.github.adejanovski</groupId>
<artifactId>cassandra-jdbc-wrapper</artifactId>
<version>${cassandra.version}</version>
</dependency>
- <dependency>
+ <dependency>
<groupId>org.apache.commons</groupId>
<artifactId>commons-dbcp2</artifactId>
<version>2.0</version>
</dependency>
- <dependency>
+ <dependency>
<groupId>org.apache.commons</groupId>
<artifactId>commons-pool2</artifactId>
<version>2.4.2</version>
</dependency>
- <dependency>
+ <dependency>
<groupId>commons-io</groupId>
<artifactId>commons-io</artifactId>
<version>${commons.io.version}</version>
</dependency>
- <dependency>
+ <dependency>
<groupId>net.sf.corn</groupId>
<artifactId>corn-cps</artifactId>
<version>1.1.7</version>
<exclusions>
- <exclusion>
- <groupId>com.sun</groupId>
- <artifactId>tools</artifactId>
- </exclusion>
- </exclusions>
+ <exclusion>
+ <groupId>com.sun</groupId>
+ <artifactId>tools</artifactId>
+ </exclusion>
+ </exclusions>
</dependency>
<dependency>
- <groupId>com.virtlink.commons</groupId>
- <artifactId>commons-configuration2-jackson</artifactId>
- <version>0.6.1</version>
- </dependency>
+ <groupId>com.virtlink.commons</groupId>
+ <artifactId>commons-configuration2-jackson</artifactId>
+ <version>0.6.1</version>
+ </dependency>
<dependency>
<groupId>org.apache.logging.log4j</groupId>
<artifactId>log4j-core</artifactId>
@@ -95,16 +95,16 @@
<artifactId>slf4j-log4j12</artifactId>
<version>${slf4j.version}</version>
</dependency>
- <dependency>
- <groupId>org.slf4j</groupId>
- <artifactId>slf4j-ext</artifactId>
- <version>${slf4j.version}</version>
- </dependency>
<dependency>
- <groupId>org.openecomp.sdc.common</groupId>
- <artifactId>openecomp-configuration-management-api</artifactId>
- <version>1.1.0-SNAPSHOT</version>
- </dependency>
+ <groupId>org.slf4j</groupId>
+ <artifactId>slf4j-ext</artifactId>
+ <version>${slf4j.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.openecomp.sdc.common</groupId>
+ <artifactId>openecomp-configuration-management-api</artifactId>
+ <version>1.1.0-SNAPSHOT</version>
+ </dependency>
<dependency>
<groupId>javax.servlet</groupId>
<artifactId>javax.servlet-api</artifactId>
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;
}