Created a convenience method for sending a bug report with no additional args so that callers don't have to pass an empty list.
RELNOTES: None.
PiperOrigin-RevId: 233872132
diff --git a/src/main/java/com/google/devtools/build/lib/bugreport/BugReport.java b/src/main/java/com/google/devtools/build/lib/bugreport/BugReport.java
index 318696b..8aeeca6 100644
--- a/src/main/java/com/google/devtools/build/lib/bugreport/BugReport.java
+++ b/src/main/java/com/google/devtools/build/lib/bugreport/BugReport.java
@@ -93,6 +93,14 @@
}
/**
+ * Convenience method for {@linkplain #sendBugReport(Throwable, List, String...) sending a bug
+ * report} without additional arguments.
+ */
+ public static void sendBugReport(Throwable exception) {
+ sendBugReport(exception, /*args=*/ ImmutableList.of());
+ }
+
+ /**
* Logs the unhandled exception with a special prefix signifying that this was a crash.
*
* @param exception the unhandled exception to display.
diff --git a/src/main/java/com/google/devtools/build/lib/rules/cpp/LibraryToLink.java b/src/main/java/com/google/devtools/build/lib/rules/cpp/LibraryToLink.java
index eb5138d..fba355e 100644
--- a/src/main/java/com/google/devtools/build/lib/rules/cpp/LibraryToLink.java
+++ b/src/main/java/com/google/devtools/build/lib/rules/cpp/LibraryToLink.java
@@ -170,8 +170,7 @@
}
BugReport.sendBugReport(
new IllegalStateException(
- "Unexpected inequality with equal symbols: " + this + ", " + that),
- ImmutableList.of());
+ "Unexpected inequality with equal symbols: " + this + ", " + that));
return false;
}
diff --git a/src/main/java/com/google/devtools/build/lib/runtime/ExperimentalStateTracker.java b/src/main/java/com/google/devtools/build/lib/runtime/ExperimentalStateTracker.java
index 42d30a3..324edfb 100644
--- a/src/main/java/com/google/devtools/build/lib/runtime/ExperimentalStateTracker.java
+++ b/src/main/java/com/google/devtools/build/lib/runtime/ExperimentalStateTracker.java
@@ -15,7 +15,6 @@
import static java.util.concurrent.TimeUnit.MILLISECONDS;
-import com.google.common.collect.ImmutableList;
import com.google.common.collect.Iterables;
import com.google.common.collect.Sets;
import com.google.devtools.build.lib.actions.Action;
@@ -316,8 +315,7 @@
new IllegalStateException(
"Should not complete an action before starting it, and action did not discover "
+ "inputs, so should not have published a status before execution: "
- + action),
- ImmutableList.of());
+ + action));
}
if (action.getOwner() != null) {
diff --git a/src/main/java/com/google/devtools/build/lib/skyframe/ActionRewindStrategy.java b/src/main/java/com/google/devtools/build/lib/skyframe/ActionRewindStrategy.java
index bcca7c7..9cdee97 100644
--- a/src/main/java/com/google/devtools/build/lib/skyframe/ActionRewindStrategy.java
+++ b/src/main/java/com/google/devtools/build/lib/skyframe/ActionRewindStrategy.java
@@ -153,8 +153,7 @@
String.format(
"lost input twice for the same action. lostInput: %s, lostInput digest: %s, "
+ "failedAction: %s",
- lostInputsByDigest.get(digest), digest, failedAction)),
- ImmutableList.of());
+ lostInputsByDigest.get(digest), digest, failedAction)));
throw new ActionExecutionException(
lostInputsException, failedAction, /*catastrophe=*/ false);
}