summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/main/java/io/swagger/api/impl/DcaeServicesApiServiceImpl.java2
-rw-r--r--src/main/java/org/onap/dcae/inventory/daos/DCAEServicesComponentsMapsDAO.java1
-rw-r--r--src/main/java/org/onap/dcae/inventory/dbthings/StringListArgument.java16
3 files changed, 9 insertions, 10 deletions
diff --git a/src/main/java/io/swagger/api/impl/DcaeServicesApiServiceImpl.java b/src/main/java/io/swagger/api/impl/DcaeServicesApiServiceImpl.java
index df1207a..f1219ac 100644
--- a/src/main/java/io/swagger/api/impl/DcaeServicesApiServiceImpl.java
+++ b/src/main/java/io/swagger/api/impl/DcaeServicesApiServiceImpl.java
@@ -302,7 +302,7 @@ public class DcaeServicesApiServiceImpl extends DcaeServicesApiService {
// Watch! We have to query for services regardless of status because we need to account for "removed" instances
// that get resurrected.
final DCAEServiceObject serviceObjectFromStore = servicesDAO.getByServiceId(serviceId);
- final Map<String, DCAEServiceComponentObject> componentObjectsFromStore = new HashMap<String, DCAEServiceComponentObject>();
+ final Map<String, DCAEServiceComponentObject> componentObjectsFromStore = new HashMap<>();
for (DCAEServiceComponentObject componentObject : componentsDAO.getByServiceId(serviceId)) {
componentObjectsFromStore.put(componentObject.getComponentId(), componentObject);
diff --git a/src/main/java/org/onap/dcae/inventory/daos/DCAEServicesComponentsMapsDAO.java b/src/main/java/org/onap/dcae/inventory/daos/DCAEServicesComponentsMapsDAO.java
index c9eaa99..270d638 100644
--- a/src/main/java/org/onap/dcae/inventory/daos/DCAEServicesComponentsMapsDAO.java
+++ b/src/main/java/org/onap/dcae/inventory/daos/DCAEServicesComponentsMapsDAO.java
@@ -34,6 +34,7 @@ import org.skife.jdbi.v2.sqlobject.SqlUpdate;
public interface DCAEServicesComponentsMapsDAO extends InventoryDAO {
@SqlQuery("select exists (select * from information_schema.tables where table_name = \'dcae_services_components_maps\')")
+ @Override
Boolean checkIfTableExists();
@Override
diff --git a/src/main/java/org/onap/dcae/inventory/dbthings/StringListArgument.java b/src/main/java/org/onap/dcae/inventory/dbthings/StringListArgument.java
index b08bec1..2e70550 100644
--- a/src/main/java/org/onap/dcae/inventory/dbthings/StringListArgument.java
+++ b/src/main/java/org/onap/dcae/inventory/dbthings/StringListArgument.java
@@ -44,14 +44,12 @@ public class StringListArgument implements ArgumentFactory<List<String>> {
}
@Override
- public Argument build(Class<?> expectedType, List<String> value, StatementContext statementContext) {
- return new Argument() {
- @Override
- public void apply(int position, PreparedStatement statement, StatementContext ctx) throws SQLException {
- Array values = statement.getConnection().createArrayOf("varchar", value.toArray());
- statement.setArray(position, values);
- }
- };
- }
+ public Argument build(Class<?> expectedType, List<String> value, StatementContext statementContext) {
+ Argument argument = (int position, PreparedStatement statement, StatementContext ctx) -> {
+ Array values = statement.getConnection().createArrayOf("varchar", value.toArray());
+ statement.setArray(position, values);
+ };
+ return argument;
+ }
}