Author: rickhall
Date: Mon Aug  4 09:06:48 2008
New Revision: 682433

URL: http://svn.apache.org/viewvc?rev=682433&view=rev
Log:
Applied patch (FELIX-582) to return Bundle.getLastModified() for bundle
URLs lastModified().

Modified:
    
felix/trunk/framework/src/main/java/org/apache/felix/framework/URLHandlersBundleURLConnection.java

Modified: 
felix/trunk/framework/src/main/java/org/apache/felix/framework/URLHandlersBundleURLConnection.java
URL: 
http://svn.apache.org/viewvc/felix/trunk/framework/src/main/java/org/apache/felix/framework/URLHandlersBundleURLConnection.java?rev=682433&r1=682432&r2=682433&view=diff
==============================================================================
--- 
felix/trunk/framework/src/main/java/org/apache/felix/framework/URLHandlersBundleURLConnection.java
 (original)
+++ 
felix/trunk/framework/src/main/java/org/apache/felix/framework/URLHandlersBundleURLConnection.java
 Mon Aug  4 09:06:48 2008
@@ -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;
         }


Reply via email to