Document that ActionAnalysisMetadata#getOwner() is never null, add some Preconditions checks to make that more clear, and ensure that ActionOwner's fields are never null except for the SYSTEM_ACTION_OWNER wart.
Also do some drive-by serialization annotation clean-ups and other housekeeping.
PiperOrigin-RevId: 312336006
diff --git a/src/test/java/com/google/devtools/build/lib/remote/RemoteSpawnRunnerTest.java b/src/test/java/com/google/devtools/build/lib/remote/RemoteSpawnRunnerTest.java
index a5b204b..030efa3 100644
--- a/src/test/java/com/google/devtools/build/lib/remote/RemoteSpawnRunnerTest.java
+++ b/src/test/java/com/google/devtools/build/lib/remote/RemoteSpawnRunnerTest.java
@@ -844,7 +844,7 @@
PathFragment.create("out/param_file"), args, ParameterFileType.UNQUOTED, ISO_8859_1);
Spawn spawn =
new SimpleSpawn(
- new FakeOwner("foo", "bar"),
+ new FakeOwner("foo", "bar", "//dummy:label"),
/*arguments=*/ ImmutableList.of(),
/*environment=*/ ImmutableMap.of(),
/*executionInfo=*/ ImmutableMap.of(),
@@ -1028,7 +1028,7 @@
private static SimpleSpawn simpleSpawnWithExecutionInfo(
ImmutableMap<String, String> executionInfo, Artifact... outputs) {
return new SimpleSpawn(
- new FakeOwner("foo", "bar"),
+ new FakeOwner("foo", "bar", "//dummy:label"),
/*arguments=*/ ImmutableList.of(),
/*environment=*/ ImmutableMap.of(),
/*executionInfo=*/ executionInfo,