On Thu, 19 Dec 2024 00:36:44 GMT, Brian Burkhalter <[email protected]> wrote:
> Update the specification of `java.io.File.exists()` to match its behavior,
> which seems correct in the context of how the empty abstract pathname is
> documented elsewhere in the class.
Commit 9d6d910 removes the change of specification of `File.exists` and changes
the implementation of `File` to treat the empty path `""` as the current
directory `"."` where appropriate.
- The test primarily verifies the `File` methods which differed in manual
testing for `new File("")` from the equivalent methods of `Path` and `Files`
for `Path.of("")`.
- The `lengthUnix` and `lengthWindows` tests could likely be collapsed to just
test `File.length` against `Files.size(path)`.
- The `get*Space` checks could instead be against +/-5% of the values returned
by the equivalent NIO methods.
-------------
PR Comment: https://git.openjdk.org/jdk/pull/22821#issuecomment-2619980771