Skip to content

Commit 9d331b9

Browse files
aoeuicopybara-github
authored andcommitted
Fix NPE in RemoteConfiguredTargetValue after discarding cache.
Override `isCleared()` in `RemoteConfiguredTargetValue` to correctly report when the remote configured target has been cleared. This allows `SkyframeExecutor.dropConfiguredTargetsNow` to drop these cleared nodes at the start of a build rather than reusing them as `DONE` nodes with a null `configuredTarget`, which leads to NullPointerException. PiperOrigin-RevId: 934090115 Change-Id: I5b249b247fee445508b256d2cf4f5be283eba15a
1 parent 872d8ce commit 9d331b9

1 file changed

Lines changed: 5 additions & 0 deletions

File tree

src/main/java/com/google/devtools/build/lib/skyframe/RemoteConfiguredTargetValue.java

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -88,6 +88,11 @@ public final TargetData getTargetData() {
8888
return targetData;
8989
}
9090

91+
@Override
92+
public final boolean isCleared() {
93+
return configuredTarget == null;
94+
}
95+
9196
@Override
9297
public final String toString() {
9398
return toStringHelper(this)

0 commit comments

Comments
 (0)