diff options
Diffstat (limited to 'src')
3 files changed, 10 insertions, 11 deletions
diff --git a/src/main/java/io/swagger/api/impl/DcaeServicesApiServiceImpl.java b/src/main/java/io/swagger/api/impl/DcaeServicesApiServiceImpl.java index 65c9d4f..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); @@ -333,7 +333,7 @@ public class DcaeServicesApiServiceImpl extends DcaeServicesApiService { // 2) Insert/update DCAEServiceComponentObjects. Components exist independent of the associated DCAE service. - Map<String, DCAEServiceComponentObject> componentObjectsToSendBack = new HashMap<String, DCAEServiceComponentObject>(); + Map<String, DCAEServiceComponentObject> componentObjectsToSendBack = new HashMap<>(); for (DCAEServiceComponentRequest requestComponent : request.getComponents()) { // Have to query the database rather than checking the result of getting by service id because of the 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; + } } |