diff options
Diffstat (limited to 'src/main/java/com/google/devtools/build/lib')
-rw-r--r-- | src/main/java/com/google/devtools/build/lib/skyframe/RecursiveDirectoryTraversalFunction.java | 18 |
1 files changed, 3 insertions, 15 deletions
diff --git a/src/main/java/com/google/devtools/build/lib/skyframe/RecursiveDirectoryTraversalFunction.java b/src/main/java/com/google/devtools/build/lib/skyframe/RecursiveDirectoryTraversalFunction.java index 1f4e0774bc..9b0e44817b 100644 --- a/src/main/java/com/google/devtools/build/lib/skyframe/RecursiveDirectoryTraversalFunction.java +++ b/src/main/java/com/google/devtools/build/lib/skyframe/RecursiveDirectoryTraversalFunction.java @@ -104,9 +104,8 @@ abstract class RecursiveDirectoryTraversalFunction * by {@link #aggregateWithSubdirectorySkyValues}, and returns that aggregation. * * <p>Returns null if {@code env.valuesMissing()} is true, checked after each call to one of - * {@link RecursiveDirectoryTraversalFunction}'s abstract methods except for {@link - * #getEmptyReturn}. (And after each of {@code visitDirectory}'s own uses of {@code env}, of - * course.) + * {@link RecursiveDirectoryTraversalFunction}'s abstract methods that were given {@code env}. + * (And after each of {@code visitDirectory}'s own uses of {@code env}, of course.) */ TReturn visitDirectory(RecursivePkgKey recursivePkgKey, Environment env) { RootedPath rootedPath = recursivePkgKey.getRootedPath(); @@ -151,10 +150,6 @@ abstract class RecursiveDirectoryTraversalFunction } TVisitor visitor = getInitialVisitor(); - if (env.valuesMissing()) { - return null; - } - if (pkgLookupValue.packageExists()) { if (pkgLookupValue.getRoot().equals(root)) { Package pkg = null; @@ -252,19 +247,12 @@ abstract class RecursiveDirectoryTraversalFunction RootedPath subdirectoryRootedPath = RootedPath.toRootedPath(root, subdirectory); childDeps.add(getSkyKeyForSubdirectory(recursivePkgKey.getRepository(), subdirectoryRootedPath, excludedSubdirectoriesBeneathThisSubdirectory)); - if (env.valuesMissing()) { - return null; - } } Map<SkyKey, SkyValue> subdirectorySkyValues = env.getValues(childDeps); if (env.valuesMissing()) { return null; } - TReturn aggregation = aggregateWithSubdirectorySkyValues(visitor, subdirectorySkyValues); - if (env.valuesMissing()) { - return null; - } - return aggregation; + return aggregateWithSubdirectorySkyValues(visitor, subdirectorySkyValues); } // Ignore all errors in traversal and return an empty value. |