Revxrsal / Lamp

A powerful, extendable, flexible yet simple to use commands annotation framework.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

@Optional or @Default not working correctly together @Flag

bivashy opened this issue · comments

When we are defining @optional and @Flag at the same time, value of parameter will be <?null>
Example command:

@Command("test")
public class TestCommand {
    @DefaultFor("test")
    public void onDefault(String first, @Flag("second") @Optional String second) {
        System.out.println(first);
        System.out.println(second);
    }
}

When we execute /test 1 It`ll print out:

1
<?null>

(Second value is plain String)

commented

Fixed in 1521253