Follow-up to tobyr feedback on r9509.

http://gwt-code-reviews.appspot.com/1264801/show

Review by: tobyr@google.com

git-svn-id: https://google-web-toolkit.googlecode.com/svn/trunk@9516 8db76d5a-ed1c-0410-87a9-c151d255dfc7
diff --git a/dev/core/src/com/google/gwt/dev/DevMode.java b/dev/core/src/com/google/gwt/dev/DevMode.java
index 832d38f..db3e200 100644
--- a/dev/core/src/com/google/gwt/dev/DevMode.java
+++ b/dev/core/src/com/google/gwt/dev/DevMode.java
@@ -402,7 +402,7 @@
     // Background scan the classpath to warm the cache.
     Thread scanThread = new Thread(new Runnable() {
       public void run() {
-        ResourceOracleImpl.preload(getTopLogger());
+        ResourceOracleImpl.preload(TreeLogger.NULL);
       }
     });
     scanThread.setDaemon(true);
diff --git a/dev/core/src/com/google/gwt/dev/cfg/ModuleDef.java b/dev/core/src/com/google/gwt/dev/cfg/ModuleDef.java
index 5d07787..4765aaf 100644
--- a/dev/core/src/com/google/gwt/dev/cfg/ModuleDef.java
+++ b/dev/core/src/com/google/gwt/dev/cfg/ModuleDef.java
@@ -243,7 +243,7 @@
   }
 
   public synchronized Resource findPublicFile(String partialPath) {
-    doRefresh(TreeLogger.NULL);
+    doRefresh();
     return lazyPublicOracle.getResourceMap().get(partialPath);
   }
 
@@ -275,7 +275,7 @@
    * @return the resource for the requested source file
    */
   public synchronized Resource findSourceFile(String partialPath) {
-    doRefresh(TreeLogger.NULL);
+    doRefresh();
     return lazySourceOracle.getResourceMap().get(partialPath);
   }
 
@@ -298,7 +298,7 @@
   }
 
   public String[] getAllPublicFiles() {
-    doRefresh(TreeLogger.NULL);
+    doRefresh();
     return lazyPublicOracle.getPathNames().toArray(Empty.STRINGS);
   }
 
@@ -307,7 +307,7 @@
    * oracle has been initialized.
    */
   public String[] getAllSourceFiles() {
-    doRefresh(TreeLogger.NULL);
+    doRefresh();
     return lazySourceOracle.getPathNames().toArray(Empty.STRINGS);
   }
 
@@ -321,7 +321,7 @@
 
   public synchronized CompilationState getCompilationState(TreeLogger logger)
       throws UnableToCompleteException {
-    doRefresh(TreeLogger.NULL);
+    doRefresh();
     CompilationState compilationState = CompilationStateBuilder.buildFrom(
         logger, lazySourceOracle.getResources());
     checkForSeedTypes(logger, compilationState);
@@ -368,7 +368,7 @@
       lazyResourcesOracle.setPathPrefixes(newPathPrefixes);
       ResourceOracleImpl.refresh(TreeLogger.NULL, lazyResourcesOracle);
     } else {
-      doRefresh(TreeLogger.NULL);
+      doRefresh();
     }
     return lazyResourcesOracle;
   }
@@ -424,7 +424,7 @@
     servletClassNamesByPath.put(path, servletClassName);
   }
 
-  public synchronized void refresh(TreeLogger logger) {
+  public synchronized void refresh() {
     needsRefresh = true;
   }
 
@@ -519,21 +519,19 @@
     }
   }
 
-  private synchronized void doRefresh(TreeLogger logger) {
+  private synchronized void doRefresh() {
     if (!needsRefresh) {
       return;
     }
     Event moduleDefEvent = SpeedTracerLogger.start(
         CompilerEventType.MODULE_DEF, "phase", "refresh", "module", getName());
-    logger = logger.branch(TreeLogger.DEBUG, "Refreshing module '" + getName()
-        + "'");
-
     // Refresh resource oracles.
     if (lazyResourcesOracle == null) {
-      ResourceOracleImpl.refresh(logger, lazyPublicOracle, lazySourceOracle);
+      ResourceOracleImpl.refresh(TreeLogger.NULL, lazyPublicOracle,
+          lazySourceOracle);
     } else {
-      ResourceOracleImpl.refresh(logger, lazyPublicOracle, lazySourceOracle,
-          lazyResourcesOracle);
+      ResourceOracleImpl.refresh(TreeLogger.NULL, lazyPublicOracle,
+          lazySourceOracle, lazyResourcesOracle);
     }
     moduleDefEvent.end();
     needsRefresh = false;
diff --git a/dev/core/src/com/google/gwt/dev/cfg/ModuleDefLoader.java b/dev/core/src/com/google/gwt/dev/cfg/ModuleDefLoader.java
index c047a8c..8db04a1 100644
--- a/dev/core/src/com/google/gwt/dev/cfg/ModuleDefLoader.java
+++ b/dev/core/src/com/google/gwt/dev/cfg/ModuleDefLoader.java
@@ -90,7 +90,7 @@
   public static ModuleDef createSyntheticModule(TreeLogger logger,
       String moduleName, String[] inherits, boolean refresh)
       throws UnableToCompleteException {
-    ModuleDef moduleDef = tryGetLoadedModule(logger, moduleName, refresh);
+    ModuleDef moduleDef = tryGetLoadedModule(moduleName, refresh);
     if (moduleDef != null) {
       return moduleDef;
     }
@@ -139,7 +139,7 @@
       if (physicalName != null) {
         moduleName = physicalName;
       }
-      ModuleDef moduleDef = tryGetLoadedModule(logger, moduleName, refresh);
+      ModuleDef moduleDef = tryGetLoadedModule(moduleName, refresh);
       if (moduleDef != null) {
         return moduleDef;
       }
@@ -150,13 +150,12 @@
     }
   }
 
-  private static ModuleDef tryGetLoadedModule(TreeLogger logger,
-      String moduleName, boolean refresh) {
+  private static ModuleDef tryGetLoadedModule(String moduleName, boolean refresh) {
     ModuleDef moduleDef = loadedModules.get(moduleName);
     if (moduleDef == null || moduleDef.isGwtXmlFileStale()) {
       return null;
     } else if (refresh) {
-      moduleDef.refresh(logger);
+      moduleDef.refresh();
     }
     return moduleDef;
   }