You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@santuario.apache.org by "Colm O hEigeartaigh (Jira)" <ji...@apache.org> on 2021/05/04 07:05:00 UTC

[jira] [Closed] (SANTUARIO-566) Path.toUri().toString() result not supported on Windows

     [ https://issues.apache.org/jira/browse/SANTUARIO-566?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Colm O hEigeartaigh closed SANTUARIO-566.
-----------------------------------------

> Path.toUri().toString() result not supported on Windows
> -------------------------------------------------------
>
>                 Key: SANTUARIO-566
>                 URL: https://issues.apache.org/jira/browse/SANTUARIO-566
>             Project: Santuario
>          Issue Type: Bug
>          Components: Java
>    Affects Versions: Java 2.2.1
>            Reporter: Weijun Wang
>            Assignee: Colm O hEigeartaigh
>            Priority: Major
>             Fix For: Java 2.3.0, Java 2.2.2
>
>
> The `Path.toUri().toString()` method returns something like `[file:///C:/path/to/file`|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]



--
This message was sent by Atlassian Jira
(v8.3.4#803005)