Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJoakim Erdfelt2014-06-25 17:11:44 -0400
committerJoakim Erdfelt2014-06-25 17:11:44 -0400
commit9f844383cdb528d67ec69895dd8c6117b6e36e13 (patch)
tree87a3b8c9bd858466702f0525c947df59bb18ffa2 /jetty-osgi/jetty-osgi-boot/src
parent45a0690ba7d15ec8a388be9e1ad54f1260650da4 (diff)
downloadorg.eclipse.jetty.project-9f844383cdb528d67ec69895dd8c6117b6e36e13.tar.gz
org.eclipse.jetty.project-9f844383cdb528d67ec69895dd8c6117b6e36e13.tar.xz
org.eclipse.jetty.project-9f844383cdb528d67ec69895dd8c6117b6e36e13.zip
Making PathResource the default for "file://" resources
+ Making ResourceTest a proper @Parameterized test case + Moving jar tests out of ResourceTest into JarResourceTest + Moving classpath tests out of ResourceTest into ClassPathResourceTest + Making more improvements to PathResource to satisfy expecations in the rest of the codebase. + Requests for resource subpaths that use "//" in their strings will now work correctly (it used to result in null requests in FileResource)
Diffstat (limited to 'jetty-osgi/jetty-osgi-boot/src')
-rw-r--r--jetty-osgi/jetty-osgi-boot/src/main/java/org/eclipse/jetty/osgi/boot/utils/internal/DefaultFileLocatorHelper.java5
1 files changed, 3 insertions, 2 deletions
diff --git a/jetty-osgi/jetty-osgi-boot/src/main/java/org/eclipse/jetty/osgi/boot/utils/internal/DefaultFileLocatorHelper.java b/jetty-osgi/jetty-osgi-boot/src/main/java/org/eclipse/jetty/osgi/boot/utils/internal/DefaultFileLocatorHelper.java
index fed6f8b6cf..35eb00b697 100644
--- a/jetty-osgi/jetty-osgi-boot/src/main/java/org/eclipse/jetty/osgi/boot/utils/internal/DefaultFileLocatorHelper.java
+++ b/jetty-osgi/jetty-osgi-boot/src/main/java/org/eclipse/jetty/osgi/boot/utils/internal/DefaultFileLocatorHelper.java
@@ -33,6 +33,7 @@ import java.util.zip.ZipFile;
import org.eclipse.jetty.osgi.boot.utils.BundleFileLocatorHelper;
import org.eclipse.jetty.util.URIUtil;
import org.eclipse.jetty.util.resource.FileResource;
+import org.eclipse.jetty.util.resource.PathResource;
import org.eclipse.jetty.util.resource.Resource;
import org.osgi.framework.Bundle;
@@ -100,10 +101,10 @@ public class DefaultFileLocatorHelper implements BundleFileLocatorHelper
if (url.getProtocol().equals("file"))
{
- // some osgi frameworks do use the file protocole directly in some
+ // some osgi frameworks do use the file protocol directly in some
// situations. Do use the FileResource to transform the URL into a
// File: URL#toURI is broken
- return new FileResource(url).getFile().getParentFile().getParentFile();
+ return new PathResource(url).getFile().getParentFile().getParentFile();
}
else if (url.getProtocol().equals("bundleentry"))
{

Back to the top