diff options
author | aehlig <aehlig@google.com> | 2017-12-19 07:12:25 -0800 |
---|---|---|
committer | Copybara-Service <copybara-piper@google.com> | 2017-12-19 07:13:52 -0800 |
commit | c801c393bcfabbe6e5058fd77ef2d67660c75da3 (patch) | |
tree | 1711325efe0f0e0fa9adb6d2aef8310a666e587b /src/main/java/com/google/devtools/build/lib/vfs/AbstractFileSystem.java | |
parent | 2918e78a2b3144d5cacc1ab20ab4626a72df797a (diff) |
Automated rollback of commit 82e68b75304438c96ff878a0c2b8d18b42002486.
Fixes #4322, #4306.
*** Reason for rollback ***
Introduces a deadlock (see https://github.com/bazelbuild/bazel/issues/4322)
*** Original change description ***
Make FileSystem operate on LocalPath instead of Path.
PiperOrigin-RevId: 179549866
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 | 8 |
1 files changed, 4 insertions, 4 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 8b9cd5376a..ef1946bb8e 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 @@ -37,7 +37,7 @@ abstract class AbstractFileSystem extends FileSystem { } @Override - protected InputStream getInputStream(LocalPath path) throws IOException { + protected InputStream getInputStream(Path path) throws IOException { // This loop is a workaround for an apparent bug in FileInputStream.open, which delegates // ultimately to JVM_Open in the Hotspot JVM. This call is not EINTR-safe, so we must do the // retry here. @@ -55,7 +55,7 @@ abstract class AbstractFileSystem extends FileSystem { } /** Returns either normal or profiled FileInputStream. */ - private InputStream createFileInputStream(LocalPath path) throws FileNotFoundException { + private InputStream createFileInputStream(Path path) throws FileNotFoundException { final String name = path.toString(); if (profiler.isActive() && (profiler.isProfiling(ProfilerTask.VFS_READ) @@ -77,7 +77,7 @@ abstract class AbstractFileSystem extends FileSystem { * Returns either normal or profiled FileOutputStream. Should be used by subclasses to create * default OutputStream instance. */ - protected OutputStream createFileOutputStream(LocalPath path, boolean append) + protected OutputStream createFileOutputStream(Path path, boolean append) throws FileNotFoundException { final String name = path.toString(); if (profiler.isActive() @@ -95,7 +95,7 @@ abstract class AbstractFileSystem extends FileSystem { } @Override - protected OutputStream getOutputStream(LocalPath path, boolean append) throws IOException { + protected OutputStream getOutputStream(Path path, boolean append) throws IOException { synchronized (path) { try { return createFileOutputStream(path, append); |