Added a null check for the 'application.host' servlet context parameter

This commit is contained in:
Andrew Phillips 2011-06-30 16:13:26 -04:00
parent fae29d217e
commit 7debc1e3d6
1 changed files with 2 additions and 2 deletions

View File

@ -119,8 +119,8 @@ public class GuiceServletConfig extends GuiceServletContextListener {
}
private static URI withUrl(ServletContext servletContext, String url) {
return URI.create("http://" + servletContext.getInitParameter("application.host")
+ servletContext.getContextPath() + url);
return URI.create("http://" + checkNotNull(servletContext.getInitParameter("application.host"), "application.host")
+ servletContext.getContextPath() + url);
}
private Properties loadJCloudsProperties(