diff options
author | cushon <cushon@google.com> | 2017-04-18 01:20:04 +0200 |
---|---|---|
committer | Klaus Aehlig <aehlig@google.com> | 2017-04-18 11:33:53 +0200 |
commit | 50d62ee7888856f935d09e5fd60ee23d24d02b44 (patch) | |
tree | dbe23ccd192464ff5790afb6599ebce1bca74bb7 | |
parent | 2eaa02e8b630ce94fff39422334c47726ead6324 (diff) |
Partial rollback of unknown commit
PiperOrigin-RevId: 153403092
-rw-r--r-- | src/main/java/com/google/devtools/build/lib/rules/java/JavaBinary.java | 5 |
1 files changed, 4 insertions, 1 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 60aa02855c..12e97b8b51 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 @@ -187,7 +187,10 @@ public class JavaBinary implements RuleConfiguredTargetFactory { semantics.translate(ruleContext, javaConfig, attributes.getMessages())); } - if (attributes.hasSources() || attributes.hasResources()) { + // TODO(b/37425618): this should be attributes.hasResources() + boolean hasResources = + !attributes.getResources().isEmpty() || !attributes.getClassPathResources().isEmpty(); + if (attributes.hasSources() || hasResources) { // We only want to add a jar to the classpath of a dependent rule if it has content. javaArtifactsBuilder.addRuntimeJar(classJar); } |