Skip to content

Commit

Permalink
Automatic code cleanup.
Browse files Browse the repository at this point in the history
PiperOrigin-RevId: 529621983
Change-Id: I08dec32124382686d3a6318cc3b403a45fd741e8
  • Loading branch information
Googler authored and copybara-github committed May 5, 2023
1 parent cc8ecc5 commit 5226e3b
Showing 1 changed file with 0 additions and 20 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -157,26 +157,6 @@ public String getTypeDescription() {
}
}

/** A label converter that returns a default value if the input string is empty. */
public static class DefaultLabelConverter implements Converter<Label> {
private final Label defaultValue;

protected DefaultLabelConverter(String defaultValue) {
this.defaultValue =
defaultValue.equals("null") ? null : Label.parseCanonicalUnchecked(defaultValue);
}

@Override
public Label convert(String input, Object conversionContext) throws OptionsParsingException {
return input.isEmpty() ? defaultValue : convertOptionsLabel(input, conversionContext);
}

@Override
public String getTypeDescription() {
return "a build target label";
}
}

/** Flag converter for a map of unique keys with optional labels as values. */
public static class LabelMapConverter implements Converter<Map<String, Label>> {
@Override
Expand Down

0 comments on commit 5226e3b

Please sign in to comment.