While working on improving resource loading I came across the following issue:
IResourceFinder: URL find(String path);
xxxResourceStreamLocator: IResourceStream locate(Class, String path)
locate(..)
{
URL file = finder.find(path)
if (file != null)
{
IResourceStream stream = new UrlResourceStream(file)
}
}
The implicit assumption is that if 'file' != null than 'stream' will
be != null as well. But that doesn't seem to be true, I did some
tests. The reason being that the classloader used by the
ResourceFinder may not be the one used by new UrlResourceStream().
solution: change find() to return an IResourceStream instead of a URL
any other idea?
Juergen