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:03 UTC 2022


On Thu, 3 Nov 2022 11:40:55 GMT, Alan Bateman <alanb at openjdk.org> wrote:

>> Brian Burkhalter has updated the pull request incrementally with one additional commit since the last revision:
>> 
>>   8295753: Clean up UnixPath; rename retentive to preserving
>
> src/java.base/unix/classes/sun/nio/fs/UnixPath.java line 814:
> 
>> 812: 
>> 813:     @Override
>> 814:     @SuppressWarnings("removal")
> 
> I assume this can be removed.

Removed in c193b3b48f56e2c581efaf212f2770c9add36a0a.

> src/java.base/unix/classes/sun/nio/fs/UnixPath.java line 876:
> 
>> 874:         UnixPath path = fs.rootDirectory();
>> 875: 
>> 876:         SecurityManager sm = System.getSecurityManager();
> 
> I assume this can be removed too.

Yes, in c193b3b48f56e2c581efaf212f2770c9add36a0a.

> src/java.base/unix/classes/sun/nio/fs/UnixPath.java line 893:
> 
>> 891:             UnixPath elementPath = path.resolve(element);
>> 892: 
>> 893:             // Derive element key
> 
> You might want to re-visit the comments at L890 and 893 and there is no derivation, instead it just gets the file key. The API allows is to be null but the Unix implementation is always non-nulll.

Revised in c193b3b48f56e2c581efaf212f2770c9add36a0a.

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

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


More information about the nio-dev mailing list