Rephrase InMemoryFileSystem in terms of error codes rather than exceptions, enabling better performance on statIfFound() / statNullable() calls.
RELNOTES: None
PiperOrigin-RevId: 212306308
diff --git a/src/test/java/com/google/devtools/build/lib/skyframe/PackageFunctionTest.java b/src/test/java/com/google/devtools/build/lib/skyframe/PackageFunctionTest.java
index 1a3dcdd..48dc8b4 100644
--- a/src/test/java/com/google/devtools/build/lib/skyframe/PackageFunctionTest.java
+++ b/src/test/java/com/google/devtools/build/lib/skyframe/PackageFunctionTest.java
@@ -772,11 +772,11 @@
}
@Override
- public FileStatus stat(Path path, boolean followSymlinks) throws IOException {
+ public FileStatus statIfFound(Path path, boolean followSymlinks) throws IOException {
if (stubbedStats.containsKey(path)) {
return stubbedStats.get(path).get();
}
- return super.stat(path, followSymlinks);
+ return super.statIfFound(path, followSymlinks);
}
public void scheduleMakeUnreadableAfterReaddir(Path path) {