Modified the bundle resource URL creation method to use the handlers from
the new URL Handlers service.
git-svn-id: https://svn.apache.org/repos/asf/incubator/felix/trunk@331745 13f79535-47bb-0310-9956-ffa450edef68
diff --git a/framework/src/org/apache/felix/framework/OSGiURLPolicy.java b/framework/src/org/apache/felix/framework/OSGiURLPolicy.java
index 7f424bc..5c9c299 100644
--- a/framework/src/org/apache/felix/framework/OSGiURLPolicy.java
+++ b/framework/src/org/apache/felix/framework/OSGiURLPolicy.java
@@ -25,13 +25,13 @@
public class OSGiURLPolicy implements URLPolicy
{
- private Felix m_felix = null;
- private BundleURLStreamHandler m_handler = null;
+ private Felix m_framework = null;
+ private URLHandlersBundleStreamHandler m_bundleHandler = null;
private FakeURLStreamHandler m_fakeHandler = null;
- public OSGiURLPolicy(Felix felix)
+ public OSGiURLPolicy(Felix framework)
{
- m_felix = felix;
+ m_framework = framework;
}
public URL createCodeSourceURL(ModuleManager mgr, Module module)
@@ -75,9 +75,9 @@
public URL createResourceURL(ModuleManager mgr, Module module, int rsIdx, String name)
{
- if (m_handler == null)
+ if (m_bundleHandler == null)
{
- m_handler = new BundleURLStreamHandler(mgr);
+ m_bundleHandler = new URLHandlersBundleStreamHandler(m_framework);
}
// Add a slash if there is one already, otherwise
@@ -98,7 +98,7 @@
else
{
return new URL(FelixConstants.BUNDLE_URL_PROTOCOL,
- module.getId(), -1, "/" + rsIdx + name, m_handler);
+ module.getId(), -1, "/" + rsIdx + name, m_bundleHandler);
}
}
catch (Exception ex)
@@ -127,7 +127,8 @@
public Object run() throws Exception
{
- return new URL("bundle", m_id, -1, "/" + m_rsIdx + m_name, m_handler);
+ return new URL(FelixConstants.BUNDLE_URL_PROTOCOL,
+ m_id, -1, "/" + m_rsIdx + m_name, m_bundleHandler);
}
}
}
\ No newline at end of file