diff --git a/org.apache.felix.framework/src/main/java/org/apache/felix/framework/Felix.java b/org.apache.felix.framework/src/main/java/org/apache/felix/framework/Felix.java
index cdf8871..ce789ff 100644
--- a/org.apache.felix.framework/src/main/java/org/apache/felix/framework/Felix.java
+++ b/org.apache.felix.framework/src/main/java/org/apache/felix/framework/Felix.java
@@ -922,52 +922,6 @@
         return false;
     }
 
-    /**
-     * <p>
-     * This method returns an input stream for the specified bundle resource
-     * URL.
-     * </p>
-     * @param url the URL representing the bundle resource for which an input
-     *        stream is desired.
-     * @return an input stream to the bundle resource.
-     * @throws IOException if the input stream could not be created.
-    **/
-/*
- This might note be needed due to changes in URLHandlersBundleURLConnection
-
-    protected InputStream getBundleResourceInputStream(URL url)
-        throws IOException
-    {
-        // The URL is constructed like this:
-        // bundle://<module-id>/<source-idx>/<resource-path>
-    
-        IModule module = m_factory.getModule(url.getHost());
-        if (module == null)
-        {
-            throw new IOException("Unable to find bundle's module.");
-        }
-    
-        String resource = url.getFile();
-        if (resource == null)
-        {
-            throw new IOException("Unable to find resource: " + url.toString());
-        }
-
-        // Remove any leading slash.
-        if (resource.startsWith("/"))
-        {
-            resource = resource.substring(1);
-        }
-
-        // Get the resource bytes from the resource source.
-        byte[] bytes = module.getContentLoader().getResourceBytes(resource);
-        if (bytes == null)
-        {
-            throw new IOException("Unable to find resource: " + url.toString());
-        }
-        return new ByteArrayInputStream(bytes);
-    }
-*/
     //
     // Implementation of Bundle interface methods.
     //
@@ -1009,7 +963,7 @@
         {
             AccessController.checkPermission(m_adminPerm);
         }
-        return bundle.getInfo().getCurrentModule().getContentLoader().getResource(name);
+        return bundle.getInfo().getCurrentModule().getResource(name);
     }
 
     protected ServiceReference[] getBundleRegisteredServices(BundleImpl bundle)
