diff --git a/src/main/java/com/google/devtools/build/lib/rules/java/JavaCompilationHelper.java b/src/main/java/com/google/devtools/build/lib/rules/java/JavaCompilationHelper.java index 84fa1118e2ff62..0c4e1ef47b95e4 100644 --- a/src/main/java/com/google/devtools/build/lib/rules/java/JavaCompilationHelper.java +++ b/src/main/java/com/google/devtools/build/lib/rules/java/JavaCompilationHelper.java @@ -16,7 +16,6 @@ import static com.google.common.base.Preconditions.checkNotNull; import static com.google.common.base.Preconditions.checkState; -import com.google.common.annotations.VisibleForTesting; import com.google.common.base.Preconditions; import com.google.common.collect.ImmutableList; import com.google.common.collect.ImmutableMap; @@ -151,12 +150,6 @@ public JavaCompilationHelper( disableStrictDeps); } - @VisibleForTesting - JavaCompilationHelper( - RuleContext ruleContext, JavaSemantics semantics, JavaTargetAttributes.Builder attributes) { - this(ruleContext, semantics, getDefaultJavacOptsFromRule(ruleContext), attributes); - } - JavaTargetAttributes getAttributes() { if (builtAttributes == null) { builtAttributes = attributes.build(); @@ -815,26 +808,10 @@ public String getFixDepsTool() { * Gets the value of the "javacopts" attribute combining them with the default options. If the * current rule has no javacopts attribute, this method only returns the default options. */ - @VisibleForTesting - public ImmutableList getJavacOpts() { + private ImmutableList getJavacOpts() { return customJavacOpts; } - /** - * Obtains the standard list of javac opts needed to build {@code rule}. - * - *

This method must only be called during initialization. - * - * @param ruleContext a rule context - * @return a list of options to provide to javac - */ - private static ImmutableList getDefaultJavacOptsFromRule(RuleContext ruleContext) { - return ImmutableList.copyOf( - Iterables.concat( - JavaToolchainProvider.from(ruleContext).getJavacOptions(ruleContext), - ruleContext.getExpander().withDataLocations().tokenized("javacopts"))); - } - public void setTranslations(Collection translations) { Preconditions.checkArgument(!translationsFrozen); this.translations.addAll(translations);