Bugs item #1462587, was opened at 2006-04-01 12:00
Message generated for change (Tracker Item Submitted) made by Item Submitter
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=684975&aid=1462587&group_id=119783

Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: core
Group: 1.2
Status: Open
Resolution: None
Priority: 5
Submitted By: Arto Arffman (artoarffman)
Assigned to: Nobody/Anonymous (nobody)
Summary: PackageResource.get() fails when blanks in path

Initial Comment:
Method:
public static PackageResource[] get(Class scope, 
Pattern pattern, boolean recurse)

fails if there are blanks in the path.

Unit test (run with wicket in a directory that 
contains blanks):
public class PackageResource2Test extends TestCase
{

        /*
         * Test method 
for 'wicket.markup.html.PackageResource.get(Class, 
Pattern, boolean)'
         */
        public void testGetClassPatternBoolean()
        {
                PackageResource.get(this.getClass(), 
PackageResource.EXTENSION_JS, false);
        }

}

I managed to get this working by changing following 
lines:
String absolutePath = scope.getResource("").getPath();
File basedir = new File(absolutePath);



to:
String absolutePath = scope.getResource
("").toExternalForm();
File basedir;
try
{
        basedir = new File(new URI(absolutePath));
}
catch (URISyntaxException e)
{
        throw new RuntimeException(e);
}


----------------------------------------------------------------------

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=684975&aid=1462587&group_id=119783


-------------------------------------------------------
This SF.Net email is sponsored by xPML, a groundbreaking scripting language
that extends applications into web and mobile media. Attend the live webcast
and join the prime developer group breaking into this new coding territory!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=110944&bid=241720&dat=121642
_______________________________________________
Wicket-develop mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/wicket-develop

Reply via email to