aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--src/main/java/com/google/devtools/build/lib/rules/java/JavaBinary.java12
1 files changed, 1 insertions, 11 deletions
diff --git a/src/main/java/com/google/devtools/build/lib/rules/java/JavaBinary.java b/src/main/java/com/google/devtools/build/lib/rules/java/JavaBinary.java
index 2e1d01f316..d476e9d46f 100644
--- a/src/main/java/com/google/devtools/build/lib/rules/java/JavaBinary.java
+++ b/src/main/java/com/google/devtools/build/lib/rules/java/JavaBinary.java
@@ -221,7 +221,7 @@ public class JavaBinary implements RuleConfiguredTargetFactory {
JavaCommon.getJavaBinSubstitution(ruleContext, launcher));
}
- NestedSet<Artifact> transitiveSourceJars = collectTransitiveSourceJars(common, srcJar);
+ NestedSet<Artifact> transitiveSourceJars = common.collectTransitiveSourceJars(srcJar);
// TODO(bazel-team): if (getOptions().sourceJars) then make this a dummy prerequisite for the
// DeployArchiveAction ? Needs a few changes there as we can't pass inputs
@@ -442,16 +442,6 @@ public class JavaBinary implements RuleConfiguredTargetFactory {
}
}
- private NestedSet<Artifact> collectTransitiveSourceJars(JavaCommon common, Artifact srcJar) {
- NestedSetBuilder<Artifact> builder = NestedSetBuilder.stableOrder();
-
- builder.add(srcJar);
- for (JavaSourceJarsProvider dep : common.getDependencies(JavaSourceJarsProvider.class)) {
- builder.addTransitive(dep.getTransitiveSourceJars());
- }
- return builder.build();
- }
-
/**
* Collects the native libraries in the transitive closure of the deps.
*