summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/main/java/io/swagger/api/impl/DcaeServiceTypesApiServiceImpl.java1
-rw-r--r--src/main/java/org/onap/dcae/inventory/daos/InventoryDAOManager.java10
2 files changed, 5 insertions, 6 deletions
diff --git a/src/main/java/io/swagger/api/impl/DcaeServiceTypesApiServiceImpl.java b/src/main/java/io/swagger/api/impl/DcaeServiceTypesApiServiceImpl.java
index fc6509a..133f28d 100644
--- a/src/main/java/io/swagger/api/impl/DcaeServiceTypesApiServiceImpl.java
+++ b/src/main/java/io/swagger/api/impl/DcaeServiceTypesApiServiceImpl.java
@@ -42,7 +42,6 @@ import javax.ws.rs.core.SecurityContext;
import javax.ws.rs.core.UriInfo;
import java.util.ArrayList;
import java.util.List;
-import java.util.Locale;
import java.util.UUID;
@javax.annotation.Generated(value = "class io.swagger.codegen.languages.JavaJerseyServerCodegen", date = "2016-04-18T20:16:22.119Z")
diff --git a/src/main/java/org/onap/dcae/inventory/daos/InventoryDAOManager.java b/src/main/java/org/onap/dcae/inventory/daos/InventoryDAOManager.java
index 2bd17bf..dbdf546 100644
--- a/src/main/java/org/onap/dcae/inventory/daos/InventoryDAOManager.java
+++ b/src/main/java/org/onap/dcae/inventory/daos/InventoryDAOManager.java
@@ -98,11 +98,11 @@ public final class InventoryDAOManager {
*/
public void initialize() {
final DBIFactory factory = new DBIFactory();
- final DBI jdbi = factory.build(this.environment, this.configuration.getDataSourceFactory(), "dcae-database");
- jdbi.registerArgumentFactory(new StringListArgument());
+ final DBI jdbi_local = factory.build(this.environment, this.configuration.getDataSourceFactory(), "dcae-database");
+ jdbi_local.registerArgumentFactory(new StringListArgument());
for (Class<? extends InventoryDAO> daoClass : DAO_CLASSES) {
- final InventoryDAO dao = jdbi.onDemand(daoClass);
+ final InventoryDAO dao = jdbi_local.onDemand(daoClass);
if (dao.checkIfTableExists()) {
LOG.info(String.format("Sql table exists: %s", daoClass.getSimpleName()));
@@ -114,7 +114,7 @@ public final class InventoryDAOManager {
// CREATE VIEWS
// TODO: This doesn't belong here and is not consistent with the above approach. Make it better.
- try (Handle jdbiHandle = jdbi.open()) {
+ try (Handle jdbiHandle = jdbi_local.open()) {
String viewName = "dcae_service_types_latest";
String checkQuery = String.format("select exists (select * from information_schema.tables where table_name = '%s')",
viewName);
@@ -135,7 +135,7 @@ public final class InventoryDAOManager {
}
// Do this assignment at the end after performing table checks to ensure that connection is good
- this.jdbi = jdbi;
+ this.jdbi = jdbi_local;
}
private InventoryDAO getDAO(Class<? extends InventoryDAO> klass) {