ant-notifications mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jim Bonanno (JIRA)" <j...@apache.org>
Subject [jira] Created: (IVY-884) URLRepository does not allow some valid file scheme uri's
Date Wed, 20 Aug 2008 17:52:45 GMT
URLRepository does not allow some valid file scheme uri's
---------------------------------------------------------

                 Key: IVY-884
                 URL: https://issues.apache.org/jira/browse/IVY-884
             Project: Ivy
          Issue Type: Bug
          Components: Core
    Affects Versions: 2.0.0-beta-1
            Reporter: Jim Bonanno


We hit an interesting problem when we set a valid uri in a URL resolver, but the URLRepository
could not list the repository.

The problem was the uri was a file: scheme and the path had a space in it. The toString method
for URI will escape the space and replace them with %20. URI.getPath will decode the %20 back
into a space for listing, but URL.getPath will not.

URLRepository has support for the file: scheme, but uses URL to get the path ( new URL(parent).getPath()
) instead of URI.

Here is the fix we are using in list.

        } else if (parent.startsWith("file")) {
            try {
                String path = new URI(parent).getPath();


This is probably not a common problem because it requires a URL resolver with a URI using
the file: scheme and a character that needs to be escaped, like a space

I looked at the current source and this is still an issue. We hit the issue with beta-1 and
currently stepping up to beta-2.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


Mime
View raw message