(fs) Path.of should allow input to include long path prefix

XMLWordPrintable

    • Type: Enhancement
    • Resolution: Fixed
    • Priority: P3
    • 21
    • Affects Version/s: None
    • Component/s: core-libs
    • None
    • b09

      We periodically see cases where the path string provided to Path.of includes the long path \\?\ or \\?\UNC prefix. This can arise with strings provided by a native application.

      The JDK will automatically add the prefix when accessing a file with a long path so the prefix is not needed; it is otherwise is out of sight and not something exposed to Java code. At this time, if code calls Path.of with a string that has this prefix then the input will be rejected. We should consider changing this to allow the input, adjust the prefix, and don't parse or retain it.

            Assignee:
            Brian Burkhalter
            Reporter:
            Alan Bateman
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved: