Applied patch (FELIX-582) to return Bundle.getLastModified() for bundle
URLs lastModified().


git-svn-id: https://svn.apache.org/repos/asf/felix/trunk@682433 13f79535-47bb-0310-9956-ffa450edef68
diff --git a/framework/src/main/java/org/apache/felix/framework/URLHandlersBundleURLConnection.java b/framework/src/main/java/org/apache/felix/framework/URLHandlersBundleURLConnection.java
index add726c..aaa2473 100644
--- a/framework/src/main/java/org/apache/felix/framework/URLHandlersBundleURLConnection.java
+++ b/framework/src/main/java/org/apache/felix/framework/URLHandlersBundleURLConnection.java
@@ -70,6 +70,8 @@
         {
             throw new IOException("No bundle associated with resource: " + url);
         }
+        m_contentTime = bundle.getLastModified();
+
         int revision = Util.getModuleRevisionFromModuleId(url.getHost());
         IModule[] modules = bundle.getInfo().getModules();
         if ((modules == null) || (revision >= modules.length))
@@ -82,6 +84,7 @@
         {
             revision = modules.length - 1;
         }
+
         // If the resource cannot be found at the current class path index,
         // then search them all in order to see if it can be found. This is
         // necessary since the user might create a resource URL from another
@@ -117,7 +120,6 @@
             m_is = m_targetModule.getContentLoader()
                 .getInputStream(m_classPathIdx, url.getPath());
             m_contentLength = (m_is == null) ? 0 : m_is.available();
-            m_contentTime = 0L;
             m_contentType = URLConnection.guessContentTypeFromName(url.getFile());
             connected = true;
         }