Skip to content

Commit

Permalink
Simplify list addition
Browse files Browse the repository at this point in the history
  • Loading branch information
xiazcy committed Nov 27, 2023
1 parent cccdb7b commit 4c65861
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -168,7 +168,7 @@ else if (stepMethod.getName().equals("to") || stepMethod.getName().equals("from"
}
// remove duplicates in argument[1] if any
arguments[1] = Arrays.stream((String[]) arguments[1]).distinct().toArray(String[]::new);
list.addAll(Arrays.stream((String[]) arguments[1]).collect(Collectors.toList()));
list.addAll(Arrays.asList((String[]) arguments[1]));
} else {
for (int i = 0; i < stepMethod.getParameterTypes().length; i++) {
final Class<?> type = stepMethod.getParameterTypes()[i];
Expand Down

0 comments on commit 4c65861

Please sign in to comment.