]> source.dussan.org Git - vaadin-framework.git/commitdiff
Merged: Added null check and un-ignored exception
authorArtur Signell <artur.signell@itmill.com>
Mon, 2 Nov 2009 15:45:26 +0000 (15:45 +0000)
committerArtur Signell <artur.signell@itmill.com>
Mon, 2 Nov 2009 15:45:26 +0000 (15:45 +0000)
svn changeset:9580/svn branch:6.2

src/com/vaadin/terminal/gwt/server/ApplicationRunnerServlet.java

index 8ffd7b3f16cea14b86cf7fe92bdd57c62d1e8a55..896d4e651cc59e878de726747573996ab1438a13 100644 (file)
@@ -157,18 +157,22 @@ public class ApplicationRunnerServlet extends AbstractApplicationServlet {
             return appClass;
         } catch (Exception e) {
             //
-            for (int i = 0; i < defaultPackages.length; i++) {
-                try {
-                    appClass = (Class<? extends Application>) getClass()
-                            .getClassLoader().loadClass(
-                                    defaultPackages[i] + "." + baseName);
-                } catch (Exception e2) {
-                    // TODO: handle exception
-                }
-                if (appClass != null) {
-                    return appClass;
+            if (defaultPackages != null) {
+                for (int i = 0; i < defaultPackages.length; i++) {
+                    try {
+                        appClass = (Class<? extends Application>) getClass()
+                                .getClassLoader().loadClass(
+                                        defaultPackages[i] + "." + baseName);
+                    } catch (Exception e2) {
+                        // TODO: handle exception
+                        e2.printStackTrace();
+                    }
+                    if (appClass != null) {
+                        return appClass;
+                    }
                 }
             }
+
         }
 
         throw new ClassNotFoundException();