aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/test/java/com/google/devtools/build
diff options
context:
space:
mode:
authorGravatar Laszlo Csomor <laszlocsomor@google.com>2015-12-04 13:23:54 +0000
committerGravatar Kristina Chodorow <kchodorow@google.com>2015-12-04 21:06:32 +0000
commitb4d482bee65fbb83351fc562bca2a30e55a90a49 (patch)
tree03ee30b7609375cd92c9f1d0126759a8bf12f8a2 /src/test/java/com/google/devtools/build
parentc3e5e2ac1a615131cf2d543375ac63102c40ec2f (diff)
Refactoring: RecursiveFilesystemTraversalValue.ResolvedFile is now an interface.
This CL changes the class structure, moving from inheritance to implementation and composition. In particular, it turns the abstract base class ResolvedFile into an interface which the earlier subclasses now simply implement rather than extending it. This change makes the code cleaner: implementors may write more complicated getters (and that's my plan to do in a subsequent CL) instead of just returning the members. -- MOS_MIGRATED_REVID=109405650
Diffstat (limited to 'src/test/java/com/google/devtools/build')
-rw-r--r--src/test/java/com/google/devtools/build/lib/skyframe/RecursiveFilesystemTraversalFunctionTest.java9
1 files changed, 5 insertions, 4 deletions
diff --git a/src/test/java/com/google/devtools/build/lib/skyframe/RecursiveFilesystemTraversalFunctionTest.java b/src/test/java/com/google/devtools/build/lib/skyframe/RecursiveFilesystemTraversalFunctionTest.java
index d94b8dd06c..05fdbc742e 100644
--- a/src/test/java/com/google/devtools/build/lib/skyframe/RecursiveFilesystemTraversalFunctionTest.java
+++ b/src/test/java/com/google/devtools/build/lib/skyframe/RecursiveFilesystemTraversalFunctionTest.java
@@ -30,6 +30,7 @@ import com.google.devtools.build.lib.cmdline.PackageIdentifier;
import com.google.devtools.build.lib.events.NullEventHandler;
import com.google.devtools.build.lib.pkgcache.PathPackageLocator;
import com.google.devtools.build.lib.skyframe.RecursiveFilesystemTraversalValue.ResolvedFile;
+import com.google.devtools.build.lib.skyframe.RecursiveFilesystemTraversalValue.ResolvedFileFactory;
import com.google.devtools.build.lib.skyframe.RecursiveFilesystemTraversalValue.TraversalRequest;
import com.google.devtools.build.lib.testutil.FoundationTestCaseForJunit4;
import com.google.devtools.build.lib.util.BlazeClock;
@@ -295,26 +296,26 @@ public final class RecursiveFilesystemTraversalFunctionTest extends FoundationTe
}
private ResolvedFile resolvedFile(RootedPath path) throws Exception {
- return ResolvedFile.regularFile(path, FileStateValue.create(path, tsgm));
+ return ResolvedFileFactory.regularFile(path, FileStateValue.create(path, tsgm));
}
private ResolvedFile resolvedDanglingSymlink(RootedPath linkNamePath, PathFragment linkTargetPath)
throws Exception {
- return ResolvedFile.danglingSymlink(
+ return ResolvedFileFactory.danglingSymlink(
linkNamePath, linkTargetPath, FileStateValue.create(linkNamePath, tsgm));
}
private ResolvedFile resolvedSymlinkToFile(
RootedPath targetPath, RootedPath linkNamePath, PathFragment linkTargetPath)
throws Exception {
- return ResolvedFile.symlinkToFile(
+ return ResolvedFileFactory.symlinkToFile(
targetPath, linkNamePath, linkTargetPath, FileStateValue.create(linkNamePath, tsgm));
}
private ResolvedFile resolvedSymlinkToDir(
RootedPath targetPath, RootedPath linkNamePath, PathFragment linkTargetPath)
throws Exception {
- return ResolvedFile.symlinkToDirectory(
+ return ResolvedFileFactory.symlinkToDirectory(
targetPath, linkNamePath, linkTargetPath, FileStateValue.create(linkNamePath, tsgm));
}