Description
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.