public CliBuilder<C> withCommands(Class<? extends C> command, Class<? extends C>... moreCommands);
public GroupBuilder<C> withCommands(Class<? extends C> command, Class<? extends C>... moreCommands)
Both of them use the moreCommands array in a typesafe way, which means
they could be annotated with @SafeVarargs. They were not, though, which
generates unchecked warnings at call sites.
Note that the methods must be made final for SafeVarargs to be valid.
Summary:
Cli.CliBuilder and Cli.GroupBuilder have
Both of them use the
moreCommands
array in a typesafe way, which means they could be annotated with @SafeVarargs. They were not, though, which generates unchecked warnings at call sites.Note that the methods must be made final for SafeVarargs to be valid.
A description of SafeVarargs is https://docs.oracle.com/javase/specs/jls/se8/html/jls-9.html#jls-9.6.4.7
Test plan:
mvn clean verify
passes on 8u141