Author: hsaputra
Date: Fri May 20 13:12:17 2011
New Revision: 1125372

URL: http://svn.apache.org/viewvc?rev=1125372&view=rev
Log:
ServletContext.getContextPath does not throw checked exception. Remove the try 
catch that protecting it.

Modified:
    
shindig/trunk/java/common/src/main/java/org/apache/shindig/common/servlet/GuiceServletContextListener.java

Modified: 
shindig/trunk/java/common/src/main/java/org/apache/shindig/common/servlet/GuiceServletContextListener.java
URL: 
http://svn.apache.org/viewvc/shindig/trunk/java/common/src/main/java/org/apache/shindig/common/servlet/GuiceServletContextListener.java?rev=1125372&r1=1125371&r2=1125372&view=diff
==============================================================================
--- 
shindig/trunk/java/common/src/main/java/org/apache/shindig/common/servlet/GuiceServletContextListener.java
 (original)
+++ 
shindig/trunk/java/common/src/main/java/org/apache/shindig/common/servlet/GuiceServletContextListener.java
 Fri May 20 13:12:17 2011
@@ -52,8 +52,6 @@ public class GuiceServletContextListener
 
   public void contextInitialized(ServletContextEvent event) {
     ServletContext context = event.getServletContext();
-       
-
     setSystemProperties(context);     
     String moduleNames = context.getInitParameter(MODULES_ATTRIBUTE);
     List<Module> modules = Lists.newLinkedList();
@@ -103,12 +101,7 @@ public class GuiceServletContextListener
    * @param context the ServletContext
    */
   private void setSystemProperties(ServletContext context){
-    String contextRoot = "";
-    try {
-      contextRoot = context.getContextPath();
-    } catch (Exception e) {
-      contextRoot = "";
-    }
+    String contextRoot = context.getContextPath();
     System.setProperty("shindig.contextroot", contextRoot);
     String systemProperties = context.getInitParameter(SYSTEM_PROPERTIES);
     String key=null;


Reply via email to