Skip to content

Commit 11fe775

Browse files
committed
Revert "Try just avoiding Files.exists in situation where it's safe"
This reverts commit a9b83a0.
1 parent a9b83a0 commit 11fe775

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

compiler/src/dotty/tools/io/AbstractFile.scala

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ import java.io.{
1010
ByteArrayOutputStream
1111
}
1212
import java.net.URL
13-
import java.nio.file.{FileAlreadyExistsException, Files, FileSystems, Paths}
13+
import java.nio.file.{FileAlreadyExistsException, Files, Paths}
1414

1515
/**
1616
* An abstraction over files for use in the reflection/compiler libraries.
@@ -121,7 +121,7 @@ abstract class AbstractFile extends Iterable[AbstractFile] {
121121

122122
/** Does this abstract file denote an existing file? */
123123
def exists: Boolean = {
124-
(jpath eq null) || (if jpath.getFileSystem eq FileSystems.getDefault then jpath.toFile.exists else Files.exists(jpath))
124+
(jpath eq null) || Files.exists(jpath)
125125
}
126126

127127
/** Does this abstract file represent something which can contain classfiles? */

0 commit comments

Comments
 (0)