mirror of
https://github.com/google/nomulus.git
synced 2025-05-14 00:17:20 +02:00
Inline calls to get command from jcommander
------------- Created by MOE: https://github.com/google/moe MOE_MIGRATED_REVID=191338771
This commit is contained in:
parent
18290911a0
commit
3dff2ba4c7
1 changed files with 4 additions and 2 deletions
|
@ -131,8 +131,10 @@ final class RegistryCli implements AutoCloseable, CommandRunner {
|
|||
// JCommander stores sub-commands as nested JCommander objects containing a list of user objects
|
||||
// to be populated. Extract the subcommand by getting the JCommander wrapper and then
|
||||
// retrieving the first (and, by virtue of our usage, only) object from it.
|
||||
JCommander jcCommand = jcommander.getCommands().get(jcommander.getParsedCommand());
|
||||
Command command = (Command) Iterables.getOnlyElement(jcCommand.getObjects());
|
||||
Command command =
|
||||
(Command)
|
||||
Iterables.getOnlyElement(
|
||||
jcommander.getCommands().get(jcommander.getParsedCommand()).getObjects());
|
||||
loggingParams.configureLogging(); // Must be called after parameters are parsed.
|
||||
|
||||
try {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue