RFR: 8295753: (fs) UnixPath::toRealPath does not return correct case when links not followed [v3]

Brian Burkhalter bpb at openjdk.org
Thu Nov 3 16:44:05 UTC 2022


On Thu, 3 Nov 2022 12:10:24 GMT, Pavel Rappo <prappo at openjdk.org> wrote:

>> src/java.base/unix/classes/sun/nio/fs/UnixPath.java line 907:
>> 
>>> 905:             DirectoryStream.Filter<Path> filter = (p) -> { return true; };
>>> 906:             try (DirectoryStream<Path> entries =
>>> 907:                 getFileSystem().provider().newDirectoryStream(path, filter)) {
>> 
>> I think the algorithm is correct, just need to fix the strange indentation at 907 as it looks like getFileSystem()... is in the block.
>
>> I think the algorithm is correct, just need to fix the strange intend at 907.
> 
> I assume you meant _indent(ation)_. If so, then I wonder what you'd consider as acceptable formatting here. Could `var` help not solve this problem by making 906-907 a one-liner instead? Or this would be too unusual for this class?

Indentation modified in c193b3b48f56e2c581efaf212f2770c9add36a0a. There is no use of `var` in this class so far, thus although it is a good idea, `var` is not used here, either.

-------------

PR: https://git.openjdk.org/jdk/pull/10843


More information about the nio-dev mailing list