Fix some warnings on RuleContext (Remove an unused field, and group method overloads together) RELNOTES: None. PiperOrigin-RevId: 209455639
diff --git a/src/main/java/com/google/devtools/build/lib/analysis/RuleContext.java b/src/main/java/com/google/devtools/build/lib/analysis/RuleContext.java index 7641833..65b7a9e 100644 --- a/src/main/java/com/google/devtools/build/lib/analysis/RuleContext.java +++ b/src/main/java/com/google/devtools/build/lib/analysis/RuleContext.java
@@ -755,18 +755,6 @@ } /** - * Returns the list of transitive info collections that feed into this target through the - * specified attribute. Note that you need to specify the correct mode for the attribute, - * otherwise an assertion will be raised. - */ - public List<? extends TransitiveInfoCollection> getPrerequisites(String attributeName, - Mode mode) { - return Lists.transform( - getPrerequisiteConfiguredTargetAndTargets(attributeName, mode), - ConfiguredTargetAndData::getConfiguredTarget); - } - - /** * Returns the prerequisites keyed by the CPU of their configurations. If the split transition * is not active (e.g. split() returned an empty list), the key is an empty Optional. */ @@ -959,6 +947,18 @@ } /** + * Returns the list of transitive info collections that feed into this target through the + * specified attribute. Note that you need to specify the correct mode for the attribute, + * otherwise an assertion will be raised. + */ + public List<? extends TransitiveInfoCollection> getPrerequisites(String attributeName, + Mode mode) { + return Lists.transform( + getPrerequisiteConfiguredTargetAndTargets(attributeName, mode), + ConfiguredTargetAndData::getConfiguredTarget); + } + + /** * Returns all the providers of the specified type that are listed under the specified attribute * of this target in the BUILD file. */ @@ -1444,7 +1444,6 @@ private ImmutableList<Aspect> aspects; private ToolchainContext toolchainContext; private ConstraintSemantics constraintSemantics; - private ConfiguredTargetAndData associatedTarget; @VisibleForTesting public Builder(