aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/main/java/com/google/devtools/build
diff options
context:
space:
mode:
authorGravatar Philipp Wollermann <philwo@google.com>2015-06-09 13:06:40 +0000
committerGravatar Philipp Wollermann <philwo@google.com>2015-06-10 16:02:09 +0000
commitc820c70bdd527ac1f065c2fe4320dc06bbe9eaf5 (patch)
tree37491f2a055a67725385cf9335141f1be5bcb27d /src/main/java/com/google/devtools/build
parentb7ce7a84484e877fab21e5e5f2fc1befb55a5384 (diff)
Some small, random fixes for JavaBuilder that increase error reporting, fix JavaDoc strings, ...
I found having stack traces very helpful while I was debugging an issue where the JavaBuilder ran out of file handles and crashed, but only printed "Compilation failed: No more file handles" and didn't tell me which part of the code actually tried to open the file. -- MOS_MIGRATED_REVID=95529141
Diffstat (limited to 'src/main/java/com/google/devtools/build')
-rw-r--r--src/main/java/com/google/devtools/build/lib/rules/java/JavaCompileAction.java11
1 files changed, 4 insertions, 7 deletions
diff --git a/src/main/java/com/google/devtools/build/lib/rules/java/JavaCompileAction.java b/src/main/java/com/google/devtools/build/lib/rules/java/JavaCompileAction.java
index 505aae862f..6b9fcbb9a8 100644
--- a/src/main/java/com/google/devtools/build/lib/rules/java/JavaCompileAction.java
+++ b/src/main/java/com/google/devtools/build/lib/rules/java/JavaCompileAction.java
@@ -378,7 +378,7 @@ public class JavaCompileAction extends AbstractAction {
}
};
- executor.getSpawnActionContext(getMnemonic()).exec(spawn, actionExecutionContext);
+ getContext(executor).exec(spawn, actionExecutionContext);
} catch (ExecException e) {
throw e.toActionExecutionException("Java compilation in rule '" + getOwner().getLabel() + "'",
executor.getVerboseFailures(), this);
@@ -422,8 +422,7 @@ public class JavaCompileAction extends AbstractAction {
@Override
public ResourceSet estimateResourceConsumption(Executor executor) {
- SpawnActionContext context = getContext(executor);
- if (context.isRemotable(getMnemonic(), true)) {
+ if (getContext(executor).isRemotable(getMnemonic(), true)) {
return ResourceSet.ZERO;
}
return LOCAL_RESOURCES;
@@ -677,9 +676,8 @@ public class JavaCompileAction extends AbstractAction {
/**
* Gets the name of the target that produced the given jar artifact.
*
- * When specifying jars directly in the "srcs" attribute of a rule (mostly
- * for third_party libraries), there is no generating action, so we just
- * return the jar name in label form.
+ * <p>When specifying jars directly in the "srcs" attribute of a rule (mostly for third_party
+ * libraries), there is no generating action, so we just return the jar name in label form.
*/
private static Label getTargetName(Artifact jar) {
return Preconditions.checkNotNull(jar.getOwner(), jar);
@@ -909,7 +907,6 @@ public class JavaCompileAction extends AbstractAction {
directJars,
strictJavaDeps,
compileTimeDependencyArtifacts,
-
semantics);
}