Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGreg Wilkins2013-06-07 05:48:22 +0000
committerGreg Wilkins2013-06-07 05:48:22 +0000
commitd2794584e1692b8312457f05afb8cd91445eb285 (patch)
tree3f5a8f2630e17936acb876181b0f1e5af4d22201 /jetty-osgi
parent41ac4a0877aedf078bfc15714c9cf6d8d82802aa (diff)
parentb86344e2693dd18ac086fb837a26fdda1e303946 (diff)
downloadorg.eclipse.jetty.project-d2794584e1692b8312457f05afb8cd91445eb285.tar.gz
org.eclipse.jetty.project-d2794584e1692b8312457f05afb8cd91445eb285.tar.xz
org.eclipse.jetty.project-d2794584e1692b8312457f05afb8cd91445eb285.zip
Merge remote-tracking branch 'origin/master' into servlet-3.1-api
Conflicts: jetty-server/src/main/java/org/eclipse/jetty/server/HttpChannel.java jetty-server/src/main/java/org/eclipse/jetty/server/HttpOutput.java jetty-server/src/main/java/org/eclipse/jetty/server/Response.java
Diffstat (limited to 'jetty-osgi')
-rw-r--r--jetty-osgi/jetty-osgi-boot/src/main/java/org/eclipse/jetty/osgi/boot/AbstractContextProvider.java25
1 files changed, 6 insertions, 19 deletions
diff --git a/jetty-osgi/jetty-osgi-boot/src/main/java/org/eclipse/jetty/osgi/boot/AbstractContextProvider.java b/jetty-osgi/jetty-osgi-boot/src/main/java/org/eclipse/jetty/osgi/boot/AbstractContextProvider.java
index b15d6179db..f056bfb47d 100644
--- a/jetty-osgi/jetty-osgi-boot/src/main/java/org/eclipse/jetty/osgi/boot/AbstractContextProvider.java
+++ b/jetty-osgi/jetty-osgi-boot/src/main/java/org/eclipse/jetty/osgi/boot/AbstractContextProvider.java
@@ -169,7 +169,7 @@ public abstract class AbstractContextProvider extends AbstractLifeCycle implemen
jettyHome = jettyHome.substring(0,jettyHome.length()-1);
res = getFileAsResource(jettyHome, _contextFile);
- if (LOG.isDebugEnabled()) LOG.debug("jetty home context file:"+res);
+ LOG.debug("jetty home context file: {}",res);
}
}
}
@@ -179,8 +179,11 @@ public abstract class AbstractContextProvider extends AbstractLifeCycle implemen
{
if (bundleOverrideLocation != null)
{
- res = getFileAsResource(Resource.newResource(bundleOverrideLocation).getFile(), _contextFile);
- if (LOG.isDebugEnabled()) LOG.debug("Bundle override location context file:"+res);
+ try(Resource location=Resource.newResource(bundleOverrideLocation))
+ {
+ res=location.addPath(_contextFile);
+ }
+ LOG.debug("Bundle override location context file: {}",res);
}
}
@@ -295,22 +298,6 @@ public abstract class AbstractContextProvider extends AbstractLifeCycle implemen
}
return r;
}
-
- private Resource getFileAsResource (File dir, String file)
- {
- Resource r = null;
- try
- {
- File asFile = new File (dir, file);
- if (asFile.exists())
- r = Resource.newResource(asFile);
- }
- catch (Exception e)
- {
- r = null;
- }
- return r;
- }
}
/* ------------------------------------------------------------ */

Back to the top