fix some trivial issues when building the lookup path of a webbundle.
git-svn-id: svn+ssh://dev.eclipse.org/svnroot/rt/org.eclipse.jetty/jetty/trunk@3388 7e9141cc-0065-0410-87d8-b60c137991c4
This commit is contained in:
parent
d29a7dad41
commit
a90071355a
|
@ -587,13 +587,23 @@ public class WebBundleDeployerHelper implements IWebBundleDeployerHelper
|
|||
}
|
||||
if (resEnum != null && resEnum.hasMoreElements())
|
||||
{
|
||||
if (resfrags == null)
|
||||
{
|
||||
resfrags = new ArrayList<Resource>();
|
||||
wah.setAttribute(WebInfConfiguration.RESOURCE_URLS, resfrags);
|
||||
}
|
||||
resfrags.add(Resource.newResource(
|
||||
DefaultFileLocatorHelper.getLocalURL(frag.getEntry("/META-INF/resources"))));
|
||||
URL resourcesEntry = frag.getEntry("/META-INF/resources/");
|
||||
if (resourcesEntry == null)
|
||||
{
|
||||
//probably we found some fragments to a bundle.
|
||||
//those are already contributed.
|
||||
//so we skip this.
|
||||
}
|
||||
else
|
||||
{
|
||||
if (resfrags == null)
|
||||
{
|
||||
resfrags = new ArrayList<Resource>();
|
||||
wah.setAttribute(WebInfConfiguration.RESOURCE_URLS, resfrags);
|
||||
}
|
||||
resfrags.add(Resource.newResource(
|
||||
DefaultFileLocatorHelper.getLocalURL(resourcesEntry)));
|
||||
}
|
||||
}
|
||||
if (tldEnum != null && tldEnum.hasMoreElements())
|
||||
{
|
||||
|
|
|
@ -285,6 +285,7 @@ public class DefaultFileLocatorHelper implements BundleFileLocatorHelper
|
|||
return (URL)BUNDLE_URL_CONNECTION_getLocalURL.invoke(conn, null);
|
||||
}
|
||||
} catch (Throwable t) {
|
||||
System.err.println("Unable to locate the OSGi url: '" + url + "'.");
|
||||
t.printStackTrace();
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue