if (hostData != null)
hostBundleID = hostData.getBundleID();
path = fixTrailingSlash(path, bundleEntry);
try {
//use the constant string for the protocol to prevent duplication
return secureAction.getURL(Constants.OSGI_RESOURCE_URL_PROTOCOL, Long.toString(hostBundleID) + BundleResourceHandler.BID_FWKID_SEPARATOR + Integer.toString(hostData.getAdaptor().hashCode()), index, path, new Handler(bundleEntry, hostData == null ? null : hostData.getAdaptor()));
} catch (MalformedURLException e) {
return null;
}
}