Skip to content

Commit 7812bdc

Browse files
emilyguo1copybara-github
authored andcommitted
Add checking value is null in declareDependenciesAndCheckValues.
Return earlier if any value is missing, don't need to iterate over. PiperOrigin-RevId: 436189630
1 parent 5f1087c commit 7812bdc

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

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

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -218,7 +218,9 @@ private static void declareDependenciesAndCheckValues(
218218
Environment env, Iterable<? extends SkyKey> skyKeys) throws InterruptedException {
219219
SkyframeIterableResult result = env.getOrderedValuesAndExceptions(skyKeys);
220220
while (result.hasNext()) {
221-
result.next();
221+
if (result.next() == null) {
222+
return;
223+
}
222224
}
223225
}
224226

0 commit comments

Comments
 (0)