aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/main/java/io/swagger/api/Bootstrap.java3
-rw-r--r--src/main/java/io/swagger/api/impl/DcaeServiceTypesApiServiceImpl.java2
-rw-r--r--src/main/java/io/swagger/api/impl/DcaeServicesApiServiceImpl.java4
-rw-r--r--src/main/java/org/onap/dcae/inventory/clients/DatabusControllerClient.java2
-rw-r--r--src/main/java/org/onap/dcae/inventory/daos/DCAEServiceComponentsDAO.java2
5 files changed, 7 insertions, 6 deletions
diff --git a/src/main/java/io/swagger/api/Bootstrap.java b/src/main/java/io/swagger/api/Bootstrap.java
index 2d71ecb..24f4583 100644
--- a/src/main/java/io/swagger/api/Bootstrap.java
+++ b/src/main/java/io/swagger/api/Bootstrap.java
@@ -26,7 +26,6 @@ import io.swagger.models.*;
import io.swagger.models.auth.*;
import javax.servlet.http.HttpServlet;
-import javax.servlet.ServletContext;
import javax.servlet.ServletConfig;
import javax.servlet.ServletException;
@@ -43,7 +42,7 @@ public class Bootstrap extends HttpServlet {
.name("")
.url(""));
- ServletContext context = config.getServletContext();
+
Swagger swagger = new Swagger().info(info);
new SwaggerContextService().withServletConfig(config).updateSwagger(swagger);
diff --git a/src/main/java/io/swagger/api/impl/DcaeServiceTypesApiServiceImpl.java b/src/main/java/io/swagger/api/impl/DcaeServiceTypesApiServiceImpl.java
index 696cd87..b478edf 100644
--- a/src/main/java/io/swagger/api/impl/DcaeServiceTypesApiServiceImpl.java
+++ b/src/main/java/io/swagger/api/impl/DcaeServiceTypesApiServiceImpl.java
@@ -93,7 +93,7 @@ public class DcaeServiceTypesApiServiceImpl extends DcaeServiceTypesApiService {
sb.append("dcae_service_types");
}
- List<String> whereClauses = new ArrayList<String>();
+ List<String> whereClauses = new ArrayList<>();
if (typeName != null) {
whereClauses.add(":typeName = type_name");
diff --git a/src/main/java/io/swagger/api/impl/DcaeServicesApiServiceImpl.java b/src/main/java/io/swagger/api/impl/DcaeServicesApiServiceImpl.java
index bc1888f..d0c528f 100644
--- a/src/main/java/io/swagger/api/impl/DcaeServicesApiServiceImpl.java
+++ b/src/main/java/io/swagger/api/impl/DcaeServicesApiServiceImpl.java
@@ -136,7 +136,7 @@ public class DcaeServicesApiServiceImpl extends DcaeServicesApiService {
String componentType, Boolean shareable, DateTime created, Integer offset,
UriInfo uriInfo, SecurityContext securityContext) {
List<DCAEServiceObject> serviceObjects = new ArrayList<>();
- DateTime createdCutoff = (created == null ? DateTime.now(DateTimeZone.UTC) : created);
+ DateTime createdCutoff = created == null ? DateTime.now(DateTimeZone.UTC) : created;
LOG.info(String.format("Create time upper bound cutoff: %s", createdCutoff.toString()));
@@ -211,7 +211,7 @@ public class DcaeServicesApiServiceImpl extends DcaeServicesApiService {
if (shareable != null) {
// NOTE: That the shareable field in the database is actually an integer.
- query.bind("shareable", (shareable ? 1 : 0));
+ query.bind("shareable", shareable ? 1 : 0);
}
query.bind("createdCutoff", createdCutoff);
diff --git a/src/main/java/org/onap/dcae/inventory/clients/DatabusControllerClient.java b/src/main/java/org/onap/dcae/inventory/clients/DatabusControllerClient.java
index 29330b0..b2429d9 100644
--- a/src/main/java/org/onap/dcae/inventory/clients/DatabusControllerClient.java
+++ b/src/main/java/org/onap/dcae/inventory/clients/DatabusControllerClient.java
@@ -48,7 +48,7 @@ public class DatabusControllerClient {
resourcePath = (new StringBuilder("/")).append(resourcePath).toString();
}
- return UriBuilder.fromPath(resourcePath.toString()).scheme("https").host(this.connectionConfiguration.getHost())
+ return UriBuilder.fromPath(resourcePath).scheme("https").host(this.connectionConfiguration.getHost())
.port(this.connectionConfiguration.getPort()).build();
}
diff --git a/src/main/java/org/onap/dcae/inventory/daos/DCAEServiceComponentsDAO.java b/src/main/java/org/onap/dcae/inventory/daos/DCAEServiceComponentsDAO.java
index a2d70d0..dff68df 100644
--- a/src/main/java/org/onap/dcae/inventory/daos/DCAEServiceComponentsDAO.java
+++ b/src/main/java/org/onap/dcae/inventory/daos/DCAEServiceComponentsDAO.java
@@ -35,9 +35,11 @@ import java.util.List;
*/
public interface DCAEServiceComponentsDAO extends InventoryDAO {
+ @Override
@SqlQuery("select exists (select * from information_schema.tables where table_name = \'dcae_service_components\')")
Boolean checkIfTableExists();
+ @Override
@SqlUpdate("create table dcae_service_components (component_id varchar not null primary key, component_type varchar not null, " +
"component_source varchar not null, shareable integer default 0, created timestamp not null, modified timestamp not null)")
void createTable();