diff options
author | Nathan Harmata <nharmata@google.com> | 2015-11-18 18:38:14 +0000 |
---|---|---|
committer | Damien Martin-Guillerez <dmarting@google.com> | 2015-11-19 10:00:27 +0000 |
commit | 13a74c0327847188de3344b6376ddd7705b013eb (patch) | |
tree | 0b73170174aeb580b8910d39ab23a461ce0e8331 /src/main/java/com/google/devtools/build/lib/vfs/AbstractFileSystem.java | |
parent | cfa74ac167a7f651e757224f3930e731560e293c (diff) |
Make AbstractFileSystem correct in isolation. Previously there was (accidentally) the implicit requirement that the deriving class override FileSystem#stat.
Even though this wasn't a problem in practice in the Bazel codebase (since all of our transitive subclasses had custom 'stat' implementation), it's good hygiene to have things correct (e.g. if we added a new subclass).
--
MOS_MIGRATED_REVID=108158039
Diffstat (limited to 'src/main/java/com/google/devtools/build/lib/vfs/AbstractFileSystem.java')
-rw-r--r-- | src/main/java/com/google/devtools/build/lib/vfs/AbstractFileSystem.java | 24 |
1 files changed, 0 insertions, 24 deletions
diff --git a/src/main/java/com/google/devtools/build/lib/vfs/AbstractFileSystem.java b/src/main/java/com/google/devtools/build/lib/vfs/AbstractFileSystem.java index 1d0b4dc070..86d90534fe 100644 --- a/src/main/java/com/google/devtools/build/lib/vfs/AbstractFileSystem.java +++ b/src/main/java/com/google/devtools/build/lib/vfs/AbstractFileSystem.java @@ -144,28 +144,4 @@ abstract class AbstractFileSystem extends FileSystem { } } } - - @Override - protected boolean isFile(Path path, boolean followSymlinks) { - FileStatus stat = statNullable(path, followSymlinks); - return stat != null ? stat.isFile() : false; - } - - @Override - protected boolean isSpecialFile(Path path, boolean followSymlinks) { - FileStatus stat = statNullable(path, followSymlinks); - return stat != null ? stat.isSpecialFile() : false; - } - - @Override - protected boolean isSymbolicLink(Path path) { - FileStatus stat = statNullable(path, false); - return stat != null ? stat.isSymbolicLink() : false; - } - - @Override - protected boolean isDirectory(Path path, boolean followSymlinks) { - FileStatus stat = statNullable(path, followSymlinks); - return stat != null ? stat.isDirectory() : false; - } } |