airlift / airline

Java annotation-based framework for parsing Git like command line structures
Apache License 2.0
846 stars 141 forks source link

Cli.commandFactory is never used? #75

Open mayanjun opened 3 years ago

mayanjun commented 3 years ago

The member variable Cli.commandFactory is never used? Generally, user call the method Cli.parse(String ...), the CommandFactory instance that installed by Cli.CliBuilder.withCommandFactory(factory) should be used instead of create a new one.

Another optimization point is that you don't have to create a new CommandFactory object every time it's called,CommandFactory instance can be created once on the calling of Cli.CliBuilder.build().