google-code-export / wro4j

Automatically exported from code.google.com/p/wro4j
1 stars 1 forks source link

ClasspathUriLocator fails to find wildcards resources when the application path has spaces in it #687

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Use wro4j in an application that has spaces in its path.
2. Create a wro4j model that includes classpath resources with wildcards.
3. Include the wro4j generated files in a page.

What is the expected output? What do you see instead?
Expect correct operation, instead get 404s for the wro4j generated files.

What version of the product are you using? On what operating system?
1.50, OSX

Please provide any additional information below.

The ClasspathUriLocator.locateWildcardStream method constructs a File from a 
URL.getFile() return value without decoding it first.

This causes file not found errors when used with paths that have spaces in them 
since the spaces are encoded as "%20".

One solution would be to do something like the following instead:

new File( URLDecoder.decode( url.getFile(), "UTF-8" ) )

Original issue reported on code.google.com by fpjonso...@gmail.com on 4 Mar 2013 at 11:24

GoogleCodeExporter commented 9 years ago

Original comment by alex.obj...@gmail.com on 5 Mar 2013 at 9:33

GoogleCodeExporter commented 9 years ago
Fixed in branch 1.6.x

Original comment by alex.obj...@gmail.com on 9 Mar 2013 at 11:17