Uploaded image for project: 'Santuario'
  1. Santuario
  2. SANTUARIO-566

Path.toUri().toString() result not supported on Windows

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • Java 2.2.1
    • Java 2.3.0, Java 2.2.2
    • Java
    • None

    Description

      The `Path.toUri().toString()` method returns something like `file:///C:/path/to/file` but ResolverLocalFilesystem [1] prefers `file:/c:/path/to/file`.

      One can use either `new File(URI)` or `Path.of(URI)` to convert a URI into a file path. Both `new File(new URI(“file:/c:/p/t/f”))` and `new File(new URI(“file:///c:/p/t/f”))` return the correct result.

      [1] https://github.com/openjdk/jdk/blob/cb742f956078f420be328d7899fcba768939020f/src/java.xml.crypto/share/classes/com/sun/org/apache/xml/internal/security/utils/resolver/implementations/ResolverLocalFilesystem.java#L76

      Attachments

        Activity

          People

            coheigea Colm O hEigeartaigh
            weijun Weijun Wang
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: