Merge pull request #94 from astappiev/patch-2
fix: Incorrect Last-Modified header for resources
diff --git a/impl/src/main/java/org/apache/myfaces/resource/ResourceLoaderUtils.java b/impl/src/main/java/org/apache/myfaces/resource/ResourceLoaderUtils.java
index a1e6456..c70286d 100644
--- a/impl/src/main/java/org/apache/myfaces/resource/ResourceLoaderUtils.java
+++ b/impl/src/main/java/org/apache/myfaces/resource/ResourceLoaderUtils.java
@@ -18,7 +18,6 @@
*/
package org.apache.myfaces.resource;
-import java.io.File;
import java.io.IOException;
import java.net.JarURLConnection;
import java.net.URL;
@@ -67,18 +66,7 @@
public static long getResourceLastModified(URL url) throws IOException
{
- if ("file".equals(url.getProtocol()))
- {
- String externalForm = url.toExternalForm();
- // Remove the "file:"
- File file = new File(externalForm.substring(5));
-
- return file.lastModified();
- }
- else
- {
- return getResourceLastModified(url.openConnection());
- }
+ return getResourceLastModified(url.openConnection());
}
public static long getResourceLastModified(URLConnection connection) throws IOException