diff options
author | Tony Hansen <tony@att.com> | 2018-02-07 15:30:38 +0000 |
---|---|---|
committer | Gerrit Code Review <gerrit@onap.org> | 2018-02-07 15:30:38 +0000 |
commit | ccdf2cde00a720325973e12f6a0fbed3bf51dfde (patch) | |
tree | a0f1cd3b4cb547a6f3ae2f5322358e3210362d0d /src/main | |
parent | 06ec2b0458b49a33beb44c27a35394abdd4ff9ed (diff) | |
parent | c7a371db4e3c52f56a4c8d30169e7b60ce032918 (diff) |
Merge "Sonar Major fix"
Diffstat (limited to 'src/main')
-rw-r--r-- | src/main/java/org/onap/dcae/inventory/dbthings/StringListArgument.java | 16 |
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; + } } |