mirror of
https://github.com/google/nomulus
synced 2026-01-10 07:57:58 +00: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:
@@ -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);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user