You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@wicket.apache.org by "Martin Grigorov (JIRA)" <ji...@apache.org> on 2012/12/06 16:41:09 UTC
[jira] [Created] (WICKET-4915)
org.apache.wicket.util.resource.Patht#find fails on Windows
Martin Grigorov created WICKET-4915:
---------------------------------------
Summary: org.apache.wicket.util.resource.Patht#find fails on Windows
Key: WICKET-4915
URL: https://issues.apache.org/jira/browse/WICKET-4915
Project: Wicket
Issue Type: Bug
Components: wicket
Affects Versions: 6.3.0
Reporter: Martin Grigorov
Assignee: Carl-Eric Menzel
Priority: Minor
Windows users report that test org.apache.wicket.util.resource.PathTest#loadFromRootUsingSubpathInFilename fails for them.
The suggested solution is to rework Path#find to:
@Override
public IResourceStream find(final Class<?> clazz, final String pathname)
{
final File file = new File(folder, pathname);
final File pathOnlyFile = new File(pathname);
if (file.exists())
{
return new FileResourceStream(file);
}
if (pathOnlyFile.exists())
{
return new FileResourceStream(pathOnlyFile);
}
else
{
return null;
}
}
but I'm not quite sure in this solution.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira