diff --git a/src/main/java/com/google/devtools/build/lib/runtime/commands/HelpCommand.java b/src/main/java/com/google/devtools/build/lib/runtime/commands/HelpCommand.java index edbe662bd1d9db..c055e2cdb13b55 100644 --- a/src/main/java/com/google/devtools/build/lib/runtime/commands/HelpCommand.java +++ b/src/main/java/com/google/devtools/build/lib/runtime/commands/HelpCommand.java @@ -270,7 +270,7 @@ private static void emitFlagsAsProtoHelp(BlazeRuntime runtime, OutErr outErr) { private static BazelFlagsProto.FlagInfo.Builder createFlagInfo(OptionDefinition option) { BazelFlagsProto.FlagInfo.Builder flagBuilder = BazelFlagsProto.FlagInfo.newBuilder(); flagBuilder.setName(option.getOptionName()); - flagBuilder.setHasNegativeFlag(option.hasNegativeOption()); + flagBuilder.setHasNegativeFlag(option.usesBooleanValueSyntax()); flagBuilder.setDocumentation(option.getHelpText()); flagBuilder.setAllowsMultiple(option.allowsMultiple()); flagBuilder.setRequiresValue(option.requiresValue()); diff --git a/src/main/java/com/google/devtools/common/options/OptionDefinition.java b/src/main/java/com/google/devtools/common/options/OptionDefinition.java index 2d3d112248e2b6..23fb4bf80c1e7b 100644 --- a/src/main/java/com/google/devtools/common/options/OptionDefinition.java +++ b/src/main/java/com/google/devtools/common/options/OptionDefinition.java @@ -174,11 +174,6 @@ public boolean getOldNameWarning() { return optionAnnotation.oldNameWarning(); } - /** Returns whether an option --foo has a negative equivalent --nofoo. */ - public boolean hasNegativeOption() { - return getType().equals(boolean.class) || getType().equals(TriState.class); - } - /** The type of the optionDefinition. */ public Class getType() { return field.getType();