Skip to content

Commit

Permalink
Use ... vararg instead of array parameter to match overridden method …
Browse files Browse the repository at this point in the history
…signature (fixes #2169)
  • Loading branch information
vorburger authored and remkop committed Dec 16, 2023
1 parent 6a575aa commit e6236f2
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -280,7 +280,7 @@ public List<String> commandInfo(String command) {

// For JLine >= 3.16.0
@Override
public Object invoke(CommandRegistry.CommandSession session, String command, Object[] args) throws Exception {
public Object invoke(CommandRegistry.CommandSession session, String command, Object... args) throws Exception {
List<String> arguments = new ArrayList<>();
arguments.add( command );
arguments.addAll( Arrays.stream( args ).map( Object::toString ).collect( Collectors.toList() ) );
Expand Down

0 comments on commit e6236f2

Please sign in to comment.