remkop / picocli

Picocli is a modern framework for building powerful, user-friendly, GraalVM-enabled command line apps with ease. It supports colors, autocompletion, subcommands, and more. In 1 source file so apps can include as source & avoid adding a dependency. Written in Java, usable from Groovy, Kotlin, Scala, etc.

Home Page:https://picocli.info

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

PicocliCommands.java:283: error: [Overrides] Varargs doesn't agree for overridden method

vorburger opened this issue · comments

This is similar-ish to #2053, and related to #2054:

I'm (working in an internal environment where we are) running https://errorprone.info/ on this project, and it has found another bug:

third_party/java_src/picocli/picocli-shell-jline3/src/main/java/picocli/shell/jline3/PicocliCommands.java:283: error: [Overrides] Varargs doesn't agree for overridden method
    public Object invoke(CommandRegistry.CommandSession session, String command, Object[] args) throws Exception {
                  ^
    (see http://go/bugpattern/Overrides)
  Did you mean 'public Object invoke(CommandRegistry.CommandSession session, String command, Object... args) throws Exception {'?

I'll directly raise a PR to fix this, as it's trivial.

@cushon FYI