commit | 8f0034ce1e7854521e259a5eaf71859b1e6f95bc | [log] [tgz] |
---|---|---|
author | emilyguo <emilyguo@google.com> | Sat Apr 09 10:09:52 2022 -0700 |
committer | Copybara-Service <copybara-worker@google.com> | Sat Apr 09 10:11:53 2022 -0700 |
tree | c3ee7fce3248ee6db87fa99fa53902fb5c32ec4b | |
parent | 6dbf4a2d95763b56bb6419859340192011e728eb [diff] [blame] |
Fix `GlobValue` NPE bug. PiperOrigin-RevId: 440588414
diff --git a/src/main/java/com/google/devtools/build/lib/skyframe/GlobFunction.java b/src/main/java/com/google/devtools/build/lib/skyframe/GlobFunction.java index 752036e..2720411 100644 --- a/src/main/java/com/google/devtools/build/lib/skyframe/GlobFunction.java +++ b/src/main/java/com/google/devtools/build/lib/skyframe/GlobFunction.java
@@ -177,6 +177,10 @@ return null; } GlobValue globValue = (GlobValue) listingAndRecursiveGlobResult.next(); + if (globValue == null) { + // has exception, will be handled later. + return null; + } matches.addTransitive(globValue.getMatches()); listingValue = (DirectoryListingValue) listingAndRecursiveGlobResult.next(); }