From 7debc1e3d6b66d62d0d9abc9bc7f8160acd2cf3c Mon Sep 17 00:00:00 2001 From: Andrew Phillips Date: Thu, 30 Jun 2011 16:13:26 -0400 Subject: [PATCH] Added a null check for the 'application.host' servlet context parameter --- .../jclouds/demo/tweetstore/config/GuiceServletConfig.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/demos/tweetstore/runatcloud-tweetstore/src/main/java/org/jclouds/demo/tweetstore/config/GuiceServletConfig.java b/demos/tweetstore/runatcloud-tweetstore/src/main/java/org/jclouds/demo/tweetstore/config/GuiceServletConfig.java index a8e76176aa..be3f0ce06f 100644 --- a/demos/tweetstore/runatcloud-tweetstore/src/main/java/org/jclouds/demo/tweetstore/config/GuiceServletConfig.java +++ b/demos/tweetstore/runatcloud-tweetstore/src/main/java/org/jclouds/demo/tweetstore/config/GuiceServletConfig.java @@ -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(