RFR: 8276661: (fs) UserDefinedFileAttributeView no longer works with long path (win)

Alan Bateman alanb at openjdk.java.net
Wed Nov 17 20:17:43 UTC 2021


On Wed, 17 Nov 2021 19:28:19 GMT, Brian Burkhalter <bpb at openjdk.org> wrote:

> Please consider this change which uses a new method `WindowsPath::getPathWithPrefixForWin32Calls`.

src/java.base/windows/classes/sun/nio/fs/WindowsPath.java line 185:

> 183: 
> 184:     String getPathForWin32Calls(boolean alwaysAddPrefix)
> 185:         throws WindowsException {

Minor nit, can you move the "throws WindowsException {" to the previous line.

src/java.base/windows/classes/sun/nio/fs/WindowsPath.java line 313:

> 311:         if (!path.startsWith("\\\\")) {
> 312:             path = "\\\\?\\" + path;
> 313:         }

I think the approach looks okay but I wonder if we need to handle the UNC case here.

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

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


More information about the nio-dev mailing list