Rename Command.inherits to Command.inheritsOptionsFrom This is to avoid confusion that it inherits other metadata. PiperOrigin-RevId: 644947040 Change-Id: I2911d81bb7cca40ea9bdca4855a02a403d18c6a1
diff --git a/src/test/java/com/google/devtools/build/lib/runtime/AbstractCommandTest.java b/src/test/java/com/google/devtools/build/lib/runtime/AbstractCommandTest.java index d1dea1b..867d0df 100644 --- a/src/test/java/com/google/devtools/build/lib/runtime/AbstractCommandTest.java +++ b/src/test/java/com/google/devtools/build/lib/runtime/AbstractCommandTest.java
@@ -110,8 +110,12 @@ @Command(name = "a", options = {FooOptions.class}, shortDescription = "", help = "") private static class CommandA extends ConcreteCommand {} - @Command(name = "b", options = {BarOptions.class}, inherits = {CommandA.class}, - shortDescription = "", help = "") + @Command( + name = "b", + options = {BarOptions.class}, + inheritsOptionsFrom = {CommandA.class}, + shortDescription = "", + help = "") private static class CommandB extends ConcreteCommand {} @Test
diff --git a/src/test/java/com/google/devtools/build/lib/runtime/BlazeCommandDispatcherRcoptionsTest.java b/src/test/java/com/google/devtools/build/lib/runtime/BlazeCommandDispatcherRcoptionsTest.java index 77e8e9f..024bff2 100644 --- a/src/test/java/com/google/devtools/build/lib/runtime/BlazeCommandDispatcherRcoptionsTest.java +++ b/src/test/java/com/google/devtools/build/lib/runtime/BlazeCommandDispatcherRcoptionsTest.java
@@ -101,7 +101,7 @@ options = {FooOptions.class}, shortDescription = "", help = "", - inherits = ReportAllCommand.class) + inheritsOptionsFrom = ReportAllCommand.class) private static class ReportAllInheritedCommand extends ReportAllCommand {} private final Scratch scratch = new Scratch();
diff --git a/src/test/java/com/google/devtools/build/lib/runtime/BlazeCommandDispatcherTest.java b/src/test/java/com/google/devtools/build/lib/runtime/BlazeCommandDispatcherTest.java index a8eb0a3..addf2d6 100644 --- a/src/test/java/com/google/devtools/build/lib/runtime/BlazeCommandDispatcherTest.java +++ b/src/test/java/com/google/devtools/build/lib/runtime/BlazeCommandDispatcherTest.java
@@ -578,7 +578,11 @@ assertThat(result.getExitCode()).isEqualTo(ExitCode.COMMAND_LINE_ERROR); } - @Command(name = "wiz", inherits = {FooCommand.class}, shortDescription = "", help = "") + @Command( + name = "wiz", + inheritsOptionsFrom = {FooCommand.class}, + shortDescription = "", + help = "") private static class WizCommand extends FooCommand {} @Test