diff options
author | Pooja03 <PM00501616@techmahindra.com> | 2018-02-12 16:32:19 +0530 |
---|---|---|
committer | Pooja03 <PM00501616@techmahindra.com> | 2018-02-12 16:32:19 +0530 |
commit | a2d1d5113dece9e3a2257d418ce12d83b2d1d71a (patch) | |
tree | ec251e9e87f1cc6a439cd6f3e6aadccdfdb79b4b /src | |
parent | 95605469a2b195e6357b613fda04677aace55009 (diff) |
Sonar Minor fix
return the expression instead of assigning it to the temporary variable argument
Sonar Link:https://sonar.onap.org/project/issues?assignees=Pooja03&id=org.onap.dcaegen2.platform%3Ainventory-api&open=AWGBruv68TZzbCgU6dMs&resolved=false
Location:StringListArgument.java:L51
Change-Id: Ia53255061c794925b95742a8d167943a0cb7caf9
Issue-ID: DCAEGEN2-329
Signed-off-by: Pooja03 <PM00501616@techmahindra.com>
Diffstat (limited to 'src')
-rw-r--r-- | src/main/java/org/onap/dcae/inventory/dbthings/StringListArgument.java | 4 |
1 files changed, 2 insertions, 2 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 2e70550..aa41ac6 100644 --- a/src/main/java/org/onap/dcae/inventory/dbthings/StringListArgument.java +++ b/src/main/java/org/onap/dcae/inventory/dbthings/StringListArgument.java @@ -45,11 +45,11 @@ public class StringListArgument implements ArgumentFactory<List<String>> { @Override public Argument build(Class<?> expectedType, List<String> value, StatementContext statementContext) { - Argument argument = (int position, PreparedStatement statement, StatementContext ctx) -> { + return (int position, PreparedStatement statement, StatementContext ctx) -> { Array values = statement.getConnection().createArrayOf("varchar", value.toArray()); statement.setArray(position, values); }; - return argument; + } } |