aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDan Timoney <dtimoney@att.com>2018-11-30 23:15:57 +0000
committerGerrit Code Review <gerrit@onap.org>2018-11-30 23:15:57 +0000
commit89d5d1270bfb07eacba1591d2e0f034ad6bff5ee (patch)
tree5c5439db7f9c9661a65c9b4c1b1f4f88cdb8ef17
parent72878d5a7aa2e830e4c08743005dc00613d26938 (diff)
parent959f2e22cf3f794e040dde4d687712cfefd3b00a (diff)
Merge "Fixed Sonar issue in BaseDBConfiguration.java"
-rwxr-xr-xdblib/provider/src/main/java/org/onap/ccsdk/sli/core/dblib/config/BaseDBConfiguration.java9
1 files changed, 7 insertions, 2 deletions
diff --git a/dblib/provider/src/main/java/org/onap/ccsdk/sli/core/dblib/config/BaseDBConfiguration.java b/dblib/provider/src/main/java/org/onap/ccsdk/sli/core/dblib/config/BaseDBConfiguration.java
index a8bc58b8..5f0209b6 100755
--- a/dblib/provider/src/main/java/org/onap/ccsdk/sli/core/dblib/config/BaseDBConfiguration.java
+++ b/dblib/provider/src/main/java/org/onap/ccsdk/sli/core/dblib/config/BaseDBConfiguration.java
@@ -3,6 +3,7 @@
* onap
* ================================================================================
* Copyright (C) 2016 - 2017 ONAP
+ * Modifications Copyright (C) 2018 IBM.
* ================================================================================
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -21,12 +22,14 @@
package org.onap.ccsdk.sli.core.dblib.config;
import java.util.Properties;
-
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
/**
* Base class responsible for parsing business logic for database configuration from given <code>Properties</code>.
*/
public abstract class BaseDBConfiguration {
+ private Logger logger = LoggerFactory.getLogger(BaseDBConfiguration.class);
/**
* Property key within a properties configuration File for db type
*/
@@ -45,7 +48,7 @@ public abstract class BaseDBConfiguration {
/**
* Property key with a properties configuration File for jdbc driver
*/
- public static final String DRIVER_NAME = "org.onap.ccsdk.sli.jdbc.driver";
+ public static final String DRIVER_NAME = "org.onap.ccsdk.sli.jdbc.driver";
/**
* Property key with a properties configuration File for db database connection name
@@ -131,6 +134,7 @@ public abstract class BaseDBConfiguration {
String value = properties.getProperty(CONNECTION_TIMEOUT, DEFAULT_REJECT_CHANGE_VALUE);
return Integer.parseInt(value);
} catch (Exception exc) {
+ logger.error("Exception",exc);
return Integer.parseInt(DEFAULT_REJECT_CHANGE_VALUE);
}
}
@@ -146,6 +150,7 @@ public abstract class BaseDBConfiguration {
String value = properties.getProperty(REQUEST_TIMEOUT, DEFAULT_REJECT_CHANGE_VALUE);
return Integer.parseInt(value);
} catch (Exception exc) {
+ logger.error("Exception",exc);
return Integer.parseInt(DEFAULT_REJECT_CHANGE_VALUE);
}
}