Skip to content

Commit

Permalink
Add @SafeVarargs annotation to CliBuilder and GroupBuilder
Browse files Browse the repository at this point in the history
  • Loading branch information
jesboat authored and electrum committed Aug 28, 2017
1 parent cb86b26 commit e443d0c
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/main/java/io/airlift/airline/Cli.java
Original file line number Diff line number Diff line change
Expand Up @@ -264,7 +264,8 @@ public CliBuilder<C> withCommand(Class<? extends C> command)
return this;
}

public CliBuilder<C> withCommands(Class<? extends C> command, Class<? extends C>... moreCommands)
@SafeVarargs
public final CliBuilder<C> withCommands(Class<? extends C> command, Class<? extends C>... moreCommands)
{
this.defaultCommandGroupCommands.add(command);
this.defaultCommandGroupCommands.addAll(ImmutableList.copyOf(moreCommands));
Expand Down Expand Up @@ -335,7 +336,8 @@ public GroupBuilder<C> withCommand(Class<? extends C> command)
return this;
}

public GroupBuilder<C> withCommands(Class<? extends C> command, Class<? extends C>... moreCommands)
@SafeVarargs
public final GroupBuilder<C> withCommands(Class<? extends C> command, Class<? extends C>... moreCommands)
{
this.commands.add(command);
this.commands.addAll(ImmutableList.copyOf(moreCommands));
Expand Down

0 comments on commit e443d0c

Please sign in to comment.