Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-6916645

FileObject.toUri produces unusable URI for UNC paths

    XMLWordPrintable

    Details

    • Subcomponent:
    • CPU:
      x86
    • OS:
      windows_xp

      Description

      When an annotation processor is working with a file - say, a resource found in the source location - and calls FileObject.toUri on it, normally (assuming #6419926 is fixed) a file:/... URI is returned which can then be used to refer to that resource, say by passing it to an XML parser.

      When however the source tree is located on a Windows UNC share (\\server\share\path\...), the returned URI is of the form

        file:////server/share/path/...

      This has well-known problems documented in #4723726; namely, the normalized form is

        file:/server/share/path/...

      which translates to a different (likely nonexistent) file path.

      The desired form is that specified by Microsoft:

        file://server/share/path/...

      (Of course other code such as XML parsers then needs to handle proper UNC URIs as well, but that is outside the scope of the compiler.)

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              jjg Jonathan Gibbons
              Reporter:
              jglick Jesse Glick (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

                Dates

                Created:
                Updated:
                Imported:
                Indexed: