tomee-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From andygumbre...@apache.org
Subject svn commit: r1566576 - /tomee/tomee/trunk/tomee/tomee-catalina/src/main/java/org/apache/tomee/catalina/TomcatWebAppBuilder.java
Date Mon, 10 Feb 2014 10:54:07 GMT
Author: andygumbrecht
Date: Mon Feb 10 10:54:07 2014
New Revision: 1566576

URL: http://svn.apache.org/r1566576
Log:
Check for content.

Modified:
    tomee/tomee/trunk/tomee/tomee-catalina/src/main/java/org/apache/tomee/catalina/TomcatWebAppBuilder.java

Modified: tomee/tomee/trunk/tomee/tomee-catalina/src/main/java/org/apache/tomee/catalina/TomcatWebAppBuilder.java
URL: http://svn.apache.org/viewvc/tomee/tomee/trunk/tomee/tomee-catalina/src/main/java/org/apache/tomee/catalina/TomcatWebAppBuilder.java?rev=1566576&r1=1566575&r2=1566576&view=diff
==============================================================================
--- tomee/tomee/trunk/tomee/tomee-catalina/src/main/java/org/apache/tomee/catalina/TomcatWebAppBuilder.java
(original)
+++ tomee/tomee/trunk/tomee/tomee-catalina/src/main/java/org/apache/tomee/catalina/TomcatWebAppBuilder.java
Mon Feb 10 10:54:07 2014
@@ -2064,7 +2064,15 @@ public class TomcatWebAppBuilder impleme
      * @param standardContext tomcat context instance
      */
     private void loadWebModule(final AppModule appModule, final StandardContext standardContext)
{
-        final WebModule webModule = appModule.getWebModules().get(0);
+        final List<WebModule> webModules = appModule.getWebModules();
+
+        if (webModules.isEmpty()) {
+            final File file = appModule.getFile();
+            logger.error("Failed to find a single module in: " + file);
+            return;
+        }
+
+        final WebModule webModule = webModules.get(0);
         final WebApp webApp = webModule.getWebApp();
 
         // create the web module



Mime
View raw message