RFR: 8273922: (fs) UserDefinedFileAttributeView doesn't handle file names that are just under the MAX_PATH limit (win) [v3]

Mike Hearn duke at openjdk.java.net
Mon Oct 25 15:50:06 UTC 2021


On Tue, 21 Sep 2021 19:28:58 GMT, Brian Burkhalter <bpb at openjdk.org> wrote:

>> Modify `sun.nio.fs.WindowsUserDefinedFileAttributeView.join(WindowsPath,String)` to handle file names which exceed the limit.
>
> Brian Burkhalter has updated the pull request incrementally with one additional commit since the last revision:
> 
>   8273922: Make join() reject absolute path in 1nth in 'name' parameter

Ah, OK. Is converting to an absolute path unexpectedly expensive on Windows, or there's some other downside? I couldn't figure out the rationale from the code originally, so it'd be good to add in a comment explaining why an effort is made to use short form when possible. Otherwise someone else might spot the same 'simplification' in future.

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

PR: https://git.openjdk.java.net/jdk/pull/5594


More information about the nio-dev mailing list