mirror of
https://github.com/google/nomulus.git
synced 2025-05-13 16:07:15 +02:00
Use getDeclaredConstructor() so exception checking isn't bypassed
------------- Created by MOE: https://github.com/google/moe MOE_MIGRATED_REVID=173412751
This commit is contained in:
parent
113c5af2a5
commit
ec5c9e4474
1 changed files with 1 additions and 1 deletions
|
@ -79,7 +79,7 @@ final class RegistryCli {
|
|||
commandInstances.put("help", helpCommand);
|
||||
|
||||
for (Map.Entry<String, ? extends Class<? extends Command>> entry : commands.entrySet()) {
|
||||
Command command = entry.getValue().newInstance();
|
||||
Command command = entry.getValue().getDeclaredConstructor().newInstance();
|
||||
jcommander.addCommand(entry.getKey(), command);
|
||||
commandInstances.put(entry.getKey(), command);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue