JavaFileObject.toUri returns bogus URI (win)

XMLWordPrintable

    • Type: Bug
    • Resolution: Fixed
    • Priority: P3
    • 7
    • Affects Version/s: 7
    • Component/s: tools
    • b72
    • generic
    • generic
    • Verified

        The spec for File.toUri contains the following:

        >> For a given abstract pathname f, it is guaranteed that
        >> new File( f.toURI()).equals( f.getAbsoluteFile())


        On Windows, the result of f.toUri() is something like
        file://C/w/jjg/work/....
        When I try and use new File(f.toUri()) I get the following exception

        java.lang.IllegalArgumentException: URI has an authority component

        This is with JDK 1.7, on Windows XP SP2, using Cygwin.

              Assignee:
              Jonathan Gibbons
              Reporter:
              Jonathan Gibbons
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Created:
                Updated:
                Resolved:
                Imported:
                Indexed: