mirror of
https://github.com/google/nomulus.git
synced 2025-07-19 17:26:09 +02: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:
parent
df7d272157
commit
bba5aff4b6
4 changed files with 36 additions and 4 deletions
|
@ -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();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue