From ec5c9e4474caaf2065e7aa5a55eb7e4893058f90 Mon Sep 17 00:00:00 2001 From: mcilwain Date: Wed, 25 Oct 2017 10:08:46 -0700 Subject: [PATCH] Use getDeclaredConstructor() so exception checking isn't bypassed ------------- Created by MOE: https://github.com/google/moe MOE_MIGRATED_REVID=173412751 --- java/google/registry/tools/RegistryCli.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/java/google/registry/tools/RegistryCli.java b/java/google/registry/tools/RegistryCli.java index 0a7bc0f49..71a43b917 100644 --- a/java/google/registry/tools/RegistryCli.java +++ b/java/google/registry/tools/RegistryCli.java @@ -79,7 +79,7 @@ final class RegistryCli { commandInstances.put("help", helpCommand); for (Map.Entry> entry : commands.entrySet()) { - Command command = entry.getValue().newInstance(); + Command command = entry.getValue().getDeclaredConstructor().newInstance(); jcommander.addCommand(entry.getKey(), command); commandInstances.put(entry.getKey(), command); }