summaryrefslogtreecommitdiffstats
path: root/src/main/java
diff options
context:
space:
mode:
authorTony Hansen <tony@att.com>2018-02-07 15:30:38 +0000
committerGerrit Code Review <gerrit@onap.org>2018-02-07 15:30:38 +0000
commitccdf2cde00a720325973e12f6a0fbed3bf51dfde (patch)
treea0f1cd3b4cb547a6f3ae2f5322358e3210362d0d /src/main/java
parent06ec2b0458b49a33beb44c27a35394abdd4ff9ed (diff)
parentc7a371db4e3c52f56a4c8d30169e7b60ce032918 (diff)
Merge "Sonar Major fix"
Diffstat (limited to 'src/main/java')
-rw-r--r--src/main/java/org/onap/dcae/inventory/dbthings/StringListArgument.java16
1 files changed, 7 insertions, 9 deletions
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;
+ }
}