diff options
Diffstat (limited to 'java/com/google/devtools/common/options/processor/OptionProcessor.java')
-rw-r--r-- | java/com/google/devtools/common/options/processor/OptionProcessor.java | 29 |
1 files changed, 0 insertions, 29 deletions
diff --git a/java/com/google/devtools/common/options/processor/OptionProcessor.java b/java/com/google/devtools/common/options/processor/OptionProcessor.java index fd7c023..76b9640 100644 --- a/java/com/google/devtools/common/options/processor/OptionProcessor.java +++ b/java/com/google/devtools/common/options/processor/OptionProcessor.java @@ -476,10 +476,6 @@ public final class OptionProcessor extends AbstractProcessor { } if (isExpansion || hasImplicitRequirements) { - if (annotation.wrapperOption()) { - throw new OptionProcessorException( - optionField, "Wrapper options cannot have expansions or implicit requirements."); - } if (annotation.allowMultiple()) { throw new OptionProcessorException( optionField, @@ -488,30 +484,6 @@ public final class OptionProcessor extends AbstractProcessor { } } - /** - * Some flags wrap other flags. They are objectively useless, as there is no difference between - * passing --wrapper=--foo and --foo other than the "source" information tracked. This - * functionality comes from requiring compatibility at some past point in time, but is actively - * being deprecated. No non-deprecated flag can use this feature. - */ - private void checkWrapperOptions(VariableElement optionField) throws OptionProcessorException { - Option annotation = optionField.getAnnotation(Option.class); - if (annotation.wrapperOption()) { - if (annotation.deprecationWarning().isEmpty()) { - throw new OptionProcessorException( - optionField, - "Can't have non deprecated wrapper options, this feature is deprecated. " - + "Please add a deprecationWarning."); - } - if (!ImmutableList.copyOf(annotation.metadataTags()).contains(OptionMetadataTag.DEPRECATED)) { - throw new OptionProcessorException( - optionField, - "Can't have non deprecated wrapper options, this feature is deprecated. " - + "Please add the metadata tag DEPRECATED."); - } - } - } - @Override public boolean process(Set<? extends TypeElement> annotations, RoundEnvironment roundEnv) { for (Element annotatedElement : roundEnv.getElementsAnnotatedWith(Option.class)) { @@ -528,7 +500,6 @@ public final class OptionProcessor extends AbstractProcessor { checkConverter(optionField); checkEffectTagRationality(optionField); checkMetadataTagAndCategoryRationality(optionField); - checkWrapperOptions(optionField); } catch (OptionProcessorException e) { error(e.getElementInError(), e.getMessage()); } |