mirror of
https://github.com/google/nomulus
synced 2026-04-25 02:30:45 +00:00
Verify RegistryTool can instantiate (#400)
* Verify RegistryTool can instantiate Add a task that instantiates all command classes in RegistryTool with runtimeClasspath. Also make sure that runtimeClasspath is a superset of compileClasspath.
This commit is contained in:
@@ -104,6 +104,8 @@ final class RegistryCli implements AutoCloseable, CommandRunner {
|
||||
// Create all command instances. It would be preferrable to do this in the constructor, but
|
||||
// JCommander mutates the command instances and doesn't reset them so we have to do it for every
|
||||
// run.
|
||||
// TODO(weiminyu): extract this into a standalone static method to simplify
|
||||
// :core:registryToolIntegrationTest
|
||||
try {
|
||||
for (Map.Entry<String, ? extends Class<? extends Command>> entry : commands.entrySet()) {
|
||||
Command command = entry.getValue().getDeclaredConstructor().newInstance();
|
||||
|
||||
Reference in New Issue
Block a user