Revision: 7472
Author: j...@google.com
Date: Tue Jan 26 10:56:02 2010
Log: Merge trunk r7471 into this branch

  DevMode NPE

  svn merge --ignore-ancestry -c 7471 \
      http://google-web-toolkit.googlecode.com/svn/trunk .


http://code.google.com/p/google-web-toolkit/source/detail?r=7472

Modified:
 /releases/2.0/branch-info.txt
 /releases/2.0/dev/core/src/com/google/gwt/dev/DevMode.java
 /releases/2.0/dev/core/src/com/google/gwt/dev/DevModeBase.java

=======================================
--- /releases/2.0/branch-info.txt       Tue Jan 26 10:48:47 2010
+++ /releases/2.0/branch-info.txt       Tue Jan 26 10:56:02 2010
@@ -1340,3 +1340,8 @@
   Issue 4386
   svn merge --ignore-ancestry -c 7469 \
       http://google-web-toolkit.googlecode.com/svn/trunk .
+
+tr...@7471 was merged into this branch
+  DevMode NPE
+  svn merge --ignore-ancestry -c 7471 \
+      http://google-web-toolkit.googlecode.com/svn/trunk .
=======================================
--- /releases/2.0/dev/core/src/com/google/gwt/dev/DevMode.java Fri Jan 22 13:25:30 2010 +++ /releases/2.0/dev/core/src/com/google/gwt/dev/DevMode.java Tue Jan 26 10:56:02 2010
@@ -382,6 +382,14 @@

   @Override
   protected int doStartUpServer() {
+    // Create the war directory if it doesn't exist
+    File warDir = options.getWarDir();
+    if (!warDir.exists() && !warDir.mkdirs()) {
+ getTopLogger().log(TreeLogger.ERROR, "Unable to create war directory "
+          + warDir);
+      return -1;
+    }
+
     boolean clearCallback = true;
     try {
       ui.setCallback(RestartServerEvent.getType(), this);
@@ -437,6 +445,10 @@
   protected void inferStartupUrls() {
     // Look for launchable files directly under war
     File warDir = options.getWarDir();
+    if (!warDir.exists()) {
+ // if the war directory doesn't exist, there are no startup files there
+      return;
+    }
     for (File htmlFile : warDir.listFiles(new FilenameFilter() {
       public boolean accept(File dir, String name) {
         return STARTUP_FILE_PATTERN.matcher(name).matches();
=======================================
--- /releases/2.0/dev/core/src/com/google/gwt/dev/DevModeBase.java Fri Jan 22 13:25:30 2010 +++ /releases/2.0/dev/core/src/com/google/gwt/dev/DevModeBase.java Tue Jan 26 10:56:02 2010
@@ -1040,13 +1040,21 @@
       getTopLogger().log(TreeLogger.TRACE,
           "Started web server on port " + resultPort);
     }
-
+
     if (options.getStartupURLs().isEmpty()) {
+      // if no URLs were supplied, try and find plausible ones
       inferStartupUrls();
     }

-    setStartupUrls(topLogger);
-
+    if (options.getStartupURLs().isEmpty()) {
+      // TODO(jat): we could walk public resources to find plausible URLs
+      // after the module(s) are loaded
+ getTopLogger().log(TreeLogger.WARN, "No startup URLs supplied or found "
+          + "-- supply them on the command line");
+    }
+
+    setStartupUrls(getTopLogger());
+
     if (!doSlowStartup()) {
       return false;
     }

--
http://groups.google.com/group/Google-Web-Toolkit-Contributors

Reply via email to