diff options
author | 2018-01-19 06:20:57 -0800 | |
---|---|---|
committer | 2018-01-19 06:22:56 -0800 | |
commit | 74706da1b101e08500978633755005b37c017da6 (patch) | |
tree | 75dd57b268a3e9e1a8429fc5ea050abf4a9584a8 /src/main/java/com/google/devtools/build/lib/skyframe/GraphBackedRecursivePackageProvider.java | |
parent | f0bec36864f10370cbbda4caa8beac2e0c5ee45b (diff) |
Inline rarely used PathFragment methods that do not deserve to be on a core path class.
PiperOrigin-RevId: 182526427
Diffstat (limited to 'src/main/java/com/google/devtools/build/lib/skyframe/GraphBackedRecursivePackageProvider.java')
-rw-r--r-- | src/main/java/com/google/devtools/build/lib/skyframe/GraphBackedRecursivePackageProvider.java | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/src/main/java/com/google/devtools/build/lib/skyframe/GraphBackedRecursivePackageProvider.java b/src/main/java/com/google/devtools/build/lib/skyframe/GraphBackedRecursivePackageProvider.java index f73ac247f1..ad8fc9997f 100644 --- a/src/main/java/com/google/devtools/build/lib/skyframe/GraphBackedRecursivePackageProvider.java +++ b/src/main/java/com/google/devtools/build/lib/skyframe/GraphBackedRecursivePackageProvider.java @@ -13,6 +13,8 @@ // limitations under the License. package com.google.devtools.build.lib.skyframe; +import static com.google.common.collect.ImmutableSet.toImmutableSet; + import com.google.common.base.Function; import com.google.common.base.Objects; import com.google.common.base.Preconditions; @@ -269,11 +271,15 @@ public final class GraphBackedRecursivePackageProvider implements RecursivePacka if (subdirectoryTransitivelyContainsPackages.get(subdirectory)) { PathFragment subdirectoryRelativePath = subdirectory.getRelativePath(); ImmutableSet<PathFragment> blacklistedSubdirectoriesBeneathThisSubdirectory = - PathFragment.filterPathsStartingWith( - info.blacklistedSubdirectories, subdirectoryRelativePath); + info.blacklistedSubdirectories + .stream() + .filter(pathFragment -> pathFragment.startsWith(subdirectoryRelativePath)) + .collect(toImmutableSet()); ImmutableSet<PathFragment> excludedSubdirectoriesBeneathThisSubdirectory = - PathFragment.filterPathsStartingWith( - info.excludedSubdirectories, subdirectoryRelativePath); + info.excludedSubdirectories + .stream() + .filter(pathFragment -> pathFragment.startsWith(subdirectoryRelativePath)) + .collect(toImmutableSet()); if (!excludedSubdirectoriesBeneathThisSubdirectory.contains(subdirectoryRelativePath)) { subdirTraversalBuilder.add( new TraversalInfo( |