summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorojasdubey <ojas.dubey@amdocs.com>2017-12-27 20:30:32 +0530
committerVitaly Emporopulo <Vitaliy.Emporopulo@amdocs.com>2017-12-27 15:46:14 +0000
commit36ff5bfad0c762b65013a9ff1074b37f8306aff9 (patch)
treed411a219e47b772d263363ef07c0d05162df3adf
parent41d4138163cdda10ff298d7ff3eebf885221b0c3 (diff)
Fix Sonar violations - ConfigurationDataSource
1. Fixed major sonar violations configuration management core - ConfigurationDataSource Change-Id: Iee96111b3051a67d25f99a0ba49e99f4d9290345 Issue-ID: SDC-343 Signed-off-by: ojasdubey <ojas.dubey@amdocs.com>
-rw-r--r--common/openecomp-common-configuration-management/openecomp-configuration-management-core/src/main/java/org/openecomp/config/impl/ConfigurationDataSource.java8
1 files changed, 6 insertions, 2 deletions
diff --git a/common/openecomp-common-configuration-management/openecomp-configuration-management-core/src/main/java/org/openecomp/config/impl/ConfigurationDataSource.java b/common/openecomp-common-configuration-management/openecomp-configuration-management-core/src/main/java/org/openecomp/config/impl/ConfigurationDataSource.java
index 0cfc96bc7f..a60403e4dc 100644
--- a/common/openecomp-common-configuration-management/openecomp-configuration-management-core/src/main/java/org/openecomp/config/impl/ConfigurationDataSource.java
+++ b/common/openecomp-common-configuration-management/openecomp-configuration-management-core/src/main/java/org/openecomp/config/impl/ConfigurationDataSource.java
@@ -22,11 +22,16 @@ public final class ConfigurationDataSource {
private static Set<String> validCallers = Collections.unmodifiableSet(new HashSet<>(
Arrays.asList(ConfigurationUtils.class.getName(), CliConfigurationImpl.class.getName())));
+ private ConfigurationDataSource() {
+ //Hide constructor to prevent instantiation using the default implicit constructor
+ }
+
static {
try {
configDBDatasource = initDataSource();
} catch (Exception exception) {
- System.err.println("Datasource initialization error. Configuration management will be using in-memory persistence.");
+ System.err.println("Datasource initialization error. Configuration management will be using"
+ + "in-memory persistence.");
}
}
@@ -83,7 +88,6 @@ public final class ConfigurationDataSource {
Driver driver = Driver.class.cast(Class.forName(driverClassName).newInstance());
return driver.acceptsURL(url);
} catch (Exception exception) {
- exception.printStackTrace();
return false;
}
}