Issue 34812: Fix findbugs & checkstyle issues

Review by: jat



git-svn-id: https://google-web-toolkit.googlecode.com/svn/trunk@5410 8db76d5a-ed1c-0410-87a9-c151d255dfc7
diff --git a/build-tools/ant-gwt/src/com/google/gwt/ant/taskdefs/CommandRunner.java b/build-tools/ant-gwt/src/com/google/gwt/ant/taskdefs/CommandRunner.java
index 8f9881e..eaa4da6 100644
--- a/build-tools/ant-gwt/src/com/google/gwt/ant/taskdefs/CommandRunner.java
+++ b/build-tools/ant-gwt/src/com/google/gwt/ant/taskdefs/CommandRunner.java
@@ -56,6 +56,14 @@
     } catch (InterruptedException e) {
       throw new BuildException("Interrupted waiting for command: "
           + makeCmdString(cmd), e);
+    } finally {
+      if (lnr != null) {
+        try {
+          lnr.close();
+        } catch (IOException e) {
+          // do nothing
+        }
+      }
     }
   }
 
diff --git a/build-tools/customchecks/src/com/google/gwt/checkstyle/OrderCheck.java b/build-tools/customchecks/src/com/google/gwt/checkstyle/OrderCheck.java
index 9ca0e16..5e69331 100644
--- a/build-tools/customchecks/src/com/google/gwt/checkstyle/OrderCheck.java
+++ b/build-tools/customchecks/src/com/google/gwt/checkstyle/OrderCheck.java
@@ -41,7 +41,7 @@
   /**
    * Encapsulate the state in each class scope in order to handle inner classes.
    */
-  private class ScopeState {
+  private static class ScopeState {
     /**
      * Current state.
      */
diff --git a/build-tools/doctool/src/com/google/doctool/Booklet.java b/build-tools/doctool/src/com/google/doctool/Booklet.java
index 31bad9b..8f0fbdb 100644
--- a/build-tools/doctool/src/com/google/doctool/Booklet.java
+++ b/build-tools/doctool/src/com/google/doctool/Booklet.java
@@ -75,10 +75,9 @@
   }
 
   public static String slurpSource(SourcePosition position) {
-    FileReader fr = null;
+    BufferedReader br = null;
     try {
-      fr = new FileReader(position.file());
-      BufferedReader br = new BufferedReader(fr);
+      br = new BufferedReader(new FileReader(position.file()));
       for (int i = 0, n = position.line() - 1; i < n; ++i) {
         br.readLine();
       }
@@ -125,8 +124,8 @@
       e.printStackTrace();
     } finally {
       try {
-        if (fr != null) {
-          fr.close();
+        if (br != null) {
+          br.close();
         }
       } catch (IOException e) {
         e.printStackTrace();
@@ -806,6 +805,8 @@
     try {
       initialRootDoc = rootDoc;
       File outputFile = new File(outputPath);
+      // Ignore result since the next line will fail if the directory doesn't
+      // exist.
       outputFile.getParentFile().mkdirs();
       FileWriter fw = new FileWriter(outputFile);
       pw = new PrintWriter(fw, true);
diff --git a/build-tools/doctool/src/com/google/doctool/DocTool.java b/build-tools/doctool/src/com/google/doctool/DocTool.java
index 2932c44..1ed6032 100644
--- a/build-tools/doctool/src/com/google/doctool/DocTool.java
+++ b/build-tools/doctool/src/com/google/doctool/DocTool.java
@@ -308,7 +308,7 @@
         fos.write(buf, 0, i);
       }
       return true;
-    } catch (Exception e) {
+    } catch (IOException e) {
       return false;
     } finally {
       close(fis);
@@ -501,8 +501,7 @@
       in = getClass().getClassLoader().getResourceAsStream(filename);
       try {
         if (in == null) {
-          err.println("Cannot find file: " + filename);
-          System.exit(-1); // yuck
+          throw new RuntimeException("Cannot find file: " + filename);
         }
         StringWriter sw = new StringWriter();
         int ch;
diff --git a/build-tools/doctool/src/com/google/doctool/SplitterJoiner.java b/build-tools/doctool/src/com/google/doctool/SplitterJoiner.java
index 80a4a90..2288d6f 100644
--- a/build-tools/doctool/src/com/google/doctool/SplitterJoiner.java
+++ b/build-tools/doctool/src/com/google/doctool/SplitterJoiner.java
@@ -185,81 +185,83 @@
   }
 
   private static void split(String[] files) throws IOException {
-    BufferedReader reader = null;
     String prefix = null;
     File inputFile = null;
 
     for (int i = 0; i < files.length; i++) {
+      BufferedReader reader = null;
+      try {
+        // Open the reader.
+        //                
+        String file = files[i];
+        inputFile = new File(file);
+        if (!inputFile.exists()) {
+          System.err.println("Error: Cannot find input file "
+              + inputFile.getPath());
+          return;
+        }
+        reader = new BufferedReader(new FileReader(inputFile));
 
-      // Close the current reader, if any.
-      //
-      if (reader != null) {
-        reader.close();
-      }
-
-      // Open the next reader.
-      //                
-      String file = files[i];
-      inputFile = new File(file);
-      if (!inputFile.exists()) {
-        System.err.println("Error: Cannot find input file "
-            + inputFile.getPath());
-        return;
-      }
-      reader = new BufferedReader(new FileReader(inputFile));
-
-      // Parse the input
-      //
-      File outFile = null;
-      PrintWriter writer = null;
-      String line = reader.readLine();
-      while (line != null) {
-        if (prefix == null) {
-          // Learn the prefix.
-          //
-          prefix = line.trim();
-          if (prefix.length() == 0) {
-            // The first line with anything on it counts as the prefix.
-            // 
-            prefix = null;
-          }
-        } else if (line.startsWith(prefix)) {
-          // Close the current writer.
-          //
-          if (writer != null) {
-            writer.close();
-          }
-
-          // Create the next writer.
-          //
-          String outPath = line.substring(prefix.length()).trim();
-          outFile = new File(outPath);
-          if (!outFile.isAbsolute()) {
-            // Make the created file relative to the input file.
+        // Parse the input
+        //
+        File outFile = null;
+        PrintWriter writer = null;
+        String line = reader.readLine();
+        while (line != null) {
+          if (prefix == null) {
+            // Learn the prefix.
             //
-            File absoluteParentDir = inputFile.getCanonicalFile().getParentFile();
-            outFile = new File(absoluteParentDir, outPath);
-            outFile.getParentFile().mkdirs();
+            prefix = line.trim();
+            if (prefix.length() == 0) {
+              // The first line with anything on it counts as the prefix.
+              // 
+              prefix = null;
+            }
+          } else if (line.startsWith(prefix)) {
+            // Close the current writer.
+            //
+            if (writer != null) {
+              writer.close();
+            }
+
+            // Create the next writer.
+            //
+            String outPath = line.substring(prefix.length()).trim();
+            outFile = new File(outPath);
+            if (!outFile.isAbsolute()) {
+              // Make the created file relative to the input file.
+              //
+              File absoluteParentDir = inputFile.getCanonicalFile().getParentFile();
+              outFile = new File(absoluteParentDir, outPath);
+              // Ignore result since the next line will fail if the directory
+              // doesn't exist.
+              outFile.getParentFile().mkdirs();
+            }
+
+            writer = new PrintWriter(new FileWriter(outFile), true);
+
+            writer.println("<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Strict//EN\" \"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd\">");
+
+          } else if (writer != null) {
+            // Write this line to the current file.
+            //
+            writer.println(line);
+          } else {
+            // Ignored -- haven't yet seen a starting prefix.
+            //
           }
 
-          writer = new PrintWriter(new FileWriter(outFile), true);
-
-          writer.println("<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Strict//EN\" \"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd\">");
-
-        } else if (writer != null) {
-          // Write this line to the current file.
-          //
-          writer.println(line);
-        } else {
-          // Ignored -- haven't yet seen a starting prefix.
-          //
+          line = reader.readLine();
         }
 
-        line = reader.readLine();
-      }
-
-      if (writer != null) {
-        writer.close();
+        if (writer != null) {
+          writer.close();
+        }
+      } finally {
+        // Close the current reader, if any.
+        if (reader != null) {
+          reader.close();
+        }
       }
     }
   }
diff --git a/build-tools/doctool/src/com/google/doctool/custom/WikiDoclet.java b/build-tools/doctool/src/com/google/doctool/custom/WikiDoclet.java
index 663dfef..58ad7f2 100644
--- a/build-tools/doctool/src/com/google/doctool/custom/WikiDoclet.java
+++ b/build-tools/doctool/src/com/google/doctool/custom/WikiDoclet.java
@@ -136,6 +136,8 @@
   private void process(RootDoc root) {
     try {
       File outFile = new File(outputFile);
+      // Ignore result since the next line will fail if the directory doesn't
+      // exist.
       outFile.getParentFile().mkdirs();
       FileWriter fw = new FileWriter(outFile);
       PrintWriter pw = new PrintWriter(fw, true);
diff --git a/dev/core/src/com/google/gwt/core/ext/linker/impl/SelectionScriptLinker.java b/dev/core/src/com/google/gwt/core/ext/linker/impl/SelectionScriptLinker.java
index 6485c5d..8fd3d90 100644
--- a/dev/core/src/com/google/gwt/core/ext/linker/impl/SelectionScriptLinker.java
+++ b/dev/core/src/com/google/gwt/core/ext/linker/impl/SelectionScriptLinker.java
@@ -75,7 +75,8 @@
 
     // If it can be parsed as a URL, then it's probably absolute.
     try {
-      URL testUrl = new URL(src);
+      // Just check to see if it can be parsed, no need to store the result.
+      new URL(src);
 
       // Let's guess that it is absolute (thus, not relative).
       return false;
diff --git a/dev/core/src/com/google/gwt/core/ext/linker/impl/StandardLinkerContext.java b/dev/core/src/com/google/gwt/core/ext/linker/impl/StandardLinkerContext.java
index 661d5ba..3ccba69 100644
--- a/dev/core/src/com/google/gwt/core/ext/linker/impl/StandardLinkerContext.java
+++ b/dev/core/src/com/google/gwt/core/ext/linker/impl/StandardLinkerContext.java
@@ -132,19 +132,24 @@
    * A faster bulk version of {@link File#mkdirs()} that takes advantage of
    * cached state to avoid a lot of file system access.
    */
-  private static void mkdirs(File dir, Set<String> createdDirs) {
+  private static boolean mkdirs(File dir, Set<String> createdDirs) {
     if (dir == null) {
-      return;
+      return true;
     }
     String path = dir.getPath();
     if (createdDirs.contains(path)) {
-      return;
+      return true;
     }
     if (!dir.exists()) {
-      mkdirs(dir.getParentFile(), createdDirs);
-      dir.mkdir();
+      if (!mkdirs(dir.getParentFile(), createdDirs)) {
+        return false;
+      }
+      if (!dir.mkdir()) {
+        return false;
+      }
     }
     createdDirs.add(path);
+    return true;
   }
 
   /**
@@ -644,17 +649,21 @@
       File outFile, Set<String> createdDirs) throws UnableToCompleteException {
     if (!outFile.exists()
         || (outFile.lastModified() <= artifact.getLastModified())) {
-      mkdirs(outFile.getParentFile(), createdDirs);
-      try {
-        FileOutputStream out = new FileOutputStream(outFile);
-        artifact.writeTo(logger, out);
-        out.close();
-      } catch (IOException e) {
-        logger.log(TreeLogger.ERROR, "Unable to create file '"
-            + outFile.getAbsolutePath() + "'", e);
-        throw new UnableToCompleteException();
+      if (!mkdirs(outFile.getParentFile(), createdDirs)) {
+        logger.log(TreeLogger.ERROR, "Unable to create directory for file '"
+            + outFile.getAbsolutePath() + "'");
+      } else {
+        try {
+          FileOutputStream out = new FileOutputStream(outFile);
+          artifact.writeTo(logger, out);
+          out.close();
+        } catch (IOException e) {
+          logger.log(TreeLogger.ERROR, "Unable to create file '"
+              + outFile.getAbsolutePath() + "'", e);
+          throw new UnableToCompleteException();
+        }
+        outFile.setLastModified(artifact.getLastModified());
       }
-      outFile.setLastModified(artifact.getLastModified());
     }
   }
 
diff --git a/dev/core/src/com/google/gwt/core/ext/soyc/impl/DependencyRecorderImpl.java b/dev/core/src/com/google/gwt/core/ext/soyc/impl/DependencyRecorderImpl.java
index 8f729f9..5991ec9 100644
--- a/dev/core/src/com/google/gwt/core/ext/soyc/impl/DependencyRecorderImpl.java
+++ b/dev/core/src/com/google/gwt/core/ext/soyc/impl/DependencyRecorderImpl.java
@@ -72,9 +72,10 @@
     File appendDepFile = new File(workDir, "dependencies" + permutationId
         + ".xml.gz");
     try {
+      // No need to check mkdirs result because an IOException will occur anyway
+      appendDepFile.getParentFile().mkdirs();
       FileOutputStream stream = new FileOutputStream(appendDepFile, true);
       writer = new OutputStreamWriter(new GZIPOutputStream(stream), "UTF-8");
-      appendDepFile.getParentFile().mkdirs();
       pw = new PrintWriter(writer);
       htmlOut = new HtmlTextOutput(pw, false);
     } catch (Throwable e) {
diff --git a/dev/core/src/com/google/gwt/core/ext/soyc/impl/OriginImpl.java b/dev/core/src/com/google/gwt/core/ext/soyc/impl/OriginImpl.java
index 76a56fe..405ada2 100644
--- a/dev/core/src/com/google/gwt/core/ext/soyc/impl/OriginImpl.java
+++ b/dev/core/src/com/google/gwt/core/ext/soyc/impl/OriginImpl.java
@@ -38,6 +38,15 @@
     }
     return lineNum - o.lineNum;
   }
+  
+  @Override
+  public boolean equals(Object o) {
+    if (!(o instanceof OriginImpl)) {
+      return false;
+    }
+    OriginImpl other = (OriginImpl) o;
+    return location.equals(other.location) && lineNum == other.lineNum;
+  }
 
   public int getLineNumber() {
     return lineNum;
@@ -46,6 +55,11 @@
   public String getLocation() {
     return location;
   }
+  
+  @Override
+  public int hashCode() {
+    return location.hashCode() ^ lineNum;
+  }
 
   @Override
   public String toString() {
diff --git a/dev/core/src/com/google/gwt/core/ext/soyc/impl/SplitPointRecorderImpl.java b/dev/core/src/com/google/gwt/core/ext/soyc/impl/SplitPointRecorderImpl.java
index 8c1172a..d2ed828 100644
--- a/dev/core/src/com/google/gwt/core/ext/soyc/impl/SplitPointRecorderImpl.java
+++ b/dev/core/src/com/google/gwt/core/ext/soyc/impl/SplitPointRecorderImpl.java
@@ -57,9 +57,10 @@
     File splitPointsFile = new File(workDir, "splitPoints"
         + Integer.toString(permutationId) + ".xml.gz");
     try {
+      // No need to check mkdirs result because an IOException will occur anyway
+      splitPointsFile.getParentFile().mkdirs();
       stream = new FileOutputStream(splitPointsFile, true);
       writer = new OutputStreamWriter(new GZIPOutputStream(stream), "UTF-8");
-      splitPointsFile.getParentFile().mkdirs();
       pw = new PrintWriter(writer);
       htmlOut = new HtmlTextOutput(pw, false);
 
@@ -80,9 +81,10 @@
         htmlOut.newline();
         htmlOut.indentIn();
         htmlOut.indentIn();
-        for (Integer splitPointCount : splitPointMap.keySet()) {
+        for (Map.Entry<Integer, String> entry : splitPointMap.entrySet()) {
+          Integer splitPointCount = entry.getKey();
           curLine = "<splitpoint id=\"" + splitPointCount + "\" location=\""
-              + splitPointMap.get(splitPointCount) + "\"/>";
+              + entry.getValue() + "\"/>";
           htmlOut.printRaw(curLine);
           htmlOut.newline();
         }
diff --git a/dev/core/src/com/google/gwt/core/ext/soyc/impl/StoryRecorderImpl.java b/dev/core/src/com/google/gwt/core/ext/soyc/impl/StoryRecorderImpl.java
index 1f3afd6..83f7491 100644
--- a/dev/core/src/com/google/gwt/core/ext/soyc/impl/StoryRecorderImpl.java
+++ b/dev/core/src/com/google/gwt/core/ext/soyc/impl/StoryRecorderImpl.java
@@ -64,6 +64,8 @@
     public final Range range;
 
     public RangeInfo(Range range, SourceInfo info) {
+      assert range != null;
+      assert info != null;
       this.range = range;
       this.info = info;
     }
@@ -116,9 +118,10 @@
     File storiesFile = new File(workDir, "stories"
         + Integer.toString(permutationId) + ".xml.gz");
     try {
+      // No need to check mkdirs result because an IOException will occur anyway 
+      storiesFile.getParentFile().mkdirs();
       stream = new FileOutputStream(storiesFile, true);
       writer = new OutputStreamWriter(new GZIPOutputStream(stream), "UTF-8");
-      storiesFile.getParentFile().mkdirs();
       pw = new PrintWriter(writer);
       htmlOut = new HtmlTextOutput(pw, false);
 
@@ -444,6 +447,7 @@
 
   private void recordStory(SourceInfo info, int fragment, int length,
       Range range) {
+    assert info != null;
     assert storyCache != null;
 
     if (fragment > curHighestFragment) {
@@ -456,15 +460,13 @@
       SortedSet<Member> members = new TreeSet<Member>(
           Member.TYPE_AND_SOURCE_NAME_COMPARATOR);
 
-      if (info != null) {
-        for (Correlation c : info.getAllCorrelations()) {
-          Member m = membersByCorrelation.get(c);
-          if (m != null) {
-            members.add(m);
-          }
+      for (Correlation c : info.getAllCorrelations()) {
+        Member m = membersByCorrelation.get(c);
+        if (m != null) {
+          members.add(m);
         }
       }
-
+        
       SortedSet<Origin> origins = new TreeSet<Origin>();
       for (Correlation c : info.getAllCorrelations(Axis.ORIGIN)) {
         origins.add(new OriginImpl(c.getOrigin()));
diff --git a/dev/core/src/com/google/gwt/core/ext/typeinfo/JAnnotationType.java b/dev/core/src/com/google/gwt/core/ext/typeinfo/JAnnotationType.java
index 912e20e..d61f061 100644
--- a/dev/core/src/com/google/gwt/core/ext/typeinfo/JAnnotationType.java
+++ b/dev/core/src/com/google/gwt/core/ext/typeinfo/JAnnotationType.java
@@ -38,13 +38,15 @@
   @Override
   public JAnnotationMethod[] getMethods() {
     JMethod[] methodArray = super.getMethods();
-    return Arrays.asList(methodArray).toArray(new JAnnotationMethod[0]);
+    return Arrays.asList(methodArray).toArray(
+        new JAnnotationMethod[methodArray.length]);
   }
 
   @Override
   public JAnnotationMethod[] getOverridableMethods() {
     JMethod[] methodArray = super.getOverridableMethods();
-    return Arrays.asList(methodArray).toArray(new JAnnotationMethod[0]);
+    return Arrays.asList(methodArray).toArray(
+        new JAnnotationMethod[methodArray.length]);
   }
 
   @Override
diff --git a/dev/core/src/com/google/gwt/core/ext/typeinfo/JConstructor.java b/dev/core/src/com/google/gwt/core/ext/typeinfo/JConstructor.java
index 5767abc..09f02f8 100644
--- a/dev/core/src/com/google/gwt/core/ext/typeinfo/JConstructor.java
+++ b/dev/core/src/com/google/gwt/core/ext/typeinfo/JConstructor.java
@@ -24,10 +24,6 @@
 public class JConstructor extends JAbstractMethod {
   private final JClassType enclosingType;
 
-  public JConstructor(JClassType enclosingType, String name) {
-    this(enclosingType, name, null, null);
-  }
-
   public JConstructor(JClassType enclosingType, String name,
       Map<Class<? extends Annotation>, Annotation> declaredAnnotations,
       JTypeParameter[] jtypeParameters) {
diff --git a/dev/core/src/com/google/gwt/core/ext/typeinfo/JEnumType.java b/dev/core/src/com/google/gwt/core/ext/typeinfo/JEnumType.java
index fc040bc..76f7fc4 100644
--- a/dev/core/src/com/google/gwt/core/ext/typeinfo/JEnumType.java
+++ b/dev/core/src/com/google/gwt/core/ext/typeinfo/JEnumType.java
@@ -45,7 +45,8 @@
         }
       }
 
-      lazyEnumConstants = enumConstants.toArray(new JEnumConstant[0]);
+      lazyEnumConstants = enumConstants.toArray(
+          new JEnumConstant[enumConstants.size()]);
     }
 
     return lazyEnumConstants;
diff --git a/dev/core/src/com/google/gwt/core/ext/typeinfo/JMethod.java b/dev/core/src/com/google/gwt/core/ext/typeinfo/JMethod.java
index 8de3b43..b9ac327 100644
--- a/dev/core/src/com/google/gwt/core/ext/typeinfo/JMethod.java
+++ b/dev/core/src/com/google/gwt/core/ext/typeinfo/JMethod.java
@@ -27,10 +27,6 @@
 
   private JType returnType;
 
-  public JMethod(JClassType enclosingType, String name) {
-    this(enclosingType, name, null, null);
-  }
-
   public JMethod(JClassType enclosingType, String name,
       Map<Class<? extends Annotation>, Annotation> declaredAnnotations,
       JTypeParameter[] jtypeParameters) {
diff --git a/dev/core/src/com/google/gwt/core/ext/typeinfo/JParameter.java b/dev/core/src/com/google/gwt/core/ext/typeinfo/JParameter.java
index f6f6f7f..ea1234b 100644
--- a/dev/core/src/com/google/gwt/core/ext/typeinfo/JParameter.java
+++ b/dev/core/src/com/google/gwt/core/ext/typeinfo/JParameter.java
@@ -32,10 +32,6 @@
 
   private final JAbstractMethod enclosingMethod;
 
-  public JParameter(JAbstractMethod enclosingMethod, JType type, String name) {
-    this(enclosingMethod, type, name, null);
-  }
-
   public JParameter(JAbstractMethod enclosingMethod, JType type, String name,
       Map<Class<? extends Annotation>, Annotation> declaredAnnotations) {
     this.enclosingMethod = enclosingMethod;
diff --git a/dev/core/src/com/google/gwt/core/ext/typeinfo/JRealClassType.java b/dev/core/src/com/google/gwt/core/ext/typeinfo/JRealClassType.java
index baec501..b492b98 100644
--- a/dev/core/src/com/google/gwt/core/ext/typeinfo/JRealClassType.java
+++ b/dev/core/src/com/google/gwt/core/ext/typeinfo/JRealClassType.java
@@ -394,8 +394,10 @@
       realSuperType = type.isParameterized().getBaseType();
     } else if (type.isRawType() != null) {
       realSuperType = type.isRawType().getGenericType();
-    } else {
+    } else if (type instanceof JRealClassType) {
       realSuperType = (JRealClassType) type;
+    } else {
+      throw new IllegalArgumentException("Unknown type for " + type);
     }
     annotations.setParent(realSuperType.annotations);
   }
diff --git a/dev/core/src/com/google/gwt/core/linker/SingleScriptLinker.java b/dev/core/src/com/google/gwt/core/linker/SingleScriptLinker.java
index 044e68b..20b988f 100644
--- a/dev/core/src/com/google/gwt/core/linker/SingleScriptLinker.java
+++ b/dev/core/src/com/google/gwt/core/linker/SingleScriptLinker.java
@@ -95,7 +95,7 @@
     // Find the single CompilationResult
     Set<CompilationResult> results = artifacts.find(CompilationResult.class);
     if (results.size() != 1) {
-      logger = logger.branch(TreeLogger.ERROR,
+      logger.log(TreeLogger.ERROR,
           "The module must have exactly one distinct"
               + " permutation when using the " + getDescription() + " Linker.",
           null);
@@ -108,7 +108,7 @@
 
     String[] js = result.getJavaScript();
     if (js.length != 1) {
-      logger = logger.branch(TreeLogger.ERROR,
+      logger.log(TreeLogger.ERROR,
           "The module must not have multiple fragments when using the "
               + getDescription() + " Linker.", null);
       throw new UnableToCompleteException();
diff --git a/dev/core/src/com/google/gwt/dev/CompilePerms.java b/dev/core/src/com/google/gwt/dev/CompilePerms.java
index aca31b3..abf1646 100644
--- a/dev/core/src/com/google/gwt/dev/CompilePerms.java
+++ b/dev/core/src/com/google/gwt/dev/CompilePerms.java
@@ -279,7 +279,7 @@
         subPermsList.add(precompilation.getPermutation(perm));
       }
     }
-    return subPermsList.toArray(new Permutation[0]);
+    return subPermsList.toArray(new Permutation[subPermsList.size()]);
   }
 
   private final CompilePermsOptionsImpl options;
diff --git a/dev/core/src/com/google/gwt/dev/ExternalPermutationWorkerFactory.java b/dev/core/src/com/google/gwt/dev/ExternalPermutationWorkerFactory.java
index 2b0790e..41c80c9 100644
--- a/dev/core/src/com/google/gwt/dev/ExternalPermutationWorkerFactory.java
+++ b/dev/core/src/com/google/gwt/dev/ExternalPermutationWorkerFactory.java
@@ -208,6 +208,11 @@
   public static final String JVM_ARGS_PROPERTY = "gwt.jjs.javaArgs";
 
   /**
+   * Random number generator used for keys to worker threads.
+   */
+  private static Random random = new Random();
+
+  /**
    * Launches an external worker and returns the cookie that worker should
    * return via the network connection.
    */
@@ -242,7 +247,7 @@
     }
 
     byte[] cookieBytes = new byte[16];
-    (new Random()).nextBytes(cookieBytes);
+    random.nextBytes(cookieBytes);
     String cookie = Util.toHexString(cookieBytes);
 
     // Cook up the classpath, main class, and extra args
diff --git a/dev/core/src/com/google/gwt/dev/GWTShell.java b/dev/core/src/com/google/gwt/dev/GWTShell.java
index 035afb6..53924db 100644
--- a/dev/core/src/com/google/gwt/dev/GWTShell.java
+++ b/dev/core/src/com/google/gwt/dev/GWTShell.java
@@ -117,7 +117,6 @@
 
     @Override
     public File getWorkDir() {
-      File workdir = new File(getOutDir(), ".gwt-tmp");
       return new File(getOutDir(), ".gwt-tmp");
     }
 
diff --git a/dev/core/src/com/google/gwt/dev/Link.java b/dev/core/src/com/google/gwt/dev/Link.java
index 6f35ea2..101f7bb 100644
--- a/dev/core/src/com/google/gwt/dev/Link.java
+++ b/dev/core/src/com/google/gwt/dev/Link.java
@@ -328,7 +328,7 @@
         precompileOptions = precompilation.getUnifiedAst().getOptions();
       }
 
-      Permutation[] perms = permsList.toArray(new Permutation[0]);
+      Permutation[] perms = permsList.toArray(new Permutation[permsList.size()]);
 
       List<FileBackedObject<PermutationResult>> resultFiles = new ArrayList<FileBackedObject<PermutationResult>>(
           perms.length);
diff --git a/dev/core/src/com/google/gwt/dev/Precompile.java b/dev/core/src/com/google/gwt/dev/Precompile.java
index 40bb6e0..2344216 100644
--- a/dev/core/src/com/google/gwt/dev/Precompile.java
+++ b/dev/core/src/com/google/gwt/dev/Precompile.java
@@ -504,6 +504,7 @@
     for (String moduleName : options.getModuleNames()) {
       File compilerWorkDir = options.getCompilerWorkDir(moduleName);
       Util.recursiveDelete(compilerWorkDir, true);
+      // No need to check mkdirs result because an IOException will occur anyway
       compilerWorkDir.mkdirs();
 
       JarOutputStream precompilationJar;
diff --git a/dev/core/src/com/google/gwt/dev/ThreadedPermutationWorkerFactory.java b/dev/core/src/com/google/gwt/dev/ThreadedPermutationWorkerFactory.java
index fe8e467..a41e7f2 100644
--- a/dev/core/src/com/google/gwt/dev/ThreadedPermutationWorkerFactory.java
+++ b/dev/core/src/com/google/gwt/dev/ThreadedPermutationWorkerFactory.java
@@ -74,7 +74,7 @@
   @Override
   public Collection<PermutationWorker> getWorkers(TreeLogger logger,
       UnifiedAst unifiedAst, int numWorkers) throws UnableToCompleteException {
-    logger = logger.branch(TreeLogger.SPAM,
+    logger.log(TreeLogger.SPAM,
         "Creating ThreadedPermutationWorkers");
 
     numWorkers = Math.min(numWorkers, Integer.getInteger(MAX_THREADS_PROPERTY,
@@ -95,7 +95,7 @@
 
   @Override
   public void init(TreeLogger logger) throws UnableToCompleteException {
-    logger = logger.branch(TreeLogger.SPAM,
+    logger.log(TreeLogger.SPAM,
         "Initializing ThreadedPermutationWorkerFactory");
   }
 
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 1c35aac..af589d1 100644
--- a/dev/core/src/com/google/gwt/dev/cfg/ModuleDef.java
+++ b/dev/core/src/com/google/gwt/dev/cfg/ModuleDef.java
@@ -240,7 +240,7 @@
     return name;
   }
 
-  public CompilationState getCompilationState(TreeLogger logger)
+  public synchronized CompilationState getCompilationState(TreeLogger logger)
       throws UnableToCompleteException {
     if (lazyCompilationState == null) {
       lazyCompilationState = new CompilationState(logger, lazySourceOracle);
@@ -355,7 +355,7 @@
    * Override the module's apparent name. Setting this value to
    * <code>null<code> will disable the name override.
    */
-  public void setNameOverride(String nameOverride) {
+  public synchronized void setNameOverride(String nameOverride) {
     this.nameOverride = nameOverride;
   }
 
@@ -365,8 +365,8 @@
    * 
    * NOTE: this method is for testing only.
    * 
-   * @param partialPath
-   * @return
+   * @param partialPath the partial path of the source file
+   * @return the resource for the requested source file
    */
   synchronized Resource findSourceFile(String partialPath) {
     return lazySourceOracle.getResourceMap().get(partialPath);
diff --git a/dev/core/src/com/google/gwt/dev/cfg/ModuleDefSchema.java b/dev/core/src/com/google/gwt/dev/cfg/ModuleDefSchema.java
index dc5d00e..a3520f5 100644
--- a/dev/core/src/com/google/gwt/dev/cfg/ModuleDefSchema.java
+++ b/dev/core/src/com/google/gwt/dev/cfg/ModuleDefSchema.java
@@ -176,8 +176,8 @@
       Property existingProperty = moduleDef.getProperties().find(name.token);
       if (existingProperty == null) {
         // Create the property
-        existingProperty = moduleDef.getProperties().createConfiguration(
-            name.token, isMultiValued);
+        moduleDef.getProperties().createConfiguration(name.token,
+            isMultiValued);
         if (!propertyDefinitions.containsKey(name.token)) {
           propertyDefinitions.put(name.token, moduleName);
         }
@@ -739,7 +739,7 @@
     }
   }
 
-  private final class IncludeExcludeSchema extends Schema {
+  private static final class IncludeExcludeSchema extends Schema {
 
     protected final String __exclude_1_name = null;
 
@@ -951,7 +951,7 @@
     }
   }
 
-  private class PropertyProviderBodySchema extends Schema {
+  private static class PropertyProviderBodySchema extends Schema {
 
     private StringBuffer script;
 
@@ -1022,7 +1022,7 @@
     }
   }
 
-  private class ScriptReadyBodySchema extends Schema {
+  private static class ScriptReadyBodySchema extends Schema {
 
     private StringBuffer script;
 
diff --git a/dev/core/src/com/google/gwt/dev/cfg/Properties.java b/dev/core/src/com/google/gwt/dev/cfg/Properties.java
index d6ca29e..37979ff 100644
--- a/dev/core/src/com/google/gwt/dev/cfg/Properties.java
+++ b/dev/core/src/com/google/gwt/dev/cfg/Properties.java
@@ -76,7 +76,8 @@
    * Count the total number of permutations that this property set supports.
    */
   public int numPermutations() {
-    BindingProperty[] bindingPropsArray = bindingProps.toArray(new BindingProperty[0]);
+    BindingProperty[] bindingPropsArray = bindingProps.toArray(
+        new BindingProperty[bindingProps.size()]);
 
     int count = 1;
 
diff --git a/dev/core/src/com/google/gwt/dev/cfg/Property.java b/dev/core/src/com/google/gwt/dev/cfg/Property.java
index 5615672..7c1f7b4 100644
--- a/dev/core/src/com/google/gwt/dev/cfg/Property.java
+++ b/dev/core/src/com/google/gwt/dev/cfg/Property.java
@@ -31,11 +31,25 @@
   public int compareTo(Property o) {
     return name.compareTo(o.name);
   }
+  
+  @Override
+  public boolean equals(Object o) {
+    if (!(o instanceof Property)) {
+      return false;
+    }
+    return name.equals(((Property) o).name);
+  }
 
   public String getName() {
     return name;
   }
+  
+  @Override
+  public int hashCode() {
+    return name.hashCode();
+  }
 
+  @Override
   public String toString() {
     return name;
   }
diff --git a/dev/core/src/com/google/gwt/dev/javac/AnnotationProxyFactory.java b/dev/core/src/com/google/gwt/dev/javac/AnnotationProxyFactory.java
index 28627e7..d55920f 100644
--- a/dev/core/src/com/google/gwt/dev/javac/AnnotationProxyFactory.java
+++ b/dev/core/src/com/google/gwt/dev/javac/AnnotationProxyFactory.java
@@ -94,6 +94,9 @@
 
     @Override
     public boolean equals(Object other) {
+      // This is not actually an asymmetric equals implementation, as this
+      // method gets called for our proxy instance rather than on the handler
+      // itself.
       if (proxy == other) {
         return true;
       }
diff --git a/dev/core/src/com/google/gwt/dev/javac/GeneratedClassnameComparator.java b/dev/core/src/com/google/gwt/dev/javac/GeneratedClassnameComparator.java
index bdd642f..c6e4f94 100644
--- a/dev/core/src/com/google/gwt/dev/javac/GeneratedClassnameComparator.java
+++ b/dev/core/src/com/google/gwt/dev/javac/GeneratedClassnameComparator.java
@@ -15,6 +15,7 @@
  */
 package com.google.gwt.dev.javac;
 
+import java.io.Serializable;
 import java.util.Comparator;
 
 /**
@@ -27,7 +28,7 @@
  * <li> Foo$1 < Foo$2 < Foo$1$1 < Foo$1$2 < Foo$2$1 < Foo$2$2 < Foo$2$Baz
  * </pre>
  */
-class GeneratedClassnameComparator implements Comparator<String> {
+class GeneratedClassnameComparator implements Comparator<String>, Serializable {
 
   public int compare(String arg0, String arg1) {
     String pattern = "\\$";
diff --git a/dev/core/src/com/google/gwt/dev/javac/JdtCompiler.java b/dev/core/src/com/google/gwt/dev/javac/JdtCompiler.java
index a26150b..ba1b7d7 100644
--- a/dev/core/src/com/google/gwt/dev/javac/JdtCompiler.java
+++ b/dev/core/src/com/google/gwt/dev/javac/JdtCompiler.java
@@ -63,7 +63,7 @@
     }
 
     public char[] getContents() {
-      return unit.getSource().toString().toCharArray();
+      return unit.getSource().toCharArray();
     }
 
     public char[] getFileName() {
@@ -113,7 +113,7 @@
   /**
    * Hook point to accept results.
    */
-  private class ICompilerRequestorImpl implements ICompilerRequestor {
+  private static class ICompilerRequestorImpl implements ICompilerRequestor {
     public void acceptResult(CompilationResult result) {
     }
   }
diff --git a/dev/core/src/com/google/gwt/dev/jdt/FindJsniRefVisitor.java b/dev/core/src/com/google/gwt/dev/jdt/FindJsniRefVisitor.java
index 60cdb8c..2c3314f 100644
--- a/dev/core/src/com/google/gwt/dev/jdt/FindJsniRefVisitor.java
+++ b/dev/core/src/com/google/gwt/dev/jdt/FindJsniRefVisitor.java
@@ -154,6 +154,7 @@
       }
       try {
         reader.reset();
+        // Ignore return value, since we know the index is valid.
         reader.skip(idx);
       } catch (IOException e) {
         throw new InternalCompilerException(e.getMessage(), e);
diff --git a/dev/core/src/com/google/gwt/dev/jdt/WebModeCompilerFrontEnd.java b/dev/core/src/com/google/gwt/dev/jdt/WebModeCompilerFrontEnd.java
index e98eaf2..ef33ecb 100644
--- a/dev/core/src/com/google/gwt/dev/jdt/WebModeCompilerFrontEnd.java
+++ b/dev/core/src/com/google/gwt/dev/jdt/WebModeCompilerFrontEnd.java
@@ -180,8 +180,9 @@
     boolean doFinish = false;
 
     // For each, ask the host for every possible deferred binding answer.
-    for (String reqType : requestedTypes.keySet()) {
-      MessageSendSite site = requestedTypes.get(reqType);
+    for (Map.Entry<String, MessageSendSite> entry : requestedTypes.entrySet()) {
+      String reqType = entry.getKey();
+      MessageSendSite site = entry.getValue();
       try {
         String[] resultTypes = rebindPermOracle.getAllPossibleRebindAnswers(
             logger, reqType);
@@ -223,8 +224,9 @@
     }
 
     // Sanity check all rebind answers.
-    for (String reqType : requestedTypes.keySet()) {
-      MessageSendSite site = requestedTypes.get(reqType);
+    for (Map.Entry<String, MessageSendSite> entry : requestedTypes.entrySet()) {
+      String reqType = entry.getKey();
+      MessageSendSite site = entry.getValue();
       String[] resultTypes = rebindAnswers.get(reqType);
       // Check that each result is instantiable.
       for (String typeName : resultTypes) {
diff --git a/dev/core/src/com/google/gwt/dev/jjs/JavaToJavaScriptCompiler.java b/dev/core/src/com/google/gwt/dev/jjs/JavaToJavaScriptCompiler.java
index c8539a9..65aeb56 100644
--- a/dev/core/src/com/google/gwt/dev/jjs/JavaToJavaScriptCompiler.java
+++ b/dev/core/src/com/google/gwt/dev/jjs/JavaToJavaScriptCompiler.java
@@ -391,7 +391,7 @@
     // Compile the source and get the compiler so we can get the parse tree
     //
     CompilationUnitDeclaration[] goldenCuds = WebModeCompilerFrontEnd.getCompilationUnitDeclarations(
-        logger, allRootTypes.toArray(new String[0]),
+        logger, allRootTypes.toArray(new String[allRootTypes.size()]),
         module.getCompilationState(logger), rpo);
 
     // Free up memory.
diff --git a/dev/core/src/com/google/gwt/dev/jjs/SourceOrigin.java b/dev/core/src/com/google/gwt/dev/jjs/SourceOrigin.java
index 65e10b0..8224780 100644
--- a/dev/core/src/com/google/gwt/dev/jjs/SourceOrigin.java
+++ b/dev/core/src/com/google/gwt/dev/jjs/SourceOrigin.java
@@ -55,6 +55,9 @@
     public int getStartPos() {
       return startPos;
     }
+    
+    // super.equals and hashCode call getStartPos() and getEndPos(),
+    // so there is no need to implement them in this subclass
   }
 
   public static final SourceInfo UNKNOWN = new SourceOrigin("Unknown", 0) {
diff --git a/dev/core/src/com/google/gwt/dev/jjs/ast/JArrayType.java b/dev/core/src/com/google/gwt/dev/jjs/ast/JArrayType.java
index 71d9dfa..8fd0b19 100644
--- a/dev/core/src/com/google/gwt/dev/jjs/ast/JArrayType.java
+++ b/dev/core/src/com/google/gwt/dev/jjs/ast/JArrayType.java
@@ -15,7 +15,6 @@
  */
 package com.google.gwt.dev.jjs.ast;
 
-
 /**
  * Instances are shared.
  */
diff --git a/dev/core/src/com/google/gwt/dev/jjs/ast/JCharLiteral.java b/dev/core/src/com/google/gwt/dev/jjs/ast/JCharLiteral.java
index 8e4d9a5..e0618bd 100644
--- a/dev/core/src/com/google/gwt/dev/jjs/ast/JCharLiteral.java
+++ b/dev/core/src/com/google/gwt/dev/jjs/ast/JCharLiteral.java
@@ -57,8 +57,9 @@
     return value;
   }
 
+  @Override
   public Object getValueObj() {
-    return new Character(value);
+    return Character.valueOf(value);
   }
 
   public void traverse(JVisitor visitor, Context ctx) {
diff --git a/dev/core/src/com/google/gwt/dev/jjs/ast/JIntLiteral.java b/dev/core/src/com/google/gwt/dev/jjs/ast/JIntLiteral.java
index 4d7d7a7..4133ec0 100644
--- a/dev/core/src/com/google/gwt/dev/jjs/ast/JIntLiteral.java
+++ b/dev/core/src/com/google/gwt/dev/jjs/ast/JIntLiteral.java
@@ -58,8 +58,9 @@
     return value;
   }
 
+  @Override
   public Object getValueObj() {
-    return new Integer(value);
+    return Integer.valueOf(value);
   }
 
   public void traverse(JVisitor visitor, Context ctx) {
diff --git a/dev/core/src/com/google/gwt/dev/jjs/ast/JLongLiteral.java b/dev/core/src/com/google/gwt/dev/jjs/ast/JLongLiteral.java
index eff9ccb..36bdc33 100644
--- a/dev/core/src/com/google/gwt/dev/jjs/ast/JLongLiteral.java
+++ b/dev/core/src/com/google/gwt/dev/jjs/ast/JLongLiteral.java
@@ -58,8 +58,9 @@
     return value;
   }
 
+  @Override
   public Object getValueObj() {
-    return new Long(value);
+    return Long.valueOf(value);
   }
 
   public void traverse(JVisitor visitor, Context ctx) {
diff --git a/dev/core/src/com/google/gwt/dev/jjs/ast/JMethod.java b/dev/core/src/com/google/gwt/dev/jjs/ast/JMethod.java
index d3eeea3..1d58b7d 100644
--- a/dev/core/src/com/google/gwt/dev/jjs/ast/JMethod.java
+++ b/dev/core/src/com/google/gwt/dev/jjs/ast/JMethod.java
@@ -183,11 +183,10 @@
   }
 
   public void setBody(JAbstractMethodBody body) {
-    if (body != null) {
-      body.setMethod(null);
-    }
     this.body = body;
-    body.setMethod(this);
+    if (body != null) {
+      body.setMethod(this);
+    }
   }
 
   public void setFinal() {
diff --git a/dev/core/src/com/google/gwt/dev/jjs/ast/JProgram.java b/dev/core/src/com/google/gwt/dev/jjs/ast/JProgram.java
index 580565b..16c6baf 100644
--- a/dev/core/src/com/google/gwt/dev/jjs/ast/JProgram.java
+++ b/dev/core/src/com/google/gwt/dev/jjs/ast/JProgram.java
@@ -991,7 +991,7 @@
   public void initTypeInfo(List<JReferenceType> types,
       List<JsonObject> jsonObjects) {
     for (int i = 0, c = types.size(); i < c; ++i) {
-      typeIdMap.put(types.get(i), new Integer(i));
+      typeIdMap.put(types.get(i), Integer.valueOf(i));
     }
     this.jsonTypeTable = jsonObjects;
   }
diff --git a/dev/core/src/com/google/gwt/dev/jjs/ast/JTypeOracle.java b/dev/core/src/com/google/gwt/dev/jjs/ast/JTypeOracle.java
index 2ddff85..5cc2fbd 100644
--- a/dev/core/src/com/google/gwt/dev/jjs/ast/JTypeOracle.java
+++ b/dev/core/src/com/google/gwt/dev/jjs/ast/JTypeOracle.java
@@ -781,10 +781,10 @@
       Set<JReferenceType> instantiatedTypes, Set<JMethod> results) {
     Map<JClassType, Set<JMethod>> overrideMap = virtualUpRefMap.get(method);
     if (overrideMap != null) {
-      for (JClassType classType : overrideMap.keySet()) {
+      for (Map.Entry<JClassType, Set<JMethod>> entry : overrideMap.entrySet()) {
+        JClassType classType = entry.getKey();
         if (isInstantiatedType(classType, instantiatedTypes)) {
-          Set<JMethod> set = overrideMap.get(classType);
-          results.addAll(set);
+          results.addAll(entry.getValue());
         }
       }
     }
diff --git a/dev/core/src/com/google/gwt/dev/jjs/impl/AssertionRemover.java b/dev/core/src/com/google/gwt/dev/jjs/impl/AssertionRemover.java
index dc2ae7c..0b43d39 100644
--- a/dev/core/src/com/google/gwt/dev/jjs/impl/AssertionRemover.java
+++ b/dev/core/src/com/google/gwt/dev/jjs/impl/AssertionRemover.java
@@ -30,8 +30,9 @@
   /**
    * Removes all asserts.
    */
-  private class AssertRemoveVisitor extends JModVisitor {
+  private static class AssertRemoveVisitor extends JModVisitor {
 
+    @Override
     public void endVisit(JAssertStatement x, Context ctx) {
       removeMe(x, ctx);
     }
diff --git a/dev/core/src/com/google/gwt/dev/jjs/impl/DeadCodeElimination.java b/dev/core/src/com/google/gwt/dev/jjs/impl/DeadCodeElimination.java
index 2c42138..a8643a2 100644
--- a/dev/core/src/com/google/gwt/dev/jjs/impl/DeadCodeElimination.java
+++ b/dev/core/src/com/google/gwt/dev/jjs/impl/DeadCodeElimination.java
@@ -1627,6 +1627,9 @@
         } else if (result instanceof Integer) {
           ctx.replaceMe(program.getLiteralInt(((Integer) result).intValue()));
         }
+      } catch (RuntimeException e) {
+        // Don't eat RuntimeExceptions
+        throw e;
       } catch (Exception e) {
         // If the call threw an exception, just don't optimize
       }
@@ -1697,7 +1700,7 @@
         return Boolean.valueOf(((JBooleanLiteral) maybeLit).getValue());
       }
       if (type == char.class && maybeLit instanceof JCharLiteral) {
-        return new Character(((JCharLiteral) maybeLit).getValue());
+        return Character.valueOf(((JCharLiteral) maybeLit).getValue());
       }
       if (type == double.class && maybeLit instanceof JDoubleLiteral) {
         return new Double(((JDoubleLiteral) maybeLit).getValue());
@@ -1706,15 +1709,16 @@
         return new Float(((JIntLiteral) maybeLit).getValue());
       }
       if (type == int.class && maybeLit instanceof JIntLiteral) {
-        return new Integer(((JIntLiteral) maybeLit).getValue());
+        return Integer.valueOf(((JIntLiteral) maybeLit).getValue());
       }
       if (type == long.class && maybeLit instanceof JLongLiteral) {
-        return new Long(((JLongLiteral) maybeLit).getValue());
+        return Long.valueOf(((JLongLiteral) maybeLit).getValue());
       }
       if (type == String.class && maybeLit instanceof JStringLiteral) {
         return ((JStringLiteral) maybeLit).getValue();
       }
-      if (type == Object.class && maybeLit instanceof JValueLiteral) {
+      if (type == Object.class) {
+        // We already know it is a JValueLiteral instance
         return ((JValueLiteral) maybeLit).getValueObj();
       }
       return null;
diff --git a/dev/core/src/com/google/gwt/dev/jjs/impl/GenerateJavaScriptAST.java b/dev/core/src/com/google/gwt/dev/jjs/impl/GenerateJavaScriptAST.java
index 52e8186..12c5154 100644
--- a/dev/core/src/com/google/gwt/dev/jjs/impl/GenerateJavaScriptAST.java
+++ b/dev/core/src/com/google/gwt/dev/jjs/impl/GenerateJavaScriptAST.java
@@ -1793,7 +1793,7 @@
     }
   }
 
-  private class SortVisitor extends JVisitor {
+  private static class SortVisitor extends JVisitor {
 
     private final HasNameSort hasNameSort = new HasNameSort();
 
diff --git a/dev/core/src/com/google/gwt/dev/jjs/impl/HasNameSort.java b/dev/core/src/com/google/gwt/dev/jjs/impl/HasNameSort.java
index 867fffe..f491136d 100644
--- a/dev/core/src/com/google/gwt/dev/jjs/impl/HasNameSort.java
+++ b/dev/core/src/com/google/gwt/dev/jjs/impl/HasNameSort.java
@@ -17,12 +17,13 @@
 
 import com.google.gwt.dev.jjs.ast.HasName;
 
+import java.io.Serializable;
 import java.util.Comparator;
 
 /**
  * Comparator for <code>HasName</code> instances.
  */
-public class HasNameSort implements Comparator<HasName> {
+public class HasNameSort implements Comparator<HasName>, Serializable {
   public int compare(HasName h1, HasName h2) {
     return h1.getName().compareTo(h2.getName());
   }
diff --git a/dev/core/src/com/google/gwt/dev/jjs/impl/MethodInliner.java b/dev/core/src/com/google/gwt/dev/jjs/impl/MethodInliner.java
index 5023b1d..d0d8256 100644
--- a/dev/core/src/com/google/gwt/dev/jjs/impl/MethodInliner.java
+++ b/dev/core/src/com/google/gwt/dev/jjs/impl/MethodInliner.java
@@ -383,7 +383,7 @@
    * <li>field references</li>
    * </ul>
    */
-  private class OrderVisitor extends ExpressionAnalyzer {
+  private static class OrderVisitor extends ExpressionAnalyzer {
     private int currentIndex = 0;
     private final List<JParameter> parameters;
     private boolean succeeded = true;
diff --git a/dev/core/src/com/google/gwt/dev/jjs/impl/TypeMap.java b/dev/core/src/com/google/gwt/dev/jjs/impl/TypeMap.java
index 8ecd7a8..e6b6a82 100644
--- a/dev/core/src/com/google/gwt/dev/jjs/impl/TypeMap.java
+++ b/dev/core/src/com/google/gwt/dev/jjs/impl/TypeMap.java
@@ -106,8 +106,6 @@
       BaseTypeBinding baseTypeBinding = (BaseTypeBinding) binding;
       // see org.eclipse.jdt.internal.compiler.lookup.TypeIds constants
       switch (baseTypeBinding.id) {
-        case TypeIds.T_undefined:
-          return null;
         case TypeIds.T_JavaLangObject:
           // here for consistency, should already be cached
           return program.getTypeJavaLangObject();
@@ -134,6 +132,7 @@
           return program.getTypeJavaLangString();
         case TypeIds.T_null:
           return program.getTypeNull();
+        case TypeIds.T_undefined:
         default:
           return null;
       }
diff --git a/dev/core/src/com/google/gwt/dev/jjs/impl/TypeTightener.java b/dev/core/src/com/google/gwt/dev/jjs/impl/TypeTightener.java
index 2ac4be3..e7bb5a4 100644
--- a/dev/core/src/com/google/gwt/dev/jjs/impl/TypeTightener.java
+++ b/dev/core/src/com/google/gwt/dev/jjs/impl/TypeTightener.java
@@ -115,9 +115,6 @@
       } else if (!isStatic && instance.getType() == typeNull
           && x.getField() != program.getNullField()) {
         // Change any dereference of null to use the null field
-        if (!instance.hasSideEffects()) {
-          instance = program.getLiteralNull();
-        }
         ctx.replaceMe(Pruner.transformToNullFieldRef(x, program));
       }
     }
diff --git a/dev/core/src/com/google/gwt/dev/js/JsNormalizer.java b/dev/core/src/com/google/gwt/dev/js/JsNormalizer.java
index 4117d0d..32bfc94 100644
--- a/dev/core/src/com/google/gwt/dev/js/JsNormalizer.java
+++ b/dev/core/src/com/google/gwt/dev/js/JsNormalizer.java
@@ -40,16 +40,19 @@
   /**
    * Resolves any unresolved JsNameRefs.
    */
-  private class JsNormalizing extends JsModVisitor {
+  private static class JsNormalizing extends JsModVisitor {
 
+    @Override
     public void endVisit(JsBinaryOperation x, JsContext<JsExpression> ctx) {
       maybeShuffleModifyingBinary(x, ctx);
     }
 
+    @Override
     public void endVisit(JsPostfixOperation x, JsContext<JsExpression> ctx) {
       maybeShuffleModifyingUnary(x, ctx);
     }
 
+    @Override
     public void endVisit(JsPrefixOperation x, JsContext<JsExpression> ctx) {
       maybeShuffleModifyingUnary(x, ctx);
     }
diff --git a/dev/core/src/com/google/gwt/dev/js/JsParser.java b/dev/core/src/com/google/gwt/dev/js/JsParser.java
index 674b2b0..aa2826c 100644
--- a/dev/core/src/com/google/gwt/dev/js/JsParser.java
+++ b/dev/core/src/com/google/gwt/dev/js/JsParser.java
@@ -232,9 +232,6 @@
       case TokenStream.HOOK:
         return mapConditional(node);
 
-      case TokenStream.NAME:
-        return mapName(node);
-
       case TokenStream.STRING:
         return program.getStringLiteral(sourceInfoStack.peek().makeChild(
             JsParser.class, "JS String literal"), node.getString());
@@ -284,6 +281,7 @@
       case TokenStream.SETNAME:
         return mapBinaryOperation(JsBinaryOperator.ASG, node);
 
+      case TokenStream.NAME:
       case TokenStream.BINDNAME:
         return mapName(node);
 
diff --git a/dev/core/src/com/google/gwt/dev/js/rhino/UintMap.java b/dev/core/src/com/google/gwt/dev/js/rhino/UintMap.java
index 142f4eb..365088e 100644
--- a/dev/core/src/com/google/gwt/dev/js/rhino/UintMap.java
+++ b/dev/core/src/com/google/gwt/dev/js/rhino/UintMap.java
@@ -352,9 +352,8 @@
         else {
             // Need to consume empty entry: check occupation level
             if (keys == null || occupiedCount * 4 >= (1 << power) * 3) {
-                // Too litle unused entries: rehash
+                // Too few unused entries: rehash
                 rehashTable(intType);
-                keys = this.keys;
                 return insertNewKey(key);
             }
             ++occupiedCount;
diff --git a/dev/core/src/com/google/gwt/dev/resource/impl/ResourceOracleImpl.java b/dev/core/src/com/google/gwt/dev/resource/impl/ResourceOracleImpl.java
index c67caa3..63aae36 100644
--- a/dev/core/src/com/google/gwt/dev/resource/impl/ResourceOracleImpl.java
+++ b/dev/core/src/com/google/gwt/dev/resource/impl/ResourceOracleImpl.java
@@ -24,6 +24,7 @@
 import java.io.File;
 import java.io.IOException;
 import java.io.InputStream;
+import java.net.URI;
 import java.net.URISyntaxException;
 import java.net.URL;
 import java.net.URLClassLoader;
@@ -142,6 +143,21 @@
       // Compare priorities of the path prefixes, high number == high priority.
       return this.pathPrefix.getPriority() - other.pathPrefix.getPriority();
     }
+    
+    @Override
+    public boolean equals(Object o) {
+      if (!(o instanceof ResourceData)) {
+        return false;
+      }
+      ResourceData other = (ResourceData) o;
+      return this.pathPrefix.getPriority() == other.pathPrefix.getPriority()
+          && this.resource.wasRerooted() == other.resource.wasRerooted();
+    }
+    
+    @Override
+    public int hashCode() {
+      return (pathPrefix.getPriority() << 1) + (resource.wasRerooted() ? 1 : 0);
+    }
 
     @Override
     public String toString() {
@@ -185,16 +201,26 @@
 
   private static void addAllClassPathEntries(TreeLogger logger,
       ClassLoader classLoader, List<ClassPathEntry> classPath) {
-    Set<URL> seenEntries = new HashSet<URL>();
+    // URL is expensive in collections, so we use URI instead
+    // See: http://michaelscharf.blogspot.com/2006/11/javaneturlequals-and-hashcode-make.html
+    Set<URI> seenEntries = new HashSet<URI>();
     for (; classLoader != null; classLoader = classLoader.getParent()) {
       if (classLoader instanceof URLClassLoader) {
         URLClassLoader urlClassLoader = (URLClassLoader) classLoader;
         URL[] urls = urlClassLoader.getURLs();
         for (URL url : urls) {
-          if (seenEntries.contains(url)) {
+          URI uri;
+          try {
+            uri = url.toURI();
+          } catch (URISyntaxException e) {
+            logger.log(TreeLogger.WARN, "Error processing classpath URL '"
+                + url + "'", e);
             continue;
           }
-          seenEntries.add(url);
+          if (seenEntries.contains(uri)) {
+            continue;
+          }
+          seenEntries.add(uri);
           Throwable caught;
           try {
             ClassPathEntry entry = createEntryForUrl(logger, url);
@@ -346,8 +372,9 @@
      * no changes.
      */
     boolean didChange = internalMap.size() != newInternalMap.size();
-    for (String resourcePath : newInternalMap.keySet()) {
-      ResourceData newData = newInternalMap.get(resourcePath);
+    for (Map.Entry<String, ResourceData> entry : newInternalMap.entrySet()) {
+      String resourcePath = entry.getKey();
+      ResourceData newData = entry.getValue();
       ResourceData oldData = internalMap.get(resourcePath);
       if (shouldUseNewResource(logger, oldData, newData)) {
         didChange = true;
diff --git a/dev/core/src/com/google/gwt/dev/shell/CheckForUpdates.java b/dev/core/src/com/google/gwt/dev/shell/CheckForUpdates.java
index e02230d..e105da7 100644
--- a/dev/core/src/com/google/gwt/dev/shell/CheckForUpdates.java
+++ b/dev/core/src/com/google/gwt/dev/shell/CheckForUpdates.java
@@ -111,12 +111,31 @@
       }
       return 0;
     }
-
+    
+    @Override
+    public boolean equals(Object o) {
+      if (!(o instanceof GwtVersion)) {
+        return false;
+      }
+      GwtVersion other = (GwtVersion) o;
+      for (int i = 0; i <= 2; ++i) {
+        if (version[i] != other.version[i]) {
+          return false;
+        }
+      }
+      return true;
+    }
+    
     public int getPart(int part) {
       // TODO: something besides IORE here?
       return version[part];
     }
 
+    @Override
+    public int hashCode() {
+      return (version[0] * 31 + version[1]) * 31 + version[2];
+    }
+
     public boolean isNoNagVersion() {
       return version[2] == 999;
     }
diff --git a/dev/core/src/com/google/gwt/dev/shell/CompilingClassLoader.java b/dev/core/src/com/google/gwt/dev/shell/CompilingClassLoader.java
index 3b1e2a0..8ed2db3 100644
--- a/dev/core/src/com/google/gwt/dev/shell/CompilingClassLoader.java
+++ b/dev/core/src/com/google/gwt/dev/shell/CompilingClassLoader.java
@@ -149,9 +149,9 @@
          */
         if (singleJsoImplTypes.contains(canonicalizeClassName(className))) {
           logger.log(TreeLogger.WARN,
-              "Invalid JSNI reference to SingleJsoImpl interface ("
-              + className + "); consider using a trampoline. "
-              + "Expect subsequent failures.", new NoSuchFieldError(
+              "Invalid JSNI reference to SingleJsoImpl interface (" + className
+                  + "); consider using a trampoline. "
+                  + "Expect subsequent failures.", new NoSuchFieldError(
                   jsniMemberRef));
           return -1;
         }
@@ -484,16 +484,26 @@
     File dir = new File(CLASS_DUMP_PATH + File.separator
         + packageName.replace('.', File.separatorChar));
     if (!dir.exists()) {
+      // No need to check mkdirs result because an IOException will occur anyway
       dir.mkdirs();
     }
 
     File file = new File(dir, className + ".class");
+    FileOutputStream fileOutput = null;
     try {
-      FileOutputStream fileOutput = new FileOutputStream(file);
+      fileOutput = new FileOutputStream(file);
       fileOutput.write(bytes);
       fileOutput.close();
     } catch (IOException e) {
       e.printStackTrace();
+    } finally {
+      if (fileOutput != null) {
+        try {
+          fileOutput.close();
+        } catch (IOException e) {
+          // oh well, we tried
+        }
+      }
     }
   }
 
diff --git a/dev/core/src/com/google/gwt/dev/shell/StandardGeneratorContext.java b/dev/core/src/com/google/gwt/dev/shell/StandardGeneratorContext.java
index 5309c38..d0ed80d 100644
--- a/dev/core/src/com/google/gwt/dev/shell/StandardGeneratorContext.java
+++ b/dev/core/src/com/google/gwt/dev/shell/StandardGeneratorContext.java
@@ -464,6 +464,7 @@
       gcup = new GeneratedUnit(sw, typeName);
     } else {
       File dir = new File(genDir, packageName.replace('.', File.separatorChar));
+      // No need to check mkdirs result because an IOException will occur anyway
       dir.mkdirs();
       File srcFile = new File(dir, simpleTypeName + ".java");
       if (srcFile.exists()) {
diff --git a/dev/core/src/com/google/gwt/dev/shell/jetty/JettyLauncher.java b/dev/core/src/com/google/gwt/dev/shell/jetty/JettyLauncher.java
index f094de6..683423e 100644
--- a/dev/core/src/com/google/gwt/dev/shell/jetty/JettyLauncher.java
+++ b/dev/core/src/com/google/gwt/dev/shell/jetty/JettyLauncher.java
@@ -256,7 +256,7 @@
    * Also provides special class filtering to isolate the web app from the GWT
    * hosting environment.
    */
-  protected final class WebAppContextWithReload extends WebAppContext {
+  protected static final class WebAppContextWithReload extends WebAppContext {
 
     /**
      * Specialized {@link WebAppClassLoader} that allows outside resources to be
diff --git a/dev/core/src/com/google/gwt/dev/util/CharArrayComparator.java b/dev/core/src/com/google/gwt/dev/util/CharArrayComparator.java
index c6db345..1d3b989 100644
--- a/dev/core/src/com/google/gwt/dev/util/CharArrayComparator.java
+++ b/dev/core/src/com/google/gwt/dev/util/CharArrayComparator.java
@@ -15,12 +15,13 @@
  */
 package com.google.gwt.dev.util;
 
+import java.io.Serializable;
 import java.util.Comparator;
 
 /**
  * Performs a case-sensitive comparison of char arrays.
  */
-public class CharArrayComparator implements Comparator<char[]> {
+public class CharArrayComparator implements Comparator<char[]>, Serializable {
 
   public static final CharArrayComparator INSTANCE = new CharArrayComparator();
 
diff --git a/dev/core/src/com/google/gwt/dev/util/DiskCache.java b/dev/core/src/com/google/gwt/dev/util/DiskCache.java
index 0b5f991..490ad70 100644
--- a/dev/core/src/com/google/gwt/dev/util/DiskCache.java
+++ b/dev/core/src/com/google/gwt/dev/util/DiskCache.java
@@ -51,7 +51,7 @@
         try {

           DiskCache diskCache = ref.get();

           if (diskCache != null) {

-            diskCache.finalize();

+            diskCache.close();

           }

         } catch (Throwable e) {

         }

@@ -193,6 +193,10 @@
 

   @Override

   protected synchronized void finalize() throws Throwable {

+    close();

+  }

+

+  private void close() throws Throwable {

     if (file != null) {

       file.setLength(0);

       file.close();

diff --git a/dev/core/src/com/google/gwt/dev/util/Util.java b/dev/core/src/com/google/gwt/dev/util/Util.java
index 8631513..70cf7e3 100644
--- a/dev/core/src/com/google/gwt/dev/util/Util.java
+++ b/dev/core/src/com/google/gwt/dev/util/Util.java
@@ -206,6 +206,7 @@
   public static void copy(TreeLogger logger, InputStream is, File out)
       throws UnableToCompleteException {
     try {
+      // No need to check mkdirs result because an IOException will occur anyway
       out.getParentFile().mkdirs();
       copy(logger, is, new FileOutputStream(out));
     } catch (FileNotFoundException e) {
@@ -779,7 +780,8 @@
   }
 
   /**
-   * Selectively deletes a file or recursively deletes a directory.
+   * Selectively deletes a file or recursively deletes a directory.  Note that
+   * it is possible that files remain if file.delete() fails.
    * 
    * @param file the file to delete, or if this is a directory, the directory
    *          that serves as the root of a recursive deletion
@@ -1091,6 +1093,7 @@
     FileOutputStream f = null;
     Throwable caught;
     try {
+      // No need to check mkdirs result because an IOException will occur anyway
       where.getParentFile().mkdirs();
       f = new FileOutputStream(where);
       for (int i = 0; i < what.length; i++) {
@@ -1115,6 +1118,7 @@
     OutputStreamWriter writer = null;
     BufferedWriter buffered = null;
     try {
+      // No need to check mkdirs result because an IOException will occur anyway
       file.getParentFile().mkdirs();
       stream = new FileOutputStream(file);
       writer = new OutputStreamWriter(stream, DEFAULT_ENCODING);
@@ -1138,6 +1142,7 @@
       Object... objects) throws UnableToCompleteException {
     FileOutputStream stream = null;
     try {
+      // No need to check mkdirs result because an IOException will occur anyway
       file.getParentFile().mkdirs();
       stream = new FileOutputStream(file);
       writeObjectToStream(stream, objects);
@@ -1171,6 +1176,7 @@
       stream = new FileOutputStream(file);
       writer = new OutputStreamWriter(stream, DEFAULT_ENCODING);
       buffered = new BufferedWriter(writer);
+      // No need to check mkdirs result because an IOException will occur anyway
       file.getParentFile().mkdirs();
       buffered.write(string);
     } catch (IOException e) {
@@ -1192,6 +1198,7 @@
       stream = new FileOutputStream(file);
       writer = new OutputStreamWriter(stream, DEFAULT_ENCODING);
       buffered = new BufferedWriter(writer);
+      // No need to check mkdirs result because an IOException will occur anyway
       file.getParentFile().mkdirs();
       buffered.write(string);
     } catch (IOException e) {
diff --git a/dev/core/src/com/google/gwt/dev/util/log/AbstractTreeLogger.java b/dev/core/src/com/google/gwt/dev/util/log/AbstractTreeLogger.java
index 2f7de47..2c7af4c 100644
--- a/dev/core/src/com/google/gwt/dev/util/log/AbstractTreeLogger.java
+++ b/dev/core/src/com/google/gwt/dev/util/log/AbstractTreeLogger.java
@@ -122,6 +122,9 @@
     AbstractTreeLogger childLogger = doBranch();
 
     // Set up the child logger.
+    //
+    // Unsynchronized operations on childLogger are safe since no other
+    // thread could have a reference to it yet.
     childLogger.logLevel = logLevel;
 
     // Take a snapshot of the index that the branched child should have.
diff --git a/dev/core/src/com/google/gwt/dev/util/msg/Message1Long.java b/dev/core/src/com/google/gwt/dev/util/msg/Message1Long.java
index 06e5073..165a7a7 100644
--- a/dev/core/src/com/google/gwt/dev/util/msg/Message1Long.java
+++ b/dev/core/src/com/google/gwt/dev/util/msg/Message1Long.java
@@ -28,12 +28,12 @@
   }
 
   public TreeLogger branch(TreeLogger logger, long x, Throwable caught) {
-    Long xl = new Long(x);
+    Long xl = Long.valueOf(x);
     return branch1(logger, xl, getFormatter(xl), caught);
   }
 
   public void log(TreeLogger logger, long x, Throwable caught) {
-    Long xl = new Long(x);
+    Long xl = Long.valueOf(x);
     log1(logger, xl, getFormatter(xl), caught);
   }
 
diff --git a/dev/core/src/com/google/gwt/dev/util/msg/Message2IntString.java b/dev/core/src/com/google/gwt/dev/util/msg/Message2IntString.java
index c4cb9eb8..9748cec 100644
--- a/dev/core/src/com/google/gwt/dev/util/msg/Message2IntString.java
+++ b/dev/core/src/com/google/gwt/dev/util/msg/Message2IntString.java
@@ -28,12 +28,12 @@
   }
 
   public TreeLogger branch(TreeLogger logger, int x, String s, Throwable caught) {
-    Integer xi = new Integer(x);
+    Integer xi = Integer.valueOf(x);
     return branch2(logger, xi, s, getFormatter(xi), getFormatter(s), caught);
   }
 
   public void log(TreeLogger logger, int x, String s, Throwable caught) {
-    Integer xi = new Integer(x);
+    Integer xi = Integer.valueOf(x);
     log2(logger, xi, s, getFormatter(xi), getFormatter(s), caught);
   }
 
diff --git a/dev/core/src/com/google/gwt/dev/util/msg/Message2LongString.java b/dev/core/src/com/google/gwt/dev/util/msg/Message2LongString.java
index 2e93531..1da6b6d 100644
--- a/dev/core/src/com/google/gwt/dev/util/msg/Message2LongString.java
+++ b/dev/core/src/com/google/gwt/dev/util/msg/Message2LongString.java
@@ -28,12 +28,12 @@
   }
 
   public TreeLogger branch(TreeLogger logger, long x, String s, Throwable caught) {
-    Long xi = new Long(x);
+    Long xi = Long.valueOf(x);
     return branch2(logger, xi, s, getFormatter(xi), getFormatter(s), caught);
   }
 
   public void log(TreeLogger logger, long x, String s, Throwable caught) {
-    Long xi = new Long(x);
+    Long xi = Long.valueOf(x);
     log2(logger, xi, s, getFormatter(xi), getFormatter(s), caught);
   }
 }
diff --git a/dev/core/src/com/google/gwt/dev/util/msg/Message2StringInt.java b/dev/core/src/com/google/gwt/dev/util/msg/Message2StringInt.java
index a3f07bc..364dace 100644
--- a/dev/core/src/com/google/gwt/dev/util/msg/Message2StringInt.java
+++ b/dev/core/src/com/google/gwt/dev/util/msg/Message2StringInt.java
@@ -28,12 +28,12 @@
   }
 
   public TreeLogger branch(TreeLogger logger, String s, int x, Throwable caught) {
-    Integer xi = new Integer(x);
+    Integer xi = Integer.valueOf(x);
     return branch2(logger, s, xi, getFormatter(s), getFormatter(xi), caught);
   }
 
   public void log(TreeLogger logger, String s, int x, Throwable caught) {
-    Integer xi = new Integer(x);
+    Integer xi = Integer.valueOf(x);
     log2(logger, s, xi, getFormatter(s), getFormatter(xi), caught);
   }
 
diff --git a/dev/core/src/com/google/gwt/dev/util/msg/Message2URLInt.java b/dev/core/src/com/google/gwt/dev/util/msg/Message2URLInt.java
index 44acb34..96baf51 100644
--- a/dev/core/src/com/google/gwt/dev/util/msg/Message2URLInt.java
+++ b/dev/core/src/com/google/gwt/dev/util/msg/Message2URLInt.java
@@ -30,12 +30,12 @@
   }
 
   public TreeLogger branch(TreeLogger logger, URL u, int x, Throwable caught) {
-    Integer xi = new Integer(x);
+    Integer xi = Integer.valueOf(x);
     return branch2(logger, u, xi, getFormatter(u), getFormatter(xi), caught);
   }
 
   public void log(TreeLogger logger, URL u, int x, Throwable caught) {
-    Integer xi = new Integer(x);
+    Integer xi = Integer.valueOf(x);
     log2(logger, u, xi, getFormatter(u), getFormatter(xi), caught);
   }
 }
diff --git a/dev/core/src/com/google/gwt/dev/util/msg/Message3IntMethodString.java b/dev/core/src/com/google/gwt/dev/util/msg/Message3IntMethodString.java
index fc6c7e4..d549d13 100644
--- a/dev/core/src/com/google/gwt/dev/util/msg/Message3IntMethodString.java
+++ b/dev/core/src/com/google/gwt/dev/util/msg/Message3IntMethodString.java
@@ -31,13 +31,13 @@
 
   public TreeLogger branch(TreeLogger logger, int x, Method m, String s,
       Throwable caught) {
-    Integer xi = new Integer(x);
+    Integer xi = Integer.valueOf(x);
     return branch3(logger, xi, m, s, getFormatter(xi), getFormatter(m),
         getFormatter(s), caught);
   }
 
   public void log(TreeLogger logger, int x, Method m, String s, Throwable caught) {
-    Integer xi = new Integer(x);
+    Integer xi = Integer.valueOf(x);
     log3(logger, xi, m, s, getFormatter(xi), getFormatter(m), getFormatter(s),
         caught);
   }
diff --git a/dev/core/src/com/google/gwt/dev/util/msg/Message3IntStringClass.java b/dev/core/src/com/google/gwt/dev/util/msg/Message3IntStringClass.java
index d107941..7ae640e 100644
--- a/dev/core/src/com/google/gwt/dev/util/msg/Message3IntStringClass.java
+++ b/dev/core/src/com/google/gwt/dev/util/msg/Message3IntStringClass.java
@@ -29,13 +29,13 @@
 
   public TreeLogger branch(TreeLogger logger, int x, String s, Class c,
       Throwable caught) {
-    Integer xi = new Integer(x);
+    Integer xi = Integer.valueOf(x);
     return branch3(logger, xi, s, c, getFormatter(xi), getFormatter(s),
         getFormatter(c), caught);
   }
 
   public void log(TreeLogger logger, int x, String s, Class c, Throwable caught) {
-    Integer xi = new Integer(x);
+    Integer xi = Integer.valueOf(x);
     log3(logger, xi, s, c, getFormatter(xi), getFormatter(s), getFormatter(c),
         caught);
   }
diff --git a/dev/core/src/com/google/gwt/dev/util/msg/Message3IntStringString.java b/dev/core/src/com/google/gwt/dev/util/msg/Message3IntStringString.java
index 3cfb96d..71c0d71 100644
--- a/dev/core/src/com/google/gwt/dev/util/msg/Message3IntStringString.java
+++ b/dev/core/src/com/google/gwt/dev/util/msg/Message3IntStringString.java
@@ -29,14 +29,14 @@
 
   public TreeLogger branch(TreeLogger logger, int x, String s1, String s2,
       Throwable caught) {
-    Integer xi = new Integer(x);
+    Integer xi = Integer.valueOf(x);
     return branch3(logger, xi, s1, s2, getFormatter(xi), getFormatter(s1),
         getFormatter(s2), caught);
   }
 
   public void log(TreeLogger logger, int x, String s1, String s2,
       Throwable caught) {
-    Integer xi = new Integer(x);
+    Integer xi = Integer.valueOf(x);
     log3(logger, xi, s1, s2, getFormatter(xi), getFormatter(s1),
         getFormatter(s2), caught);
   }
diff --git a/dev/core/src/com/google/gwt/dev/util/msg/Message3StringIntString.java b/dev/core/src/com/google/gwt/dev/util/msg/Message3StringIntString.java
index fdee544..e3e315c 100644
--- a/dev/core/src/com/google/gwt/dev/util/msg/Message3StringIntString.java
+++ b/dev/core/src/com/google/gwt/dev/util/msg/Message3StringIntString.java
@@ -29,14 +29,14 @@
 
   public TreeLogger branch(TreeLogger logger, String s1, int x, String s2,
       Throwable caught) {
-    Integer xi = new Integer(x);
+    Integer xi = Integer.valueOf(x);
     return branch3(logger, s1, xi, s2, getFormatter(s1), getFormatter(xi),
         getFormatter(s2), caught);
   }
 
   public void log(TreeLogger logger, String s1, int x, String s2,
       Throwable caught) {
-    Integer xi = new Integer(x);
+    Integer xi = Integer.valueOf(x);
     log3(logger, s1, xi, s2, getFormatter(s1), getFormatter(xi),
         getFormatter(s2), caught);
   }
diff --git a/dev/core/src/com/google/gwt/util/tools/ToolBase.java b/dev/core/src/com/google/gwt/util/tools/ToolBase.java
index 5e0cc0b..60729cf 100644
--- a/dev/core/src/com/google/gwt/util/tools/ToolBase.java
+++ b/dev/core/src/com/google/gwt/util/tools/ToolBase.java
@@ -128,11 +128,7 @@
         System.err.print(tag);
         String[] tagArgs = handler.getTagArgs();
         for (String tagArg : tagArgs) {
-          if (handler.isRequired()) {
-            System.err.print(" " + tagArg);
-          } else {
-            System.err.print(" " + tagArg);
-          }
+          System.err.print(" " + tagArg);
         }
         System.err.print(handler.isRequired() ? "" : "]");
       }
diff --git a/dev/core/src/com/google/gwt/util/tools/Utility.java b/dev/core/src/com/google/gwt/util/tools/Utility.java
index 7179561..a7dab7b 100644
--- a/dev/core/src/com/google/gwt/util/tools/Utility.java
+++ b/dev/core/src/com/google/gwt/util/tools/Utility.java
@@ -179,6 +179,7 @@
     boolean alreadyExisted = dir.exists();
 
     if (create) {
+      // No need to check mkdirs result because we check for dir.exists()
       dir.mkdirs();
     }
 
@@ -257,6 +258,8 @@
     if (baseDir == null) {
       baseDir = new File(System.getProperty("java.io.tmpdir"));
     }
+    // No need to check the result of this mkdirs call because
+    // we will detect the subsequent failure
     baseDir.mkdirs();
 
     // Try this a few times due to non-atomic delete+mkdir operations.
diff --git a/dev/core/src/org/apache/catalina/loader/WebappClassLoader.java b/dev/core/src/org/apache/catalina/loader/WebappClassLoader.java
index f9c5ee0..f941fad 100644
--- a/dev/core/src/org/apache/catalina/loader/WebappClassLoader.java
+++ b/dev/core/src/org/apache/catalina/loader/WebappClassLoader.java
@@ -1811,6 +1811,8 @@
                                         (".class"))) {
                                     resourceFile = new File
                                         (loaderDir, jarEntry2.getName());
+                                    // No need to check mkdirs result because an
+                                    // IOException will occur anyway
                                     resourceFile.getParentFile().mkdirs();
                                     FileOutputStream os = null;
                                     InputStream is = null;
diff --git a/dev/core/test/com/google/gwt/core/ext/typeinfo/JClassTypeTest.java b/dev/core/test/com/google/gwt/core/ext/typeinfo/JClassTypeTest.java
index 7d385fc..1f23d47 100644
--- a/dev/core/test/com/google/gwt/core/ext/typeinfo/JClassTypeTest.java
+++ b/dev/core/test/com/google/gwt/core/ext/typeinfo/JClassTypeTest.java
@@ -233,21 +233,20 @@
 
     boolean wasFound = false;
 
-    JClassType expectedType = oracle.getType(expectedTypeName);
-    JClassType searchType = oracle.getType(searchTypeName);
     JType[] paramTypes = new JType[paramTypeNames.length];
     for (int i = 0; i < paramTypeNames.length; i++) {
       String paramTypeName = paramTypeNames[i];
       paramTypes[i] = oracle.parse(paramTypeName);
     }
 
+    JClassType expectedType = oracle.getType(expectedTypeName);
+    JClassType searchType = oracle.getType(searchTypeName);
     JMethod[] leafMethods = searchType.getOverridableMethods();
     for (int i = 0; i < leafMethods.length; i++) {
       JMethod method = leafMethods[i];
       if (method.getName().equals(methodName)) {
         if (method.hasParamTypes(paramTypes)) {
-          String typeName = method.getEnclosingType().getQualifiedSourceName();
-          assertEquals(expectedTypeName, typeName);
+          assertEquals(expectedType, method.getEnclosingType());
           wasFound = true;
           break;
         }
diff --git a/dev/core/test/com/google/gwt/core/ext/typeinfo/test/GenericClass.java b/dev/core/test/com/google/gwt/core/ext/typeinfo/test/GenericClass.java
index b9b39bb..cc6b439 100644
--- a/dev/core/test/com/google/gwt/core/ext/typeinfo/test/GenericClass.java
+++ b/dev/core/test/com/google/gwt/core/ext/typeinfo/test/GenericClass.java
@@ -58,7 +58,7 @@
   /**
    * Field of an inner class that is enclosed in a parameterized type.
    */
-  GenericClass<Integer>.NonGenericInnerClass nonGenericInnerClassField;
+  transient GenericClass<Integer>.NonGenericInnerClass nonGenericInnerClassField;
 
   /**
    * NOTE: The following is disabled because it violates an assumption in TOB
diff --git a/dev/core/test/com/google/gwt/dev/javac/BinaryTypeReferenceRestrictionsCheckerTest.java b/dev/core/test/com/google/gwt/dev/javac/BinaryTypeReferenceRestrictionsCheckerTest.java
index e3ab405..a9d037d 100644
--- a/dev/core/test/com/google/gwt/dev/javac/BinaryTypeReferenceRestrictionsCheckerTest.java
+++ b/dev/core/test/com/google/gwt/dev/javac/BinaryTypeReferenceRestrictionsCheckerTest.java
@@ -53,7 +53,7 @@
   /**
    * Mocks a binary type
    */
-  class MockBinaryType implements IBinaryType {
+  static class MockBinaryType implements IBinaryType {
     private final String qualifiedTypeName;
 
     MockBinaryType(String typeName) {
diff --git a/dev/core/test/com/google/gwt/dev/javac/CompilationStateTest.java b/dev/core/test/com/google/gwt/dev/javac/CompilationStateTest.java
index 9addb1d..716591a 100644
--- a/dev/core/test/com/google/gwt/dev/javac/CompilationStateTest.java
+++ b/dev/core/test/com/google/gwt/dev/javac/CompilationStateTest.java
@@ -43,7 +43,7 @@
  */
 public class CompilationStateTest extends TestCase {
 
-  private class GeneratedSourceFileCompilationUnit extends
+  private static class GeneratedSourceFileCompilationUnit extends
       SourceFileCompilationUnit implements Generated {
 
     private final boolean modifySource;
diff --git a/dev/core/test/com/google/gwt/dev/javac/impl/JdtBehaviorTest.java b/dev/core/test/com/google/gwt/dev/javac/impl/JdtBehaviorTest.java
index 3466302..34b4012 100644
--- a/dev/core/test/com/google/gwt/dev/javac/impl/JdtBehaviorTest.java
+++ b/dev/core/test/com/google/gwt/dev/javac/impl/JdtBehaviorTest.java
@@ -53,7 +53,7 @@
   /**
    * Hook-point if we need to modify the compiler behavior.
    */
-  private class CompilerImpl extends Compiler {
+  private static class CompilerImpl extends Compiler {
 
     public CompilerImpl(INameEnvironment environment,
         ICompilerRequestor requestor) {
@@ -140,7 +140,7 @@
     }
   }
 
-  private class ResourceAdapter implements ICompilationUnit {
+  private static class ResourceAdapter implements ICompilationUnit {
 
     private final MockResource sourceFile;
 
diff --git a/dev/core/test/com/google/gwt/dev/resource/impl/AbstractResourceOrientedTestBase.java b/dev/core/test/com/google/gwt/dev/resource/impl/AbstractResourceOrientedTestBase.java
index c42d98e..2b18497 100644
--- a/dev/core/test/com/google/gwt/dev/resource/impl/AbstractResourceOrientedTestBase.java
+++ b/dev/core/test/com/google/gwt/dev/resource/impl/AbstractResourceOrientedTestBase.java
@@ -73,9 +73,10 @@
       Map<AbstractResource, PathPrefix> results = new IdentityHashMap<AbstractResource, PathPrefix>();
       Map<AbstractResource, PathPrefix> rs = cpe.findApplicableResources(
           logger, pathPrefixSet);
-      for (AbstractResource r : rs.keySet()) {
+      for (Map.Entry<AbstractResource, PathPrefix> entry : rs.entrySet()) {
+        AbstractResource r = entry.getKey();
         if (r.getPath().indexOf(".svn/") < 0) {
-          results.put(r, rs.get(r));
+          results.put(r, entry.getValue());
         }
       }
       return results;
diff --git a/dev/core/test/com/google/gwt/dev/resource/impl/DefaultFiltersTest.java b/dev/core/test/com/google/gwt/dev/resource/impl/DefaultFiltersTest.java
index d2fccd7..b74d28a 100644
--- a/dev/core/test/com/google/gwt/dev/resource/impl/DefaultFiltersTest.java
+++ b/dev/core/test/com/google/gwt/dev/resource/impl/DefaultFiltersTest.java
@@ -436,7 +436,8 @@
         }
         return scanner.match(path);
       }
-    }, tag != null ? tag : "includes: " + includes + ", excludes: " + excludes);
+    }, tag != null ? tag : "includes: " + Arrays.toString(includes)
+        + ", excludes: " + Arrays.toString(excludes));
   }
 
   private ResourceFilter getFilterWithCatchAll(String includesList[],
diff --git a/dev/core/test/com/google/gwt/dev/resource/impl/FileResourceTest.java b/dev/core/test/com/google/gwt/dev/resource/impl/FileResourceTest.java
index 7a38934..43dfe33 100644
--- a/dev/core/test/com/google/gwt/dev/resource/impl/FileResourceTest.java
+++ b/dev/core/test/com/google/gwt/dev/resource/impl/FileResourceTest.java
@@ -53,6 +53,7 @@
      * Touch the file at more than one second to ensure there's a noticeable
      * difference on every platform.
      */
+    // Ignore failure of setLastModified 
     f.setLastModified(f.lastModified() + 1500);
 
     // Should be stale now.
diff --git a/dev/core/test/com/google/gwt/dev/typeinfo/test/InteractiveTypeOracle.java b/dev/core/test/com/google/gwt/dev/typeinfo/test/InteractiveTypeOracle.java
index f20de04..eb1044b 100644
--- a/dev/core/test/com/google/gwt/dev/typeinfo/test/InteractiveTypeOracle.java
+++ b/dev/core/test/com/google/gwt/dev/typeinfo/test/InteractiveTypeOracle.java
@@ -36,6 +36,7 @@
 import java.io.InputStreamReader;
 import java.util.HashMap;
 import java.util.Map;
+import java.util.Set;
 
 public class InteractiveTypeOracle {
 
@@ -202,7 +203,8 @@
 
     public boolean process(TreeLogger logger, String[] args) {
       TreeLogger sublogger = null;
-      String[] cmdTokens = handlers.keySet().toArray(new String[0]);
+      Set<String> keySet = handlers.keySet();
+      String[] cmdTokens = keySet.toArray(new String[keySet.size()]);
       for (int i = 0; i < cmdTokens.length; i++) {
         String cmdToken = cmdTokens[i];
         if (sublogger == null) {
diff --git a/dev/core/test/org/apache/commons/collections/collection/AbstractTestCollection.java b/dev/core/test/org/apache/commons/collections/collection/AbstractTestCollection.java
index 1c01b53..1496dda 100644
--- a/dev/core/test/org/apache/commons/collections/collection/AbstractTestCollection.java
+++ b/dev/core/test/org/apache/commons/collections/collection/AbstractTestCollection.java
@@ -1108,7 +1108,7 @@
 

         resetFull();

         try {

-            array = collection.toArray(new Void[0]);

+            array = collection.toArray(new Void[collection.size()]);

             fail("toArray(new Void[0]) should raise ArrayStore");

         } catch (ArrayStoreException e) {

             // expected

@@ -1123,7 +1123,7 @@
         }

         verify();

         

-        array = collection.toArray(new Object[0]);

+        array = collection.toArray(new Object[collection.size()]);

         a = collection.toArray();

         assertEquals("toArrays should be equal", 

                      Arrays.asList(array), Arrays.asList(a));

diff --git a/dev/linux/src/com/google/gwt/dev/shell/moz/BrowserWidgetMoz.java b/dev/linux/src/com/google/gwt/dev/shell/moz/BrowserWidgetMoz.java
index addbfb0..8f0392e 100644
--- a/dev/linux/src/com/google/gwt/dev/shell/moz/BrowserWidgetMoz.java
+++ b/dev/linux/src/com/google/gwt/dev/shell/moz/BrowserWidgetMoz.java
@@ -49,7 +49,7 @@
           return false;
         }
 
-        Object key = new Integer(scriptObject);
+        Object key = Integer.valueOf(scriptObject);
         // Attach a new ModuleSpace to make it programmable.
         ModuleSpaceHost msh = getHost().createModuleSpaceHost(logger,
             BrowserWidgetMoz.this, moduleName);
@@ -87,7 +87,7 @@
       try {
         Integer key = null;
         if (scriptObject != 0) {
-          key = new Integer(scriptObject);
+          key = Integer.valueOf(scriptObject);
         }
         doUnload(key);
         return true;
diff --git a/dev/linux/src/com/google/gwt/dev/shell/moz/SwtGeckoGlue.java b/dev/linux/src/com/google/gwt/dev/shell/moz/SwtGeckoGlue.java
index 3aa84c3..431d39f 100644
--- a/dev/linux/src/com/google/gwt/dev/shell/moz/SwtGeckoGlue.java
+++ b/dev/linux/src/com/google/gwt/dev/shell/moz/SwtGeckoGlue.java
@@ -42,7 +42,7 @@
     Throwable rethrow = null;
     try {
       Object retVal = XPCOMVtblCall.invoke(null, new Object[] {
-          new Integer(1), new Integer(nsISupports)});
+          Integer.valueOf(1), new Integer(nsISupports)});
       return ((Integer) retVal).intValue();
     } catch (IllegalArgumentException e) {
       rethrow = e;
@@ -62,7 +62,7 @@
     Throwable rethrow = null;
     try {
       Object retVal = XPCOMVtblCall.invoke(null, new Object[] {
-          new Integer(2), new Integer(nsISupports)});
+          Integer.valueOf(2), new Integer(nsISupports)});
       return ((Integer) retVal).intValue();
     } catch (IllegalArgumentException e) {
       rethrow = e;
diff --git a/dev/oophm/src/com/google/gwt/dev/shell/BrowserChannel.java b/dev/oophm/src/com/google/gwt/dev/shell/BrowserChannel.java
index 325bb64..bdf36f9 100644
--- a/dev/oophm/src/com/google/gwt/dev/shell/BrowserChannel.java
+++ b/dev/oophm/src/com/google/gwt/dev/shell/BrowserChannel.java
@@ -16,7 +16,7 @@
 package com.google.gwt.dev.shell;
 
 import com.google.gwt.core.ext.TreeLogger;
-import com.google.gwt.dev.shell.BrowserChannel.SessionHandler.ReturnOrException;
+import com.google.gwt.dev.shell.BrowserChannel.SessionHandler.ExceptionOrReturnValue;
 import com.google.gwt.dev.shell.BrowserChannel.SessionHandler.SpecialDispatchId;
 import com.google.gwt.dev.shell.BrowserChannel.Value.ValueType;
 import com.google.gwt.util.tools.Utility;
@@ -116,11 +116,11 @@
      * Wrapper to return both a return value/exception and a flag as to whether
      * an exception was thrown or not.
      */
-    public static class ReturnOrException {
+    public static class ExceptionOrReturnValue {
       private final boolean isException;
       private final Value returnValue;
 
-      public ReturnOrException(boolean isException, Value returnValue) {
+      public ExceptionOrReturnValue(boolean isException, Value returnValue) {
         this.isException = isException;
         this.returnValue = returnValue;
       }
@@ -145,16 +145,16 @@
 
     public abstract void freeValue(BrowserChannel channel, int[] ids);
 
-    public abstract ReturnOrException getProperty(BrowserChannel channel,
+    public abstract ExceptionOrReturnValue getProperty(BrowserChannel channel,
         int refId, int dispId);
 
-    public abstract ReturnOrException invoke(BrowserChannel channel,
+    public abstract ExceptionOrReturnValue invoke(BrowserChannel channel,
         Value thisObj, int dispId, Value[] args);
 
     public abstract TreeLogger loadModule(TreeLogger logger,
         BrowserChannel channel, String moduleName, String userAgent);
 
-    public abstract ReturnOrException setProperty(BrowserChannel channel,
+    public abstract ExceptionOrReturnValue setProperty(BrowserChannel channel,
         int refId, int dispId, Value newValue);
 
     public abstract void unloadModule(BrowserChannel channel, String moduleName);
@@ -879,7 +879,7 @@
     }
 
     public static void send(BrowserChannel channel,
-        ReturnOrException returnOrException) throws IOException {
+        ExceptionOrReturnValue returnOrException) throws IOException {
       send(channel, returnOrException.isException(),
           returnOrException.getReturnValue());
     }
@@ -1286,7 +1286,7 @@
       BrowserChannelException {
     final InvokeSpecialMessage ismsg = InvokeSpecialMessage.receive(this);
     Value[] args = ismsg.getArgs();
-    ReturnOrException retExc = null;
+    ExceptionOrReturnValue retExc = null;
     switch (ismsg.getDispatchId()) {
       case GetProperty:
         assert args.length == 2;
diff --git a/dev/oophm/src/com/google/gwt/dev/shell/BrowserChannelServer.java b/dev/oophm/src/com/google/gwt/dev/shell/BrowserChannelServer.java
index 13fc1ac..ab285e0 100644
--- a/dev/oophm/src/com/google/gwt/dev/shell/BrowserChannelServer.java
+++ b/dev/oophm/src/com/google/gwt/dev/shell/BrowserChannelServer.java
@@ -24,7 +24,8 @@
 /**
  * 
  */
-public class BrowserChannelServer extends BrowserChannel implements Runnable {
+public final class BrowserChannelServer extends BrowserChannel
+    implements Runnable {
 
   public static final String JSO_CLASS = "com.google.gwt.core.client.JavaScriptObject";
 
diff --git a/dev/oophm/src/com/google/gwt/dev/shell/OophmSessionHandler.java b/dev/oophm/src/com/google/gwt/dev/shell/OophmSessionHandler.java
index 2c1896b..45ef3bc 100644
--- a/dev/oophm/src/com/google/gwt/dev/shell/OophmSessionHandler.java
+++ b/dev/oophm/src/com/google/gwt/dev/shell/OophmSessionHandler.java
@@ -55,7 +55,7 @@
   }
 
   @Override
-  public ReturnOrException getProperty(BrowserChannel channel, int refId,
+  public ExceptionOrReturnValue getProperty(BrowserChannel channel, int refId,
       int dispId) {
     BrowserChannelServer serverChannel = (BrowserChannelServer) channel;
     ModuleSpace moduleSpace = moduleMap.get(serverChannel);
@@ -74,13 +74,13 @@
       JsValueOOPHM jsval = (JsValueOOPHM) dispObj.getField(dispId);
       Value retVal = serverChannel.convertFromJsValue(localObjects, jsval);
       branch.log(TreeLogger.SPAM, "result is " + retVal, null);
-      return new ReturnOrException(false, retVal);
+      return new ExceptionOrReturnValue(false, retVal);
     } catch (Throwable t) {
       JsValueOOPHM jsval = new JsValueOOPHM();
       JsValueGlue.set(jsval, moduleSpace.getIsolatedClassLoader(),
           t.getClass(), t);
       Value retVal = serverChannel.convertFromJsValue(localObjects, jsval);
-      return new ReturnOrException(true, retVal);
+      return new ExceptionOrReturnValue(true, retVal);
     }
   }
 
@@ -88,7 +88,7 @@
    * Invoke a method on a server object in from client code.
    */
   @Override
-  public ReturnOrException invoke(BrowserChannel channel, Value thisVal,
+  public ExceptionOrReturnValue invoke(BrowserChannel channel, Value thisVal,
       int methodDispatchId, Value[] args) {
     BrowserChannelServer serverChannel = (BrowserChannelServer) channel;
     ObjectsTable localObjects = serverChannel.getJavaObjectsExposedInBrowser();
@@ -150,7 +150,7 @@
           t.getClass(), t);
     }
     Value retVal = serverChannel.convertFromJsValue(localObjects, jsRetVal);
-    return new ReturnOrException(exception, retVal);
+    return new ExceptionOrReturnValue(exception, retVal);
   }
 
   @Override
@@ -180,7 +180,7 @@
   }
 
   @Override
-  public ReturnOrException setProperty(BrowserChannel channel, int refId,
+  public ExceptionOrReturnValue setProperty(BrowserChannel channel, int refId,
       int dispId, Value newValue) {
     BrowserChannelServer serverChannel = (BrowserChannelServer) channel;
     ModuleSpace moduleSpace = moduleMap.get(serverChannel);
@@ -198,13 +198,13 @@
       serverChannel.convertToJsValue(moduleSpace.getIsolatedClassLoader(),
           localObjects, newValue, jsval);
       dispObj.setField(dispId, jsval);
-      return new ReturnOrException(false, newValue);
+      return new ExceptionOrReturnValue(false, newValue);
     } catch (Throwable t) {
       JsValueOOPHM jsval = new JsValueOOPHM();
       JsValueGlue.set(jsval, moduleSpace.getIsolatedClassLoader(),
           t.getClass(), t);
       Value retVal = serverChannel.convertFromJsValue(localObjects, jsval);
-      return new ReturnOrException(true, retVal);
+      return new ExceptionOrReturnValue(true, retVal);
     }
   }
 
diff --git a/dev/oophm/src/com/google/gwt/dev/util/log/SwingLoggerPanel.java b/dev/oophm/src/com/google/gwt/dev/util/log/SwingLoggerPanel.java
index 0de63a0..d920cee 100644
--- a/dev/oophm/src/com/google/gwt/dev/util/log/SwingLoggerPanel.java
+++ b/dev/oophm/src/com/google/gwt/dev/util/log/SwingLoggerPanel.java
@@ -63,6 +63,10 @@
 
 /**
  * Swing widget containing a tree logger.
+ * 
+ * <p>
+ * This class should not be serialized.
+ * </p>
  */
 public class SwingLoggerPanel extends JPanel implements TreeSelectionListener {
 
diff --git a/doc/src/com/google/gwt/doc/DeveloperGuide.java b/doc/src/com/google/gwt/doc/DeveloperGuide.java
index 40a1c12..b3b6850 100644
--- a/doc/src/com/google/gwt/doc/DeveloperGuide.java
+++ b/doc/src/com/google/gwt/doc/DeveloperGuide.java
@@ -1748,7 +1748,7 @@
            * Would match the file 'new_file_icon.png', 'new_file_icon.gif', or
            * 'new_file_icon.png' located in the same package as this type.
            */
-          public AbstractImagePrototype new_file_icon();
+          AbstractImagePrototype new_file_icon();
 
           /**
            * Would match the file 'open_file_icon.gif' located in the same
@@ -1756,7 +1756,7 @@
            * 
            * @gwt.resource open_file_icon.gif
            */
-          public AbstractImagePrototype openFileIcon();
+          AbstractImagePrototype openFileIcon();
 
           /**
            * Would match the file 'savefile.gif' located in the package
@@ -1765,7 +1765,7 @@
            * 
            * @gwt.resource com/mycompany/mygwtapp/icons/savefile.gif
            */
-          public AbstractImagePrototype saveFileIcon();
+          AbstractImagePrototype saveFileIcon();
         }
       }
 
@@ -1821,8 +1821,8 @@
 
         public void useLocalizedImageBundle() {
           // Create a locale-sensitive MailImageBundleFactory
-          MailImageBundleFactory mailImageBundleFactory = (MailImageBundleFactory) GWT
-              .create(MailImageBundleFactory.class);
+          MailImageBundleFactory mailImageBundleFactory =
+            (MailImageBundleFactory) GWT.create(MailImageBundleFactory.class);
 
           // This will return a locale-sensitive MailImageBundle, since we are using
           // a locale-sensitive factory to create it.
@@ -1847,14 +1847,14 @@
            *
            * @gwt.resource compose_new_message_icon.gif
            */
-          public AbstractImagePrototype composeNewMessageIcon();
+          AbstractImagePrototype composeNewMessageIcon();
 
           /**
            * The default 'Help' icon if no locale-specific image is specified.
            * Will match 'help_icon.png', 'help_icon.gif', or 'help_icon.jpg' in
            * the same package as this type.
            */
-          public AbstractImagePrototype help_icon();
+          AbstractImagePrototype help_icon();
         }
 
         /**
@@ -1869,7 +1869,7 @@
            *
            * @gwt.resource compose_new_message_icon_en.gif
            */
-          public AbstractImagePrototype composeNewMessageIcon();
+          AbstractImagePrototype composeNewMessageIcon();
         }
 
         /**
@@ -1882,14 +1882,14 @@
            *
            * @gwt.resource compose_new_message_icon_fr.gif
            */
-          public AbstractImagePrototype composeNewMessageIcon();
+          AbstractImagePrototype composeNewMessageIcon();
 
           /**
            * The French version of the 'Help' icon.
            *
            * @gwt.resource help_icon_fr.gif
            */
-          public AbstractImagePrototype help_icon();
+          AbstractImagePrototype help_icon();
         }
 
         /**
@@ -1897,7 +1897,7 @@
          */
         public interface MailImageBundleFactory extends Localizable {
 
-          public MailImageBundle createImageBundle();
+          MailImageBundle createImageBundle();
         }
 
         /**
@@ -2063,16 +2063,16 @@
       public class ParamType2 {
       }
 
-      public ReturnType methodName(ParamType1 param1, ParamType2 param2);
+      ReturnType methodName(ParamType1 param1, ParamType2 param2);
 
-      public void methodName(ParamType1 param1, ParamType2 param2,
+      void methodName(ParamType1 param1, ParamType2 param2,
           AsyncCallback callback);
 
       /**
        * @skip
        */
       public interface MyService extends RemoteService {
-        public String myMethod(String s);
+        String myMethod(String s);
       }
 
       /**
@@ -2085,14 +2085,13 @@
           // Do something interesting with 's' here on the server.
           return s;
         }
-
       }
 
       /**
        * @skip
        */
       interface MyServiceAsync {
-        public void myMethod(String s, AsyncCallback callback);
+        void myMethod(String s, AsyncCallback callback);
       }
     }
 
@@ -2220,13 +2219,13 @@
         // (3) Create an asynchronous callback to handle the result.
         //
         AsyncCallback callback = new AsyncCallback() {
-          public void onSuccess(Object result) {
-            // do some UI stuff to show success
-          }
-
           public void onFailure(Throwable caught) {
             // do some UI stuff to show failure
           }
+          
+          public void onSuccess(Object result) {
+            // do some UI stuff to show success
+          }
         };
 
         // (4) Make the call. Control flow will continue immediately and later
@@ -2372,7 +2371,6 @@
          */
         List reverseListAndConvertToStrings(List c);
       }
-
     }
 
     /**
@@ -3379,7 +3377,6 @@
      */
     public static class JsniExceptions {
     }
-
   }
 
   /**
diff --git a/samples/dynatable/src/com/google/gwt/sample/dynatable/client/TimeSlot.java b/samples/dynatable/src/com/google/gwt/sample/dynatable/client/TimeSlot.java
index cb1f0b1..fabff66 100644
--- a/samples/dynatable/src/com/google/gwt/sample/dynatable/client/TimeSlot.java
+++ b/samples/dynatable/src/com/google/gwt/sample/dynatable/client/TimeSlot.java
@@ -57,6 +57,14 @@
     return 0;
   }
 
+  @Override
+  public boolean equals(Object obj) {
+    if (!(obj instanceof TimeSlot)) {
+      return false;
+    }
+    return compareTo((TimeSlot) obj) == 0;
+  }
+  
   public int getDayOfWeek() {
     return zeroBasedDayOfWeek;
   }
@@ -74,6 +82,11 @@
     return startMinutes;
   }
 
+  @Override
+  public int hashCode() {
+    return endMinutes + 7 * startMinutes + 31 * zeroBasedDayOfWeek;
+  }
+
   public void setDayOfWeek(int zeroBasedDayOfWeek) {
     if (0 <= zeroBasedDayOfWeek && zeroBasedDayOfWeek < 7) {
       this.zeroBasedDayOfWeek = zeroBasedDayOfWeek;
diff --git a/samples/mail/src/com/google/gwt/sample/mail/client/Contacts.java b/samples/mail/src/com/google/gwt/sample/mail/client/Contacts.java
index 799463c..738b1fb 100644
--- a/samples/mail/src/com/google/gwt/sample/mail/client/Contacts.java
+++ b/samples/mail/src/com/google/gwt/sample/mail/client/Contacts.java
@@ -43,7 +43,7 @@
   /**
    * Simple data structure representing a contact.
    */
-  private class Contact {
+  private static class Contact {
     public String email;
     public String name;
 
diff --git a/samples/mail/src/com/google/gwt/sample/mail/client/Mail.java b/samples/mail/src/com/google/gwt/sample/mail/client/Mail.java
index 2995159..1b7f652 100644
--- a/samples/mail/src/com/google/gwt/sample/mail/client/Mail.java
+++ b/samples/mail/src/com/google/gwt/sample/mail/client/Mail.java
@@ -42,7 +42,7 @@
   private static final Images images = GWT.create(Images.class);
 
   /**
-   * An aggragate image bundle that pulls together all the images for this
+   * An aggregate image bundle that pulls together all the images for this
    * application into a single bundle.
    */
   public interface Images extends Shortcuts.Images, TopPanel.Images {
diff --git a/samples/showcase/src/com/google/gwt/sample/showcase/client/ContentWidget.java b/samples/showcase/src/com/google/gwt/sample/showcase/client/ContentWidget.java
index bc80c03..880affb 100644
--- a/samples/showcase/src/com/google/gwt/sample/showcase/client/ContentWidget.java
+++ b/samples/showcase/src/com/google/gwt/sample/showcase/client/ContentWidget.java
@@ -366,11 +366,10 @@
     builder.setCallback(realCallback);
 
     // Send the request
-    Request request = null;
     try {
-      request = builder.send();
+      builder.send();
     } catch (RequestException e) {
-      realCallback.onError(request, e);
+      realCallback.onError(null, e);
     }
   }
 
diff --git a/samples/showcase/src/com/google/gwt/sample/showcase/client/Showcase.java b/samples/showcase/src/com/google/gwt/sample/showcase/client/Showcase.java
index 768e1f3..bf5a417 100644
--- a/samples/showcase/src/com/google/gwt/sample/showcase/client/Showcase.java
+++ b/samples/showcase/src/com/google/gwt/sample/showcase/client/Showcase.java
@@ -148,7 +148,7 @@
   /**
    * The current style theme.
    */
-  public static String CUR_THEME = ShowcaseConstants.STYLE_THEMES[0];
+  static String CUR_THEME = ShowcaseConstants.STYLE_THEMES[0];
 
   /**
    * Get the URL of the page, without an hash of query string.
diff --git a/samples/showcase/src/com/google/gwt/sample/showcase/client/ShowcaseAnnotations.java b/samples/showcase/src/com/google/gwt/sample/showcase/client/ShowcaseAnnotations.java
index f07f1a9..3851d3d 100644
--- a/samples/showcase/src/com/google/gwt/sample/showcase/client/ShowcaseAnnotations.java
+++ b/samples/showcase/src/com/google/gwt/sample/showcase/client/ShowcaseAnnotations.java
@@ -15,6 +15,11 @@
  */
 package com.google.gwt.sample.showcase.client;
 
+import java.lang.annotation.ElementType;
+import java.lang.annotation.Retention;
+import java.lang.annotation.RetentionPolicy;
+import java.lang.annotation.Target;
+
 /**
  * The annotations used in {@link Showcase}.
  */
@@ -23,6 +28,8 @@
    * Indicates that a class variable should be included as source data in the
    * example. All data must have a JavaDoc style comment.
    */
+  @Retention(RetentionPolicy.RUNTIME)
+  @Target(ElementType.FIELD)
   public @interface ShowcaseData {
   }
 
@@ -30,6 +37,8 @@
    * Indicates that a method or inner class should be included as source code in
    * the example. All source must have a JavaDoc style comment.
    */
+  @Retention(RetentionPolicy.RUNTIME)
+  @Target({ElementType.TYPE, ElementType.METHOD})
   public @interface ShowcaseSource {
   }
 
@@ -37,6 +46,8 @@
    * Indicates the raw files that be included as raw source in a Showcase
    * example.
    */
+  @Retention(RetentionPolicy.RUNTIME)
+  @Target(ElementType.TYPE)
   public static @interface ShowcaseRaw {
     String[] value();
   }
@@ -44,6 +55,8 @@
   /**
    * Indicates the prefix of a style attribute used in a Showcase example.
    */
+  @Retention(RetentionPolicy.RUNTIME)
+  @Target(ElementType.TYPE)
   public static @interface ShowcaseStyle {
     String[] value();
   }
diff --git a/samples/showcase/src/com/google/gwt/sample/showcase/client/content/i18n/CwConstantsExample.java b/samples/showcase/src/com/google/gwt/sample/showcase/client/content/i18n/CwConstantsExample.java
index 42d5ab1..7c9e6ed 100644
--- a/samples/showcase/src/com/google/gwt/sample/showcase/client/content/i18n/CwConstantsExample.java
+++ b/samples/showcase/src/com/google/gwt/sample/showcase/client/content/i18n/CwConstantsExample.java
@@ -40,7 +40,7 @@
 /**
  * Example file.
  */
-@ShowcaseRaw( {"ExampleConstants.java", "ExampleConstants.properties"})
+@ShowcaseRaw({"ExampleConstants.java", "ExampleConstants.properties"})
 public class CwConstantsExample extends ContentWidget {
   /**
    * The constants used in this Content Widget.
diff --git a/samples/showcase/src/com/google/gwt/sample/showcase/client/content/i18n/CwConstantsWithLookupExample.java b/samples/showcase/src/com/google/gwt/sample/showcase/client/content/i18n/CwConstantsWithLookupExample.java
index 574c873..5d09515 100644
--- a/samples/showcase/src/com/google/gwt/sample/showcase/client/content/i18n/CwConstantsWithLookupExample.java
+++ b/samples/showcase/src/com/google/gwt/sample/showcase/client/content/i18n/CwConstantsWithLookupExample.java
@@ -41,7 +41,7 @@
 /**
  * Example file.
  */
-@ShowcaseRaw( {"ColorConstants.java", "ColorConstants.properties"})
+@ShowcaseRaw({"ColorConstants.java", "ColorConstants.properties"})
 public class CwConstantsWithLookupExample extends ContentWidget {
   /**
    * The constants used in this Content Widget.
diff --git a/samples/showcase/src/com/google/gwt/sample/showcase/client/content/lists/CwMenuBar.java b/samples/showcase/src/com/google/gwt/sample/showcase/client/content/lists/CwMenuBar.java
index c022dbc..cc22c0d 100644
--- a/samples/showcase/src/com/google/gwt/sample/showcase/client/content/lists/CwMenuBar.java
+++ b/samples/showcase/src/com/google/gwt/sample/showcase/client/content/lists/CwMenuBar.java
@@ -32,7 +32,7 @@
 /**
  * Example file.
  */
-@ShowcaseStyle( {
+@ShowcaseStyle({
     ".gwt-MenuBar", ".gwt-MenuBarPopup", "html>body .gwt-MenuBarPopup",
     "* html .gwt-MenuBarPopup"})
 public class CwMenuBar extends ContentWidget {
diff --git a/samples/showcase/src/com/google/gwt/sample/showcase/client/content/lists/CwStackPanel.java b/samples/showcase/src/com/google/gwt/sample/showcase/client/content/lists/CwStackPanel.java
index 08050f9..2387fab 100644
--- a/samples/showcase/src/com/google/gwt/sample/showcase/client/content/lists/CwStackPanel.java
+++ b/samples/showcase/src/com/google/gwt/sample/showcase/client/content/lists/CwStackPanel.java
@@ -41,7 +41,7 @@
 /**
  * Example file.
  */
-@ShowcaseStyle( {
+@ShowcaseStyle({
     ".gwt-DecoratedStackPanel", "html>body .gwt-DecoratedStackPanel",
     "* html .gwt-DecoratedStackPanel", ".cw-StackPanelHeader"})
 public class CwStackPanel extends ContentWidget {
diff --git a/samples/simplerpc/src/com/google/gwt/sample/simplerpc/client/SimpleRPC.java b/samples/simplerpc/src/com/google/gwt/sample/simplerpc/client/SimpleRPC.java
index c405009..90bbb53 100644
--- a/samples/simplerpc/src/com/google/gwt/sample/simplerpc/client/SimpleRPC.java
+++ b/samples/simplerpc/src/com/google/gwt/sample/simplerpc/client/SimpleRPC.java
@@ -56,8 +56,8 @@
 
     // Should print a table of key value pairs.
     List<Integer> indexes = new ArrayList<Integer>();
-    indexes.add(new Integer(0));
-    indexes.add(new Integer(2));
+    indexes.add(Integer.valueOf(0));
+    indexes.add(Integer.valueOf(2));
     simpleRPCService.getMultipleStrings(indexes, getMultipleStringsCallback);
   }
 
diff --git a/tools/api-checker/src/com/google/gwt/tools/apichecker/ApiChange.java b/tools/api-checker/src/com/google/gwt/tools/apichecker/ApiChange.java
index cd5c2c0..ec37077 100644
--- a/tools/api-checker/src/com/google/gwt/tools/apichecker/ApiChange.java
+++ b/tools/api-checker/src/com/google/gwt/tools/apichecker/ApiChange.java
@@ -100,7 +100,15 @@
   public int compareTo(ApiChange arg0) {
     return this.toString().compareTo(arg0.toString());
   }
-
+  
+  @Override
+  public boolean equals(Object o) {
+    if (!(o instanceof ApiChange)) {
+      return false;
+    }
+    return this.toString().equals(o.toString());
+  }
+  
   public ApiElement getApiElement() {
     return element;
   }
@@ -121,6 +129,11 @@
     return stringRepresentationWithoutMessage;
   }
 
+  @Override
+  public int hashCode() {
+    return this.toString().hashCode();
+  }
+
   public int hashCodeForDuplication() {
     return element.hashCode() * 31 + status.hashCode() * 23
         + (message == null ? 0 : message.hashCode());
diff --git a/tools/api-checker/src/com/google/gwt/tools/apichecker/ApiClass.java b/tools/api-checker/src/com/google/gwt/tools/apichecker/ApiClass.java
index 616a3f0..ff62d3c 100644
--- a/tools/api-checker/src/com/google/gwt/tools/apichecker/ApiClass.java
+++ b/tools/api-checker/src/com/google/gwt/tools/apichecker/ApiClass.java
@@ -84,12 +84,25 @@
   public int compareTo(ApiClass other) {
     return getName().compareTo(other.getName());
   }
-
+  
+  @Override
+  public boolean equals(Object o) {
+    if (!(o instanceof ApiClass)) {
+      return false;
+    }
+    return this.getName().equals(((ApiClass) o).getName());
+  }
+  
   public String getRelativeSignature() {
     return classType.getQualifiedSourceName();
   }
 
   @Override
+  public int hashCode() {
+    return this.getName().hashCode();
+  }
+
+  @Override
   public String toString() {
     return classType.toString();
   }
diff --git a/tools/api-checker/src/com/google/gwt/tools/apichecker/ApiClassDiffGenerator.java b/tools/api-checker/src/com/google/gwt/tools/apichecker/ApiClassDiffGenerator.java
index 59a65df..80288a6 100644
--- a/tools/api-checker/src/com/google/gwt/tools/apichecker/ApiClassDiffGenerator.java
+++ b/tools/api-checker/src/com/google/gwt/tools/apichecker/ApiClassDiffGenerator.java
@@ -46,6 +46,7 @@
     return sb.toString();
   }
 
+  // TODO: variable never read, remove?
   private final ApiDiffGenerator apiDiffGenerator;
   private final String className;
   private HashMap<ApiField, Set<ApiChange>> intersectingFields = null;
@@ -97,6 +98,19 @@
   public int compareTo(ApiClassDiffGenerator other) {
     return getName().compareTo(other.getName());
   }
+  
+  @Override
+  public boolean equals(Object o) {
+    if (!(o instanceof ApiClassDiffGenerator)) {
+      return false;
+    }
+    return this.getName().equals(((ApiClassDiffGenerator) o).getName());
+  }
+
+  @Override
+  public int hashCode() {
+    return this.getName().hashCode();
+  }
 
   // TODO(amitmanjhi): handle methods with variable length arguments
   void computeApiDiff() {
@@ -268,9 +282,9 @@
       onlyInExisting.addAll(methodsInExisting);
       Map<ApiAbstractMethod, ApiChange> incompatibilityMap = getOverloadedMethodIncompatibility(
           methodsInNew, methodsInExisting);
-      for (ApiAbstractMethod existingMethod : incompatibilityMap.keySet()) {
-        addProperty(intersectingElements, existingMethod,
-            incompatibilityMap.get(existingMethod));
+      for (Map.Entry<ApiAbstractMethod, ApiChange> entry
+          : incompatibilityMap.entrySet()) {
+        addProperty(intersectingElements, entry.getKey(), entry.getValue());
       }
 
       /*
diff --git a/tools/api-checker/src/com/google/gwt/tools/apichecker/ApiCompatibilityChecker.java b/tools/api-checker/src/com/google/gwt/tools/apichecker/ApiCompatibilityChecker.java
index 6e5f129..655f6c1 100644
--- a/tools/api-checker/src/com/google/gwt/tools/apichecker/ApiCompatibilityChecker.java
+++ b/tools/api-checker/src/com/google/gwt/tools/apichecker/ApiCompatibilityChecker.java
@@ -458,7 +458,7 @@
         logger.setMaxDetail(checker.type);
         logger.log(TreeLogger.INFO, "gwtDevJar = " + checker.gwtDevJar
             + ", userJar = " + checker.gwtUserJar + ", refjars = "
-            + checker.refJars + ", logLevel = " + checker.type
+            + Arrays.toString(checker.refJars) + ", logLevel = " + checker.type
             + ", printAllApi = " + checker.printAllApi, null);
 
         Set<String> excludedPackages = checker.getSetOfExcludedPackages(checker.configProperties);
@@ -511,13 +511,15 @@
           System.exit(apiDifferences.size() == 0 ? 0 : 1);
         }
       }
-
-    } catch (Exception e) {
+    } catch (Throwable t) {
       // intercepting all exceptions in main, because I have to exit with -1 so
       // that the build breaks.
-      e.printStackTrace();
-      System.err.println("To view the help for this tool, execute this tool without any arguments");
-      System.exit(-1);
+      try {
+        t.printStackTrace();
+        System.err.println("To view the help for this tool, execute this tool without any arguments");
+      } finally {
+        System.exit(-1);
+      }
     }
   }
 
diff --git a/tools/api-checker/src/com/google/gwt/tools/apichecker/ApiContainer.java b/tools/api-checker/src/com/google/gwt/tools/apichecker/ApiContainer.java
index 40319b4..9c27d22 100644
--- a/tools/api-checker/src/com/google/gwt/tools/apichecker/ApiContainer.java
+++ b/tools/api-checker/src/com/google/gwt/tools/apichecker/ApiContainer.java
@@ -244,8 +244,6 @@
     }
   }
 
-
-
   private boolean isAnySubtypeAnApiClass(JClassType classType) {
     JClassType subTypes[] = classType.getSubtypes();
     for (JClassType tempType : subTypes) {
diff --git a/tools/api-checker/src/com/google/gwt/tools/apichecker/ApiDiffGenerator.java b/tools/api-checker/src/com/google/gwt/tools/apichecker/ApiDiffGenerator.java
index a8797ca..a47eb32 100644
--- a/tools/api-checker/src/com/google/gwt/tools/apichecker/ApiDiffGenerator.java
+++ b/tools/api-checker/src/com/google/gwt/tools/apichecker/ApiDiffGenerator.java
@@ -211,8 +211,8 @@
       }
     }
     Collection<ApiChange> prunedCollection = new HashSet<ApiChange>();
-    for (Integer hashCode : apiChangeMap.keySet()) {
-      prunedCollection.addAll(apiChangeMap.get(hashCode));
+    for (Collection<ApiChange> changes : apiChangeMap.values()) {
+      prunedCollection.addAll(changes);
     }
     return prunedCollection;
   }
diff --git a/tools/api-checker/src/com/google/gwt/tools/apichecker/ApiPackage.java b/tools/api-checker/src/com/google/gwt/tools/apichecker/ApiPackage.java
index 99309c5..32b1c79 100644
--- a/tools/api-checker/src/com/google/gwt/tools/apichecker/ApiPackage.java
+++ b/tools/api-checker/src/com/google/gwt/tools/apichecker/ApiPackage.java
@@ -51,12 +51,25 @@
   public int compareTo(ApiPackage other) {
     return this.getName().compareTo(other.getName());
   }
+  
+  @Override
+  public boolean equals(Object o) {
+    if (!(o instanceof ApiPackage)) {
+      return false;
+    }
+    return this.getName().equals(((ApiPackage) o).getName());
+  }
 
   public String getRelativeSignature() {
     return name;
   }
 
   @Override
+  public int hashCode() {
+    return this.getName().hashCode();
+  }
+
+  @Override
   public String toString() {
     return name;
   }
diff --git a/tools/api-checker/src/com/google/gwt/tools/apichecker/ApiPackageDiffGenerator.java b/tools/api-checker/src/com/google/gwt/tools/apichecker/ApiPackageDiffGenerator.java
index d8841a4..b69f915 100644
--- a/tools/api-checker/src/com/google/gwt/tools/apichecker/ApiPackageDiffGenerator.java
+++ b/tools/api-checker/src/com/google/gwt/tools/apichecker/ApiPackageDiffGenerator.java
@@ -55,6 +55,19 @@
   public int compareTo(ApiPackageDiffGenerator other) {
     return this.getName().compareTo(other.getName());
   }
+  
+  @Override
+  public boolean equals(Object o) {
+    if (!(o instanceof ApiPackageDiffGenerator)) {
+      return false;
+    }
+    return this.getName().equals(((ApiPackageDiffGenerator) o).getName());
+  }
+
+  @Override
+  public int hashCode() {
+    return this.getName().hashCode();
+  }
 
   void computeApiDiff() throws NotFoundException {
     Set<String> newClassNames = newPackage.getApiClassNames();
diff --git a/tools/api-checker/test/com/google/gwt/tools/apichecker/ApiCompatibilityUnitTest.java b/tools/api-checker/test/com/google/gwt/tools/apichecker/ApiCompatibilityUnitTest.java
index 073b3ae..c9166d7 100644
--- a/tools/api-checker/test/com/google/gwt/tools/apichecker/ApiCompatibilityUnitTest.java
+++ b/tools/api-checker/test/com/google/gwt/tools/apichecker/ApiCompatibilityUnitTest.java
@@ -266,9 +266,9 @@
     logger.setMaxDetail(TreeLogger.ERROR);
 
     Set<CompilationUnit> set1 = new HashSet<CompilationUnit>();
-    for (String type : existingTypesToSourcesMap.keySet()) {
-      set1.add(new StaticCompilationUnit(type,
-          existingTypesToSourcesMap.get(type)));
+    for (Map.Entry<String, String> entry
+        : existingTypesToSourcesMap.entrySet()) {
+      set1.add(new StaticCompilationUnit(entry.getKey(), entry.getValue()));
     }
     Set<String> emptyList = Collections.emptySet();
     Set<CompilationUnit> set2 = new HashSet<CompilationUnit>();
diff --git a/user/src/com/google/gwt/animation/client/Animation.java b/user/src/com/google/gwt/animation/client/Animation.java
index 11e53ed..40bae9a 100644
--- a/user/src/com/google/gwt/animation/client/Animation.java
+++ b/user/src/com/google/gwt/animation/client/Animation.java
@@ -136,6 +136,10 @@
     }
 
     // Add to the list of animations
+
+    // We use a static list of animations and a single timer, and create them
+    // only if we are the only active animation.  This is safe since JS is
+    // single-threaded.
     if (animations == null) {
       animations = new ArrayList<Animation>();
       animationTimer = new Timer() {
diff --git a/user/src/com/google/gwt/benchmarks/BenchmarkReport.java b/user/src/com/google/gwt/benchmarks/BenchmarkReport.java
index 8a4bfdb..7b410c5 100644
--- a/user/src/com/google/gwt/benchmarks/BenchmarkReport.java
+++ b/user/src/com/google/gwt/benchmarks/BenchmarkReport.java
@@ -142,7 +142,7 @@
   /**
    * Parses .java source files to get source code for methods.
    */
-  private class Parser {
+  private static class Parser {
 
     /**
      * Maps classes to the contents of their source files.
@@ -171,7 +171,8 @@
         if (sourceContents == null) {
           classSources.put(clazz, null);
           String msg = "An unknown I/O exception occured while trying to read "
-              + sourceFile.getAbsolutePath();
+              + (sourceFile == null ? "class " + clazz + " (not found)" :
+                sourceFile.getAbsolutePath());
           logger.log(TreeLogger.WARN, msg, null);
         } else {
           classSources.put(clazz, new String(sourceContents));
diff --git a/user/src/com/google/gwt/benchmarks/client/IntRange.java b/user/src/com/google/gwt/benchmarks/client/IntRange.java
index b3292a5..5b56cf5 100644
--- a/user/src/com/google/gwt/benchmarks/client/IntRange.java
+++ b/user/src/com/google/gwt/benchmarks/client/IntRange.java
@@ -32,14 +32,12 @@
 
     Operator operator;
 
-    int start;
-
     int step;
 
     int value;
 
     IntRangeIterator(IntRange r) {
-      this.value = this.start = r.start;
+      this.value = r.start;
       this.end = r.end;
       this.operator = r.operator;
       if (operator == null) {
diff --git a/user/src/com/google/gwt/core/client/JsArrayNumber.java b/user/src/com/google/gwt/core/client/JsArrayNumber.java
index 406fc6b..6921d6f 100644
--- a/user/src/com/google/gwt/core/client/JsArrayNumber.java
+++ b/user/src/com/google/gwt/core/client/JsArrayNumber.java
@@ -58,7 +58,6 @@
     return this.length;
   }-*/;
 
-
   /**
    * Pushes the given number onto the end of the array.
    */
diff --git a/user/src/com/google/gwt/dom/client/DOMImplIE6.java b/user/src/com/google/gwt/dom/client/DOMImplIE6.java
index ca5bd87..c309ab8 100644
--- a/user/src/com/google/gwt/dom/client/DOMImplIE6.java
+++ b/user/src/com/google/gwt/dom/client/DOMImplIE6.java
@@ -83,11 +83,11 @@
    * 
    * @return the zoom multiple
    */
-  @SuppressWarnings("unused")
   private double getZoomMultiple(Document doc) {
     if (doc.getCompatMode().equals("CSS1Compat")) {
       return 1;
     } else {
+      // TODO(FINDBUGS): is integer division correct?
       return doc.getBody().getParentElement().getOffsetWidth() /
         doc.getBody().getOffsetWidth();
     }
diff --git a/user/src/com/google/gwt/dom/client/DOMImplMozilla.java b/user/src/com/google/gwt/dom/client/DOMImplMozilla.java
index 6a04fed..fd2cb70 100644
--- a/user/src/com/google/gwt/dom/client/DOMImplMozilla.java
+++ b/user/src/com/google/gwt/dom/client/DOMImplMozilla.java
@@ -15,7 +15,6 @@
  */
 package com.google.gwt.dom.client;
 
-
 /**
  * Mozilla implementation of StandardBrowser.
  */
diff --git a/user/src/com/google/gwt/dom/client/Element.java b/user/src/com/google/gwt/dom/client/Element.java
index e41f0ef..c26bbf3 100644
--- a/user/src/com/google/gwt/dom/client/Element.java
+++ b/user/src/com/google/gwt/dom/client/Element.java
@@ -65,7 +65,7 @@
    * Adds a name to this element's class property. If the name is already
    * present, this method has no effect.
    * 
-   * @param the class name to be added
+   * @param className the class name to be added
    * @see #setClassName(String)
    */
   public final void addClassName(String className) {
@@ -468,7 +468,7 @@
    * Removes a name from this element's class property. If the name is not
    * present, this method has no effect.
    * 
-   * @param the class name to be added
+   * @param className the class name to be added
    * @see #setClassName(String)
    */
   public final void removeClassName(String className) {
diff --git a/user/src/com/google/gwt/dom/client/Node.java b/user/src/com/google/gwt/dom/client/Node.java
index aad5a1e..7be849f 100644
--- a/user/src/com/google/gwt/dom/client/Node.java
+++ b/user/src/com/google/gwt/dom/client/Node.java
@@ -46,7 +46,7 @@
    */
   public static Node as(JavaScriptObject o) {
     assert is(o);
-    return (Node)o;
+    return (Node) o;
   }
 
   /**
diff --git a/user/src/com/google/gwt/event/shared/HasHandlers.java b/user/src/com/google/gwt/event/shared/HasHandlers.java
index a87cf94..244f5a6 100644
--- a/user/src/com/google/gwt/event/shared/HasHandlers.java
+++ b/user/src/com/google/gwt/event/shared/HasHandlers.java
@@ -15,7 +15,6 @@
  */

 package com.google.gwt.event.shared;

 

-

 /**

  * An object that implements this interface has a collection of event handlers

  * associated with it.

diff --git a/user/src/com/google/gwt/http/client/RequestCallback.java b/user/src/com/google/gwt/http/client/RequestCallback.java
index 7a01893..bb14f77 100644
--- a/user/src/com/google/gwt/http/client/RequestCallback.java
+++ b/user/src/com/google/gwt/http/client/RequestCallback.java
@@ -43,7 +43,8 @@
    * normally.  A {@link com.google.gwt.http.client.RequestTimeoutException RequestTimeoutException} is
    * one example of the type of error that a request may encounter.
    * 
-   * @param request the request object which has experienced the error condition
+   * @param request the request object which has experienced the error
+   *     condition, may be null if the request was never generated
    * @param exception the error that was encountered
    */
   void onError(Request request, Throwable exception);
diff --git a/user/src/com/google/gwt/i18n/client/DateTimeFormat.java b/user/src/com/google/gwt/i18n/client/DateTimeFormat.java
index 038610c..571533b 100644
--- a/user/src/com/google/gwt/i18n/client/DateTimeFormat.java
+++ b/user/src/com/google/gwt/i18n/client/DateTimeFormat.java
@@ -366,7 +366,7 @@
   /**
    * Class PatternPart holds a "compiled" pattern part.
    */
-  private class PatternPart {
+  private static class PatternPart {
     public String text;
     public int count; // 0 has a special meaning, it stands for literal
     public boolean abutStart;
diff --git a/user/src/com/google/gwt/i18n/client/impl/plurals/DefaultRule_af.java b/user/src/com/google/gwt/i18n/client/impl/plurals/DefaultRule_af.java
index f56d993..6be0950 100644
--- a/user/src/com/google/gwt/i18n/client/impl/plurals/DefaultRule_af.java
+++ b/user/src/com/google/gwt/i18n/client/impl/plurals/DefaultRule_af.java
@@ -16,7 +16,6 @@
 
 package com.google.gwt.i18n.client.impl.plurals;
 
-
 /**
  * Plural forms for Afrikaans are 1 and n, with 0 treated as plural.
  */
diff --git a/user/src/com/google/gwt/i18n/client/impl/plurals/DefaultRule_am.java b/user/src/com/google/gwt/i18n/client/impl/plurals/DefaultRule_am.java
index dfa68fc..69e185e 100644
--- a/user/src/com/google/gwt/i18n/client/impl/plurals/DefaultRule_am.java
+++ b/user/src/com/google/gwt/i18n/client/impl/plurals/DefaultRule_am.java
@@ -16,7 +16,6 @@
 
 package com.google.gwt.i18n.client.impl.plurals;
 
-
 /**
  * Plural forms for Amharic are 1 and n, with 0 treated as singular.
  */
diff --git a/user/src/com/google/gwt/i18n/client/impl/plurals/DefaultRule_az.java b/user/src/com/google/gwt/i18n/client/impl/plurals/DefaultRule_az.java
index 9c93def..2defbe4 100644
--- a/user/src/com/google/gwt/i18n/client/impl/plurals/DefaultRule_az.java
+++ b/user/src/com/google/gwt/i18n/client/impl/plurals/DefaultRule_az.java
@@ -16,7 +16,6 @@
 
 package com.google.gwt.i18n.client.impl.plurals;
 
-
 /**
  * Plural forms for Azerbaijani are 1 and n, with 0 treated as plural.
  */
diff --git a/user/src/com/google/gwt/i18n/client/impl/plurals/DefaultRule_be.java b/user/src/com/google/gwt/i18n/client/impl/plurals/DefaultRule_be.java
index c4a979e..df167c8 100644
--- a/user/src/com/google/gwt/i18n/client/impl/plurals/DefaultRule_be.java
+++ b/user/src/com/google/gwt/i18n/client/impl/plurals/DefaultRule_be.java
@@ -16,7 +16,6 @@
 
 package com.google.gwt.i18n.client.impl.plurals;
 
-
 /**
  * Plural forms for Belarusian are x1 (but not x11), x2-x4 (but not x12-x14), and n.
  */
diff --git a/user/src/com/google/gwt/i18n/client/impl/plurals/DefaultRule_bg.java b/user/src/com/google/gwt/i18n/client/impl/plurals/DefaultRule_bg.java
index 855e374..c1c52ff 100644
--- a/user/src/com/google/gwt/i18n/client/impl/plurals/DefaultRule_bg.java
+++ b/user/src/com/google/gwt/i18n/client/impl/plurals/DefaultRule_bg.java
@@ -16,7 +16,6 @@
 
 package com.google.gwt.i18n.client.impl.plurals;
 
-
 /**
  * Plural forms for Bulgarian are 1 and n, with 0 treated as plural.
  */
diff --git a/user/src/com/google/gwt/i18n/client/impl/plurals/DefaultRule_bh.java b/user/src/com/google/gwt/i18n/client/impl/plurals/DefaultRule_bh.java
index 8403233..57721e8 100644
--- a/user/src/com/google/gwt/i18n/client/impl/plurals/DefaultRule_bh.java
+++ b/user/src/com/google/gwt/i18n/client/impl/plurals/DefaultRule_bh.java
@@ -16,7 +16,6 @@
 
 package com.google.gwt.i18n.client.impl.plurals;
 
-
 /**
  * Plural forms for Bhojpuri are 1 and n, with 0 treated as singular.
  * 
diff --git a/user/src/com/google/gwt/i18n/client/impl/plurals/DefaultRule_bn.java b/user/src/com/google/gwt/i18n/client/impl/plurals/DefaultRule_bn.java
index 2fdc005..59f4520 100644
--- a/user/src/com/google/gwt/i18n/client/impl/plurals/DefaultRule_bn.java
+++ b/user/src/com/google/gwt/i18n/client/impl/plurals/DefaultRule_bn.java
@@ -16,7 +16,6 @@
 
 package com.google.gwt.i18n.client.impl.plurals;
 
-
 /**
  * Plural forms for Bengali are 1 and n, with 0 treated as plural.
  */
diff --git a/user/src/com/google/gwt/i18n/client/impl/plurals/DefaultRule_bs.java b/user/src/com/google/gwt/i18n/client/impl/plurals/DefaultRule_bs.java
index 555a05e..0c7e5e6 100644
--- a/user/src/com/google/gwt/i18n/client/impl/plurals/DefaultRule_bs.java
+++ b/user/src/com/google/gwt/i18n/client/impl/plurals/DefaultRule_bs.java
@@ -16,7 +16,6 @@
 
 package com.google.gwt.i18n.client.impl.plurals;
 
-
 /**
  * Plural forms for Bosnian are x1 (but not x11), x2-x4 (but not x12-x14), and n.
  */
diff --git a/user/src/com/google/gwt/i18n/client/impl/plurals/DefaultRule_ca.java b/user/src/com/google/gwt/i18n/client/impl/plurals/DefaultRule_ca.java
index d55a168..9c08d33 100644
--- a/user/src/com/google/gwt/i18n/client/impl/plurals/DefaultRule_ca.java
+++ b/user/src/com/google/gwt/i18n/client/impl/plurals/DefaultRule_ca.java
@@ -16,7 +16,6 @@
 
 package com.google.gwt.i18n.client.impl.plurals;
 
-
 /**
  * Plural forms for Catalan are 1 and n, with 0 treated as plural.
  */
diff --git a/user/src/com/google/gwt/i18n/client/impl/plurals/DefaultRule_cs.java b/user/src/com/google/gwt/i18n/client/impl/plurals/DefaultRule_cs.java
index 5aa5cae..1ff8255 100644
--- a/user/src/com/google/gwt/i18n/client/impl/plurals/DefaultRule_cs.java
+++ b/user/src/com/google/gwt/i18n/client/impl/plurals/DefaultRule_cs.java
@@ -16,7 +16,6 @@
 
 package com.google.gwt.i18n.client.impl.plurals;
 
-
 /**
  * Plural forms for Czech are 1, 2-4, and n.
  */
diff --git a/user/src/com/google/gwt/i18n/client/impl/plurals/DefaultRule_da.java b/user/src/com/google/gwt/i18n/client/impl/plurals/DefaultRule_da.java
index e63695d..f8acb55 100644
--- a/user/src/com/google/gwt/i18n/client/impl/plurals/DefaultRule_da.java
+++ b/user/src/com/google/gwt/i18n/client/impl/plurals/DefaultRule_da.java
@@ -16,7 +16,6 @@
 
 package com.google.gwt.i18n.client.impl.plurals;
 
-
 /**
  * Plural forms for Danish are 1 and n, with 0 treated as plural.
  */
diff --git a/user/src/com/google/gwt/i18n/client/impl/plurals/DefaultRule_de.java b/user/src/com/google/gwt/i18n/client/impl/plurals/DefaultRule_de.java
index 319421f..d7d26b6 100644
--- a/user/src/com/google/gwt/i18n/client/impl/plurals/DefaultRule_de.java
+++ b/user/src/com/google/gwt/i18n/client/impl/plurals/DefaultRule_de.java
@@ -16,7 +16,6 @@
 
 package com.google.gwt.i18n.client.impl.plurals;
 
-
 /**
  * Plural forms for German are 1 and n, with 0 treated as plural.
  */
diff --git a/user/src/com/google/gwt/i18n/client/impl/plurals/DefaultRule_el.java b/user/src/com/google/gwt/i18n/client/impl/plurals/DefaultRule_el.java
index 83def21..af88acd 100644
--- a/user/src/com/google/gwt/i18n/client/impl/plurals/DefaultRule_el.java
+++ b/user/src/com/google/gwt/i18n/client/impl/plurals/DefaultRule_el.java
@@ -16,7 +16,6 @@
 
 package com.google.gwt.i18n.client.impl.plurals;
 
-
 /**
  * Plural forms for Modern Greek are 1 and n, with 0 treated as plural.
  */
diff --git a/user/src/com/google/gwt/i18n/client/impl/plurals/DefaultRule_en.java b/user/src/com/google/gwt/i18n/client/impl/plurals/DefaultRule_en.java
index e904bdc..cb298ed 100644
--- a/user/src/com/google/gwt/i18n/client/impl/plurals/DefaultRule_en.java
+++ b/user/src/com/google/gwt/i18n/client/impl/plurals/DefaultRule_en.java
@@ -16,7 +16,6 @@
 
 package com.google.gwt.i18n.client.impl.plurals;
 
-
 /**
  * Plural forms for English are 1 and n, with 0 treated as plural.
  */
diff --git a/user/src/com/google/gwt/i18n/client/impl/plurals/DefaultRule_eo.java b/user/src/com/google/gwt/i18n/client/impl/plurals/DefaultRule_eo.java
index c4e6eee..7053cc1 100644
--- a/user/src/com/google/gwt/i18n/client/impl/plurals/DefaultRule_eo.java
+++ b/user/src/com/google/gwt/i18n/client/impl/plurals/DefaultRule_eo.java
@@ -16,7 +16,6 @@
 
 package com.google.gwt.i18n.client.impl.plurals;
 
-
 /**
  * Plural forms for Esperanto are 1 and n, with 0 treated as plural.
  */
diff --git a/user/src/com/google/gwt/i18n/client/impl/plurals/DefaultRule_es.java b/user/src/com/google/gwt/i18n/client/impl/plurals/DefaultRule_es.java
index c20f835..147bd29 100644
--- a/user/src/com/google/gwt/i18n/client/impl/plurals/DefaultRule_es.java
+++ b/user/src/com/google/gwt/i18n/client/impl/plurals/DefaultRule_es.java
@@ -16,7 +16,6 @@
 
 package com.google.gwt.i18n.client.impl.plurals;
 
-
 /**
  * Plural forms for Spanish are 1 and n, with 0 treated as plural.
  */
diff --git a/user/src/com/google/gwt/i18n/client/impl/plurals/DefaultRule_et.java b/user/src/com/google/gwt/i18n/client/impl/plurals/DefaultRule_et.java
index a2d9a58..6ee90fb 100644
--- a/user/src/com/google/gwt/i18n/client/impl/plurals/DefaultRule_et.java
+++ b/user/src/com/google/gwt/i18n/client/impl/plurals/DefaultRule_et.java
@@ -16,7 +16,6 @@
 
 package com.google.gwt.i18n.client.impl.plurals;
 
-
 /**
  * Plural forms for Estonian are 1 and n, with 0 treated as plural.
  */
diff --git a/user/src/com/google/gwt/i18n/client/impl/plurals/DefaultRule_eu.java b/user/src/com/google/gwt/i18n/client/impl/plurals/DefaultRule_eu.java
index 90fb707..bcfd12a 100644
--- a/user/src/com/google/gwt/i18n/client/impl/plurals/DefaultRule_eu.java
+++ b/user/src/com/google/gwt/i18n/client/impl/plurals/DefaultRule_eu.java
@@ -16,7 +16,6 @@
 
 package com.google.gwt.i18n.client.impl.plurals;
 
-
 /**
  * Plural forms for Basque are 1 and n, with 0 treated as plural.
  */
diff --git a/user/src/com/google/gwt/i18n/client/impl/plurals/DefaultRule_fa.java b/user/src/com/google/gwt/i18n/client/impl/plurals/DefaultRule_fa.java
index 3442b52..05b2798 100644
--- a/user/src/com/google/gwt/i18n/client/impl/plurals/DefaultRule_fa.java
+++ b/user/src/com/google/gwt/i18n/client/impl/plurals/DefaultRule_fa.java
@@ -16,7 +16,6 @@
 
 package com.google.gwt.i18n.client.impl.plurals;
 
-
 /**
  * Plural forms for Farsi (Persian) are 1 and n, with 0 treated as plural.
  * 
diff --git a/user/src/com/google/gwt/i18n/client/impl/plurals/DefaultRule_fi.java b/user/src/com/google/gwt/i18n/client/impl/plurals/DefaultRule_fi.java
index f5b5677..79695fa 100644
--- a/user/src/com/google/gwt/i18n/client/impl/plurals/DefaultRule_fi.java
+++ b/user/src/com/google/gwt/i18n/client/impl/plurals/DefaultRule_fi.java
@@ -16,7 +16,6 @@
 
 package com.google.gwt.i18n.client.impl.plurals;
 
-
 /**
  * Plural forms for Finnish are 1 and n, with 0 treated as plural.
  */
diff --git a/user/src/com/google/gwt/i18n/client/impl/plurals/DefaultRule_fil.java b/user/src/com/google/gwt/i18n/client/impl/plurals/DefaultRule_fil.java
index c446f13..f8ffcdb 100644
--- a/user/src/com/google/gwt/i18n/client/impl/plurals/DefaultRule_fil.java
+++ b/user/src/com/google/gwt/i18n/client/impl/plurals/DefaultRule_fil.java
@@ -16,7 +16,6 @@
 
 package com.google.gwt.i18n.client.impl.plurals;
 
-
 /**
  * Plural forms for Filipino are 1 and n, with 0 treated as singular.
  */
diff --git a/user/src/com/google/gwt/i18n/client/impl/plurals/DefaultRule_fo.java b/user/src/com/google/gwt/i18n/client/impl/plurals/DefaultRule_fo.java
index 8f2e583..f25c76e 100644
--- a/user/src/com/google/gwt/i18n/client/impl/plurals/DefaultRule_fo.java
+++ b/user/src/com/google/gwt/i18n/client/impl/plurals/DefaultRule_fo.java
@@ -16,7 +16,6 @@
 
 package com.google.gwt.i18n.client.impl.plurals;
 
-
 /**
  * Plural forms for Faroese are 1 and n, with 0 treated as plural.
  */
diff --git a/user/src/com/google/gwt/i18n/client/impl/plurals/DefaultRule_fr.java b/user/src/com/google/gwt/i18n/client/impl/plurals/DefaultRule_fr.java
index 363023d..3a4065a 100644
--- a/user/src/com/google/gwt/i18n/client/impl/plurals/DefaultRule_fr.java
+++ b/user/src/com/google/gwt/i18n/client/impl/plurals/DefaultRule_fr.java
@@ -16,7 +16,6 @@
 
 package com.google.gwt.i18n.client.impl.plurals;
 
-
 /**
  * Plural forms for French are 1 and n, with 0 treated as singular.
  */
diff --git a/user/src/com/google/gwt/i18n/client/impl/plurals/DefaultRule_fur.java b/user/src/com/google/gwt/i18n/client/impl/plurals/DefaultRule_fur.java
index e0a47be..99964f1 100644
--- a/user/src/com/google/gwt/i18n/client/impl/plurals/DefaultRule_fur.java
+++ b/user/src/com/google/gwt/i18n/client/impl/plurals/DefaultRule_fur.java
@@ -16,7 +16,6 @@
 
 package com.google.gwt.i18n.client.impl.plurals;
 
-
 /**
  * Plural forms for Friulian are 1 and n, with 0 treated as plural.
  */
diff --git a/user/src/com/google/gwt/i18n/client/impl/plurals/DefaultRule_fy.java b/user/src/com/google/gwt/i18n/client/impl/plurals/DefaultRule_fy.java
index c7bed9f..649ba83 100644
--- a/user/src/com/google/gwt/i18n/client/impl/plurals/DefaultRule_fy.java
+++ b/user/src/com/google/gwt/i18n/client/impl/plurals/DefaultRule_fy.java
@@ -16,7 +16,6 @@
 
 package com.google.gwt.i18n.client.impl.plurals;
 
-
 /**
  * Plural forms for Frisian are 1 and n, with 0 treated as plural.
  */
diff --git a/user/src/com/google/gwt/i18n/client/impl/plurals/DefaultRule_ga.java b/user/src/com/google/gwt/i18n/client/impl/plurals/DefaultRule_ga.java
index cb1ac40..5b666ec 100644
--- a/user/src/com/google/gwt/i18n/client/impl/plurals/DefaultRule_ga.java
+++ b/user/src/com/google/gwt/i18n/client/impl/plurals/DefaultRule_ga.java
@@ -16,7 +16,6 @@
 
 package com.google.gwt.i18n.client.impl.plurals;
 
-
 /**
  * Plural forms for Irish are 1, 2, and n.
  */
diff --git a/user/src/com/google/gwt/i18n/client/impl/plurals/DefaultRule_gl.java b/user/src/com/google/gwt/i18n/client/impl/plurals/DefaultRule_gl.java
index 7731971..a4db5c6 100644
--- a/user/src/com/google/gwt/i18n/client/impl/plurals/DefaultRule_gl.java
+++ b/user/src/com/google/gwt/i18n/client/impl/plurals/DefaultRule_gl.java
@@ -16,7 +16,6 @@
 
 package com.google.gwt.i18n.client.impl.plurals;
 
-
 /**
  * Plural forms for Galician are 1 and n, with 0 treated as plural.
  */
diff --git a/user/src/com/google/gwt/i18n/client/impl/plurals/DefaultRule_gu.java b/user/src/com/google/gwt/i18n/client/impl/plurals/DefaultRule_gu.java
index a625bf3..a3ce864 100644
--- a/user/src/com/google/gwt/i18n/client/impl/plurals/DefaultRule_gu.java
+++ b/user/src/com/google/gwt/i18n/client/impl/plurals/DefaultRule_gu.java
@@ -16,7 +16,6 @@
 
 package com.google.gwt.i18n.client.impl.plurals;
 
-
 /**
  * Plural forms for Gujarati are 1 and n, with 0 treated as plural.
  */
diff --git a/user/src/com/google/gwt/i18n/client/impl/plurals/DefaultRule_guw.java b/user/src/com/google/gwt/i18n/client/impl/plurals/DefaultRule_guw.java
index 8ddec73..b227114 100644
--- a/user/src/com/google/gwt/i18n/client/impl/plurals/DefaultRule_guw.java
+++ b/user/src/com/google/gwt/i18n/client/impl/plurals/DefaultRule_guw.java
@@ -16,7 +16,6 @@
 
 package com.google.gwt.i18n.client.impl.plurals;
 
-
 /**
  * Plural forms for Gun are 1 and n, with 0 treated as singular.
  */
diff --git a/user/src/com/google/gwt/i18n/client/impl/plurals/DefaultRule_ha.java b/user/src/com/google/gwt/i18n/client/impl/plurals/DefaultRule_ha.java
index e1ac911..28da1a3 100644
--- a/user/src/com/google/gwt/i18n/client/impl/plurals/DefaultRule_ha.java
+++ b/user/src/com/google/gwt/i18n/client/impl/plurals/DefaultRule_ha.java
@@ -16,7 +16,6 @@
 
 package com.google.gwt.i18n.client.impl.plurals;
 
-
 /**
  * Plural forms for Hausa are 1 and n, with 0 treated as plural.
  */
diff --git a/user/src/com/google/gwt/i18n/client/impl/plurals/DefaultRule_he.java b/user/src/com/google/gwt/i18n/client/impl/plurals/DefaultRule_he.java
index eba8762..b0b02ab 100644
--- a/user/src/com/google/gwt/i18n/client/impl/plurals/DefaultRule_he.java
+++ b/user/src/com/google/gwt/i18n/client/impl/plurals/DefaultRule_he.java
@@ -16,7 +16,6 @@
 
 package com.google.gwt.i18n.client.impl.plurals;
 
-
 /**
  * Plural forms for Hebrew are 1 and n, with 0 treated as plural.
  */
diff --git a/user/src/com/google/gwt/i18n/client/impl/plurals/DefaultRule_hi.java b/user/src/com/google/gwt/i18n/client/impl/plurals/DefaultRule_hi.java
index aa2ac8b..265c8b7 100644
--- a/user/src/com/google/gwt/i18n/client/impl/plurals/DefaultRule_hi.java
+++ b/user/src/com/google/gwt/i18n/client/impl/plurals/DefaultRule_hi.java
@@ -16,7 +16,6 @@
 
 package com.google.gwt.i18n.client.impl.plurals;
 
-
 /**
  * Plural forms for Hindi are 1 and n, with 0 treated as singular.
  */
diff --git a/user/src/com/google/gwt/i18n/client/impl/plurals/DefaultRule_hr.java b/user/src/com/google/gwt/i18n/client/impl/plurals/DefaultRule_hr.java
index 5f1176a..0e594d4 100644
--- a/user/src/com/google/gwt/i18n/client/impl/plurals/DefaultRule_hr.java
+++ b/user/src/com/google/gwt/i18n/client/impl/plurals/DefaultRule_hr.java
@@ -16,7 +16,6 @@
 
 package com.google.gwt.i18n.client.impl.plurals;
 
-
 /**
  * Plural forms for Croatian are x1 (but not x11), x2-x4 (but not x12-x14),
  * and n.
diff --git a/user/src/com/google/gwt/i18n/client/impl/plurals/DefaultRule_hu.java b/user/src/com/google/gwt/i18n/client/impl/plurals/DefaultRule_hu.java
index 01dad42..050ce3e 100644
--- a/user/src/com/google/gwt/i18n/client/impl/plurals/DefaultRule_hu.java
+++ b/user/src/com/google/gwt/i18n/client/impl/plurals/DefaultRule_hu.java
@@ -16,7 +16,6 @@
 
 package com.google.gwt.i18n.client.impl.plurals;
 
-
 /**
  * Plural forms for Hungarian are 1 and n, with 0 treated as plural.
  * 
diff --git a/user/src/com/google/gwt/i18n/client/impl/plurals/DefaultRule_is.java b/user/src/com/google/gwt/i18n/client/impl/plurals/DefaultRule_is.java
index d094e30..bdbfddb 100644
--- a/user/src/com/google/gwt/i18n/client/impl/plurals/DefaultRule_is.java
+++ b/user/src/com/google/gwt/i18n/client/impl/plurals/DefaultRule_is.java
@@ -16,7 +16,6 @@
 
 package com.google.gwt.i18n.client.impl.plurals;
 
-
 /**
  * Plural forms for Icelandic are 1 and n, with 0 treated as plural.
  */
diff --git a/user/src/com/google/gwt/i18n/client/impl/plurals/DefaultRule_it.java b/user/src/com/google/gwt/i18n/client/impl/plurals/DefaultRule_it.java
index 065daa0..7349ba3 100644
--- a/user/src/com/google/gwt/i18n/client/impl/plurals/DefaultRule_it.java
+++ b/user/src/com/google/gwt/i18n/client/impl/plurals/DefaultRule_it.java
@@ -16,7 +16,6 @@
 
 package com.google.gwt.i18n.client.impl.plurals;
 
-
 /**
  * Plural forms for Italian are 1 and n, with 0 treated as plural.
  */
diff --git a/user/src/com/google/gwt/i18n/client/impl/plurals/DefaultRule_ku.java b/user/src/com/google/gwt/i18n/client/impl/plurals/DefaultRule_ku.java
index 7aaa467..7c945af 100644
--- a/user/src/com/google/gwt/i18n/client/impl/plurals/DefaultRule_ku.java
+++ b/user/src/com/google/gwt/i18n/client/impl/plurals/DefaultRule_ku.java
@@ -16,7 +16,6 @@
 
 package com.google.gwt.i18n.client.impl.plurals;
 
-
 /**
  * Plural forms for Kurdish are 1 and n, with 0 treated as plural.
  */
diff --git a/user/src/com/google/gwt/i18n/client/impl/plurals/DefaultRule_lb.java b/user/src/com/google/gwt/i18n/client/impl/plurals/DefaultRule_lb.java
index 9a289af..82807f2 100644
--- a/user/src/com/google/gwt/i18n/client/impl/plurals/DefaultRule_lb.java
+++ b/user/src/com/google/gwt/i18n/client/impl/plurals/DefaultRule_lb.java
@@ -16,7 +16,6 @@
 
 package com.google.gwt.i18n.client.impl.plurals;
 
-
 /**
  * Plural forms for Letzeburgesch are 1 and n, with 0 treated as plural.
  */
diff --git a/user/src/com/google/gwt/i18n/client/impl/plurals/DefaultRule_ln.java b/user/src/com/google/gwt/i18n/client/impl/plurals/DefaultRule_ln.java
index 25a5fc8..dd8d84c 100644
--- a/user/src/com/google/gwt/i18n/client/impl/plurals/DefaultRule_ln.java
+++ b/user/src/com/google/gwt/i18n/client/impl/plurals/DefaultRule_ln.java
@@ -16,7 +16,6 @@
 
 package com.google.gwt.i18n.client.impl.plurals;
 
-
 /**
  * Plural forms for Lingala are 1 and n, with 0 treated as singular.
  */
diff --git a/user/src/com/google/gwt/i18n/client/impl/plurals/DefaultRule_mg.java b/user/src/com/google/gwt/i18n/client/impl/plurals/DefaultRule_mg.java
index be0aac9..22d4440 100644
--- a/user/src/com/google/gwt/i18n/client/impl/plurals/DefaultRule_mg.java
+++ b/user/src/com/google/gwt/i18n/client/impl/plurals/DefaultRule_mg.java
@@ -16,7 +16,6 @@
 
 package com.google.gwt.i18n.client.impl.plurals;
 
-
 /**
  * Plural forms for Malgasy are 1 and n, with 0 treated as singular.
  */
diff --git a/user/src/com/google/gwt/i18n/client/impl/plurals/DefaultRule_ml.java b/user/src/com/google/gwt/i18n/client/impl/plurals/DefaultRule_ml.java
index 93a7fa5..d69b7ea 100644
--- a/user/src/com/google/gwt/i18n/client/impl/plurals/DefaultRule_ml.java
+++ b/user/src/com/google/gwt/i18n/client/impl/plurals/DefaultRule_ml.java
@@ -16,7 +16,6 @@
 
 package com.google.gwt.i18n.client.impl.plurals;
 
-
 /**
  * Plural forms for Malayalam are 1 and n, with 0 treated as plural.
  */
diff --git a/user/src/com/google/gwt/i18n/client/impl/plurals/DefaultRule_mn.java b/user/src/com/google/gwt/i18n/client/impl/plurals/DefaultRule_mn.java
index 5c04849..d06c76f 100644
--- a/user/src/com/google/gwt/i18n/client/impl/plurals/DefaultRule_mn.java
+++ b/user/src/com/google/gwt/i18n/client/impl/plurals/DefaultRule_mn.java
@@ -16,7 +16,6 @@
 
 package com.google.gwt.i18n.client.impl.plurals;
 
-
 /**
  * Plural forms for Mongolian are 1 and n, with 0 treated as plural.
  * 
diff --git a/user/src/com/google/gwt/i18n/client/impl/plurals/DefaultRule_mr.java b/user/src/com/google/gwt/i18n/client/impl/plurals/DefaultRule_mr.java
index bc4c453..edf7028 100644
--- a/user/src/com/google/gwt/i18n/client/impl/plurals/DefaultRule_mr.java
+++ b/user/src/com/google/gwt/i18n/client/impl/plurals/DefaultRule_mr.java
@@ -16,7 +16,6 @@
 
 package com.google.gwt.i18n.client.impl.plurals;
 
-
 /**
  * Plural forms for Marathi are 1 and n, with 0 treated as plural.
  */
diff --git a/user/src/com/google/gwt/i18n/client/impl/plurals/DefaultRule_nah.java b/user/src/com/google/gwt/i18n/client/impl/plurals/DefaultRule_nah.java
index f918e78..623ae85 100644
--- a/user/src/com/google/gwt/i18n/client/impl/plurals/DefaultRule_nah.java
+++ b/user/src/com/google/gwt/i18n/client/impl/plurals/DefaultRule_nah.java
@@ -16,7 +16,6 @@
 
 package com.google.gwt.i18n.client.impl.plurals;
 
-
 /**
  * Plural forms for Nahuati are 1 and n, with 0 treated as plural.
  */
diff --git a/user/src/com/google/gwt/i18n/client/impl/plurals/DefaultRule_nb.java b/user/src/com/google/gwt/i18n/client/impl/plurals/DefaultRule_nb.java
index faf554b..416fe73 100644
--- a/user/src/com/google/gwt/i18n/client/impl/plurals/DefaultRule_nb.java
+++ b/user/src/com/google/gwt/i18n/client/impl/plurals/DefaultRule_nb.java
@@ -16,7 +16,6 @@
 
 package com.google.gwt.i18n.client.impl.plurals;
 
-
 /**
  * Plural forms for Norwegian Bokmål are 1 and n, with 0 treated as plural.
  */
diff --git a/user/src/com/google/gwt/i18n/client/impl/plurals/DefaultRule_ne.java b/user/src/com/google/gwt/i18n/client/impl/plurals/DefaultRule_ne.java
index 5325f4e..161a8ca 100644
--- a/user/src/com/google/gwt/i18n/client/impl/plurals/DefaultRule_ne.java
+++ b/user/src/com/google/gwt/i18n/client/impl/plurals/DefaultRule_ne.java
@@ -16,7 +16,6 @@
 
 package com.google.gwt.i18n.client.impl.plurals;
 
-
 /**
  * Plural forms for Nepali are 1 and n, with 0 treated as plural.
  */
diff --git a/user/src/com/google/gwt/i18n/client/impl/plurals/DefaultRule_nl.java b/user/src/com/google/gwt/i18n/client/impl/plurals/DefaultRule_nl.java
index a519988..96fd934 100644
--- a/user/src/com/google/gwt/i18n/client/impl/plurals/DefaultRule_nl.java
+++ b/user/src/com/google/gwt/i18n/client/impl/plurals/DefaultRule_nl.java
@@ -16,7 +16,6 @@
 
 package com.google.gwt.i18n.client.impl.plurals;
 
-
 /**
  * Plural forms for Dutch are 1 and n, with 0 treated as plural.
  */
diff --git a/user/src/com/google/gwt/i18n/client/impl/plurals/DefaultRule_nn.java b/user/src/com/google/gwt/i18n/client/impl/plurals/DefaultRule_nn.java
index 7a3b64b..1375020 100644
--- a/user/src/com/google/gwt/i18n/client/impl/plurals/DefaultRule_nn.java
+++ b/user/src/com/google/gwt/i18n/client/impl/plurals/DefaultRule_nn.java
@@ -16,7 +16,6 @@
 
 package com.google.gwt.i18n.client.impl.plurals;
 
-
 /**
  * Plural forms for Norwegian Nynorsk are 1 and n, with 0 treated as plural.
  */
diff --git a/user/src/com/google/gwt/i18n/client/impl/plurals/DefaultRule_no.java b/user/src/com/google/gwt/i18n/client/impl/plurals/DefaultRule_no.java
index 1929acc..5b2756b 100644
--- a/user/src/com/google/gwt/i18n/client/impl/plurals/DefaultRule_no.java
+++ b/user/src/com/google/gwt/i18n/client/impl/plurals/DefaultRule_no.java
@@ -16,7 +16,6 @@
 
 package com.google.gwt.i18n.client.impl.plurals;
 
-
 /**
  * Plural forms for Norwegian are 1 and n, with 0 treated as plural.
  */
diff --git a/user/src/com/google/gwt/i18n/client/impl/plurals/DefaultRule_nso.java b/user/src/com/google/gwt/i18n/client/impl/plurals/DefaultRule_nso.java
index 9ca2ee4..a8ea468 100644
--- a/user/src/com/google/gwt/i18n/client/impl/plurals/DefaultRule_nso.java
+++ b/user/src/com/google/gwt/i18n/client/impl/plurals/DefaultRule_nso.java
@@ -16,7 +16,6 @@
 
 package com.google.gwt.i18n.client.impl.plurals;
 
-
 /**
  * Plural forms for Northern Sotho are 1 and n, with 0 treated as singular.
  */
diff --git a/user/src/com/google/gwt/i18n/client/impl/plurals/DefaultRule_om.java b/user/src/com/google/gwt/i18n/client/impl/plurals/DefaultRule_om.java
index 5255384..9e48aad 100644
--- a/user/src/com/google/gwt/i18n/client/impl/plurals/DefaultRule_om.java
+++ b/user/src/com/google/gwt/i18n/client/impl/plurals/DefaultRule_om.java
@@ -16,7 +16,6 @@
 
 package com.google.gwt.i18n.client.impl.plurals;
 
-
 /**
  * Plural forms for Oromo are 1 and n, with 0 treated as plural.
  * 
diff --git a/user/src/com/google/gwt/i18n/client/impl/plurals/DefaultRule_or.java b/user/src/com/google/gwt/i18n/client/impl/plurals/DefaultRule_or.java
index 3dfddb6..2c2e634 100644
--- a/user/src/com/google/gwt/i18n/client/impl/plurals/DefaultRule_or.java
+++ b/user/src/com/google/gwt/i18n/client/impl/plurals/DefaultRule_or.java
@@ -16,7 +16,6 @@
 
 package com.google.gwt.i18n.client.impl.plurals;
 
-
 /**
  * Plural forms for Oriya are 1 and n, with 0 treated as plural.
  */
diff --git a/user/src/com/google/gwt/i18n/client/impl/plurals/DefaultRule_pa.java b/user/src/com/google/gwt/i18n/client/impl/plurals/DefaultRule_pa.java
index f5acd5d..2bb32c4 100644
--- a/user/src/com/google/gwt/i18n/client/impl/plurals/DefaultRule_pa.java
+++ b/user/src/com/google/gwt/i18n/client/impl/plurals/DefaultRule_pa.java
@@ -16,7 +16,6 @@
 
 package com.google.gwt.i18n.client.impl.plurals;
 
-
 /**
  * Plural forms for Punjabi are 1 and n, with 0 treated as plural.
  */
diff --git a/user/src/com/google/gwt/i18n/client/impl/plurals/DefaultRule_pap.java b/user/src/com/google/gwt/i18n/client/impl/plurals/DefaultRule_pap.java
index cdbfbe6..f4c9ccb 100644
--- a/user/src/com/google/gwt/i18n/client/impl/plurals/DefaultRule_pap.java
+++ b/user/src/com/google/gwt/i18n/client/impl/plurals/DefaultRule_pap.java
@@ -16,7 +16,6 @@
 
 package com.google.gwt.i18n.client.impl.plurals;
 
-
 /**
  * Plural forms for Papiamento are 1 and n, with 0 treated as plural.
  */
diff --git a/user/src/com/google/gwt/i18n/client/impl/plurals/DefaultRule_pl.java b/user/src/com/google/gwt/i18n/client/impl/plurals/DefaultRule_pl.java
index 3803093..0b9ef9e 100644
--- a/user/src/com/google/gwt/i18n/client/impl/plurals/DefaultRule_pl.java
+++ b/user/src/com/google/gwt/i18n/client/impl/plurals/DefaultRule_pl.java
@@ -16,7 +16,6 @@
 
 package com.google.gwt.i18n.client.impl.plurals;
 
-
 /**
  * Plural forms for Polish are 1, paucal (few), and n.
  */
diff --git a/user/src/com/google/gwt/i18n/client/impl/plurals/DefaultRule_ps.java b/user/src/com/google/gwt/i18n/client/impl/plurals/DefaultRule_ps.java
index a25a701..fbbeb2a 100644
--- a/user/src/com/google/gwt/i18n/client/impl/plurals/DefaultRule_ps.java
+++ b/user/src/com/google/gwt/i18n/client/impl/plurals/DefaultRule_ps.java
@@ -16,7 +16,6 @@
 
 package com.google.gwt.i18n.client.impl.plurals;
 
-
 /**
  * Plural forms for Pashto are 1 and n, with 0 treated as plural.
  * 
diff --git a/user/src/com/google/gwt/i18n/client/impl/plurals/DefaultRule_pt.java b/user/src/com/google/gwt/i18n/client/impl/plurals/DefaultRule_pt.java
index 8caee48..b8b5331 100644
--- a/user/src/com/google/gwt/i18n/client/impl/plurals/DefaultRule_pt.java
+++ b/user/src/com/google/gwt/i18n/client/impl/plurals/DefaultRule_pt.java
@@ -16,7 +16,6 @@
 
 package com.google.gwt.i18n.client.impl.plurals;
 
-
 /**
  * Plural forms for Portuguese are 1 and n, with 0 treated as plural.
  */
diff --git a/user/src/com/google/gwt/i18n/client/impl/plurals/DefaultRule_pt_br.java b/user/src/com/google/gwt/i18n/client/impl/plurals/DefaultRule_pt_br.java
index 78f1619..7742064 100644
--- a/user/src/com/google/gwt/i18n/client/impl/plurals/DefaultRule_pt_br.java
+++ b/user/src/com/google/gwt/i18n/client/impl/plurals/DefaultRule_pt_br.java
@@ -16,7 +16,6 @@
 
 package com.google.gwt.i18n.client.impl.plurals;
 
-
 /**
  * Plural forms for Brazilian Portuguese are 1 and n, with 0 treated as
  * singular.
diff --git a/user/src/com/google/gwt/i18n/client/impl/plurals/DefaultRule_ru.java b/user/src/com/google/gwt/i18n/client/impl/plurals/DefaultRule_ru.java
index cfdb533..530c045 100644
--- a/user/src/com/google/gwt/i18n/client/impl/plurals/DefaultRule_ru.java
+++ b/user/src/com/google/gwt/i18n/client/impl/plurals/DefaultRule_ru.java
@@ -16,7 +16,6 @@
 
 package com.google.gwt.i18n.client.impl.plurals;
 
-
 /**
  * Plural forms for Russian are x1 (but not x11), x2-x4 (but not x12-x14),
  * and n.
diff --git a/user/src/com/google/gwt/i18n/client/impl/plurals/DefaultRule_se.java b/user/src/com/google/gwt/i18n/client/impl/plurals/DefaultRule_se.java
index c96cfdd..5ef4539 100644
--- a/user/src/com/google/gwt/i18n/client/impl/plurals/DefaultRule_se.java
+++ b/user/src/com/google/gwt/i18n/client/impl/plurals/DefaultRule_se.java
@@ -16,7 +16,6 @@
 
 package com.google.gwt.i18n.client.impl.plurals;
 
-
 /**
  * Plural forms for Northern Sami are 1, 2, and n.
  */
diff --git a/user/src/com/google/gwt/i18n/client/impl/plurals/DefaultRule_sk.java b/user/src/com/google/gwt/i18n/client/impl/plurals/DefaultRule_sk.java
index 93284bb..b406178 100644
--- a/user/src/com/google/gwt/i18n/client/impl/plurals/DefaultRule_sk.java
+++ b/user/src/com/google/gwt/i18n/client/impl/plurals/DefaultRule_sk.java
@@ -16,7 +16,6 @@
 
 package com.google.gwt.i18n.client.impl.plurals;
 
-
 /**
  * Plural forms for Slovak are 1, 2-4, and n.
  */
diff --git a/user/src/com/google/gwt/i18n/client/impl/plurals/DefaultRule_smi.java b/user/src/com/google/gwt/i18n/client/impl/plurals/DefaultRule_smi.java
index f3a9b45..73b18c8 100644
--- a/user/src/com/google/gwt/i18n/client/impl/plurals/DefaultRule_smi.java
+++ b/user/src/com/google/gwt/i18n/client/impl/plurals/DefaultRule_smi.java
@@ -16,7 +16,6 @@
 
 package com.google.gwt.i18n.client.impl.plurals;
 
-
 /**
  * Plural forms for Sami are 1, 2, and n.
  */
diff --git a/user/src/com/google/gwt/i18n/client/impl/plurals/DefaultRule_smj.java b/user/src/com/google/gwt/i18n/client/impl/plurals/DefaultRule_smj.java
index 49990e6..f672b4b 100644
--- a/user/src/com/google/gwt/i18n/client/impl/plurals/DefaultRule_smj.java
+++ b/user/src/com/google/gwt/i18n/client/impl/plurals/DefaultRule_smj.java
@@ -16,7 +16,6 @@
 
 package com.google.gwt.i18n.client.impl.plurals;
 
-
 /**
  * Plural forms for Lule Sami are 1, 2, and n.
  */
diff --git a/user/src/com/google/gwt/i18n/client/impl/plurals/DefaultRule_sms.java b/user/src/com/google/gwt/i18n/client/impl/plurals/DefaultRule_sms.java
index 82dcdb7..2f6692a 100644
--- a/user/src/com/google/gwt/i18n/client/impl/plurals/DefaultRule_sms.java
+++ b/user/src/com/google/gwt/i18n/client/impl/plurals/DefaultRule_sms.java
@@ -16,7 +16,6 @@
 
 package com.google.gwt.i18n.client.impl.plurals;
 
-
 /**
  * Plural forms for Skolt Sami are 1, 2, and n.
  */
diff --git a/user/src/com/google/gwt/i18n/client/impl/plurals/DefaultRule_so.java b/user/src/com/google/gwt/i18n/client/impl/plurals/DefaultRule_so.java
index 4044548..37f5aec 100644
--- a/user/src/com/google/gwt/i18n/client/impl/plurals/DefaultRule_so.java
+++ b/user/src/com/google/gwt/i18n/client/impl/plurals/DefaultRule_so.java
@@ -16,7 +16,6 @@
 
 package com.google.gwt.i18n.client.impl.plurals;
 
-
 /**
  * Plural forms for Somali are 1 and n, with 0 treated as plural.
  */
diff --git a/user/src/com/google/gwt/i18n/client/impl/plurals/DefaultRule_sq.java b/user/src/com/google/gwt/i18n/client/impl/plurals/DefaultRule_sq.java
index 2b34ebb..c214d4e 100644
--- a/user/src/com/google/gwt/i18n/client/impl/plurals/DefaultRule_sq.java
+++ b/user/src/com/google/gwt/i18n/client/impl/plurals/DefaultRule_sq.java
@@ -16,7 +16,6 @@
 
 package com.google.gwt.i18n.client.impl.plurals;
 
-
 /**
  * Plural forms for Albanian are 1 and n, with 0 treated as plural.
  */
diff --git a/user/src/com/google/gwt/i18n/client/impl/plurals/DefaultRule_sr.java b/user/src/com/google/gwt/i18n/client/impl/plurals/DefaultRule_sr.java
index e74fd98..74a8caa 100644
--- a/user/src/com/google/gwt/i18n/client/impl/plurals/DefaultRule_sr.java
+++ b/user/src/com/google/gwt/i18n/client/impl/plurals/DefaultRule_sr.java
@@ -16,7 +16,6 @@
 
 package com.google.gwt.i18n.client.impl.plurals;
 
-
 /**
  * Plural forms for Serbian are x1 (but not x11), x2-x4 (but not x12-x14),
  * and n.
diff --git a/user/src/com/google/gwt/i18n/client/impl/plurals/DefaultRule_sv.java b/user/src/com/google/gwt/i18n/client/impl/plurals/DefaultRule_sv.java
index a24e34a..4ce6240 100644
--- a/user/src/com/google/gwt/i18n/client/impl/plurals/DefaultRule_sv.java
+++ b/user/src/com/google/gwt/i18n/client/impl/plurals/DefaultRule_sv.java
@@ -16,7 +16,6 @@
 
 package com.google.gwt.i18n.client.impl.plurals;
 
-
 /**
  * Plural forms for Swedish are 1 and n, with 0 treated as plural.
  */
diff --git a/user/src/com/google/gwt/i18n/client/impl/plurals/DefaultRule_sw.java b/user/src/com/google/gwt/i18n/client/impl/plurals/DefaultRule_sw.java
index d1efcb6..306b009 100644
--- a/user/src/com/google/gwt/i18n/client/impl/plurals/DefaultRule_sw.java
+++ b/user/src/com/google/gwt/i18n/client/impl/plurals/DefaultRule_sw.java
@@ -16,7 +16,6 @@
 
 package com.google.gwt.i18n.client.impl.plurals;
 
-
 /**
  * Plural forms for Swahili are 1 and n, with 0 treated as plural.
  * 
diff --git a/user/src/com/google/gwt/i18n/client/impl/plurals/DefaultRule_ta.java b/user/src/com/google/gwt/i18n/client/impl/plurals/DefaultRule_ta.java
index 4e87ff5..46c58c1 100644
--- a/user/src/com/google/gwt/i18n/client/impl/plurals/DefaultRule_ta.java
+++ b/user/src/com/google/gwt/i18n/client/impl/plurals/DefaultRule_ta.java
@@ -16,7 +16,6 @@
 
 package com.google.gwt.i18n.client.impl.plurals;
 
-
 /**
  * Plural forms for Tamil are 1 and n, with 0 treated as plural.
  */
diff --git a/user/src/com/google/gwt/i18n/client/impl/plurals/DefaultRule_te.java b/user/src/com/google/gwt/i18n/client/impl/plurals/DefaultRule_te.java
index 407cb52..a1663dc 100644
--- a/user/src/com/google/gwt/i18n/client/impl/plurals/DefaultRule_te.java
+++ b/user/src/com/google/gwt/i18n/client/impl/plurals/DefaultRule_te.java
@@ -16,7 +16,6 @@
 
 package com.google.gwt.i18n.client.impl.plurals;
 
-
 /**
  * Plural forms for Telugu are 1 and n, with 0 treated as plural.
  */
diff --git a/user/src/com/google/gwt/i18n/client/impl/plurals/DefaultRule_ti.java b/user/src/com/google/gwt/i18n/client/impl/plurals/DefaultRule_ti.java
index 675b7ee..f14debf 100644
--- a/user/src/com/google/gwt/i18n/client/impl/plurals/DefaultRule_ti.java
+++ b/user/src/com/google/gwt/i18n/client/impl/plurals/DefaultRule_ti.java
@@ -16,7 +16,6 @@
 
 package com.google.gwt.i18n.client.impl.plurals;
 
-
 /**
  * Plural forms for Tigrinya are 1 and n, with 0 treated as singular.
  */
diff --git a/user/src/com/google/gwt/i18n/client/impl/plurals/DefaultRule_tk.java b/user/src/com/google/gwt/i18n/client/impl/plurals/DefaultRule_tk.java
index f203ba2..b86b961 100644
--- a/user/src/com/google/gwt/i18n/client/impl/plurals/DefaultRule_tk.java
+++ b/user/src/com/google/gwt/i18n/client/impl/plurals/DefaultRule_tk.java
@@ -16,7 +16,6 @@
 
 package com.google.gwt.i18n.client.impl.plurals;
 
-
 /**
  * Plural forms for Turkmen are 1 and n, with 0 treated as plural.
  */
diff --git a/user/src/com/google/gwt/i18n/client/impl/plurals/DefaultRule_uk.java b/user/src/com/google/gwt/i18n/client/impl/plurals/DefaultRule_uk.java
index da80a53..cd8a350 100644
--- a/user/src/com/google/gwt/i18n/client/impl/plurals/DefaultRule_uk.java
+++ b/user/src/com/google/gwt/i18n/client/impl/plurals/DefaultRule_uk.java
@@ -16,7 +16,6 @@
 
 package com.google.gwt.i18n.client.impl.plurals;
 
-
 /**
  * Plural forms for Ukranian are x1 (but not x11), x2-x4 (but not x12-x14),
  * and n.
diff --git a/user/src/com/google/gwt/i18n/client/impl/plurals/DefaultRule_ur.java b/user/src/com/google/gwt/i18n/client/impl/plurals/DefaultRule_ur.java
index 737fc83..739740c 100644
--- a/user/src/com/google/gwt/i18n/client/impl/plurals/DefaultRule_ur.java
+++ b/user/src/com/google/gwt/i18n/client/impl/plurals/DefaultRule_ur.java
@@ -16,7 +16,6 @@
 
 package com.google.gwt.i18n.client.impl.plurals;
 
-
 /**
  * Plural forms for Urdu are 1 and n, with 0 treated as plural.
  * 
diff --git a/user/src/com/google/gwt/i18n/client/impl/plurals/DefaultRule_wa.java b/user/src/com/google/gwt/i18n/client/impl/plurals/DefaultRule_wa.java
index 641472e..ef54fd3 100644
--- a/user/src/com/google/gwt/i18n/client/impl/plurals/DefaultRule_wa.java
+++ b/user/src/com/google/gwt/i18n/client/impl/plurals/DefaultRule_wa.java
@@ -16,7 +16,6 @@
 
 package com.google.gwt.i18n.client.impl.plurals;
 
-
 /**
  * Plural forms for Walloon are 1 and n, with 0 treated as singular.
  */
diff --git a/user/src/com/google/gwt/i18n/client/impl/plurals/DefaultRule_zh.java b/user/src/com/google/gwt/i18n/client/impl/plurals/DefaultRule_zh.java
index 5e2feee..f3a4f5c 100644
--- a/user/src/com/google/gwt/i18n/client/impl/plurals/DefaultRule_zh.java
+++ b/user/src/com/google/gwt/i18n/client/impl/plurals/DefaultRule_zh.java
@@ -16,7 +16,6 @@
 
 package com.google.gwt.i18n.client.impl.plurals;
 
-
 /**
  * Usually, there are no plural forms in Chinese.  When they are used,
  * plural forms are 1 and n, with 0 treated as plural.
diff --git a/user/src/com/google/gwt/i18n/client/impl/plurals/DefaultRule_zu.java b/user/src/com/google/gwt/i18n/client/impl/plurals/DefaultRule_zu.java
index 038c2db..a41e884 100644
--- a/user/src/com/google/gwt/i18n/client/impl/plurals/DefaultRule_zu.java
+++ b/user/src/com/google/gwt/i18n/client/impl/plurals/DefaultRule_zu.java
@@ -16,7 +16,6 @@
 
 package com.google.gwt.i18n.client.impl.plurals;
 
-
 /**
  * Plural forms for Zulu are 1 and n, with 0 treated as plural.
  * 
diff --git a/user/src/com/google/gwt/i18n/rebind/ConstantsMapMethodCreator.java b/user/src/com/google/gwt/i18n/rebind/ConstantsMapMethodCreator.java
index 1da3076..7239672 100644
--- a/user/src/com/google/gwt/i18n/rebind/ConstantsMapMethodCreator.java
+++ b/user/src/com/google/gwt/i18n/rebind/ConstantsMapMethodCreator.java
@@ -25,6 +25,8 @@
 
 import java.util.LinkedHashMap;
 import java.util.Map;
+import java.util.Set;
+import java.util.Map.Entry;
 
 /**
  * Creator for methods of the form Map getX() .
@@ -100,16 +102,16 @@
 
     indent();
     indent();
-    for (String key : map.keySet()) {
-      println(wrap(key) + ", ");
+    Set<Entry<String, String>> entries = map.entrySet();
+    for (Entry<String, String> entry : entries) {
+      println(wrap(entry.getKey()) + ", ");
     }
     outdent();
     println("},");
     indent();
     println("new String[] {");
-    for (String key : map.keySet()) {
-      String value = map.get(key);
-      println(wrap(value) + ",");
+    for (Entry<String, String> entry : entries) {
+      println(wrap(entry.getValue()) + ", ");
     }
     outdent();
     println("});");
diff --git a/user/src/com/google/gwt/i18n/rebind/LocaleInfoGenerator.java b/user/src/com/google/gwt/i18n/rebind/LocaleInfoGenerator.java
index dfd5bb0..a0dbec3 100644
--- a/user/src/com/google/gwt/i18n/rebind/LocaleInfoGenerator.java
+++ b/user/src/com/google/gwt/i18n/rebind/LocaleInfoGenerator.java
@@ -168,8 +168,8 @@
           displayName = displayNames.getProperty(localeName);
         }
         if (displayName != null && displayName.length() != 0) {
-          localeName.replace("\"", "\\\"");
-          displayName.replace("\"", "\\\"");
+          localeName = quoteQuotes(localeName);
+          displayName = quoteQuotes(displayName);
           if (needComma) {
             writer.println(",");
           }
@@ -191,7 +191,6 @@
     if (!runtimeLocales.isEmpty()) {
       className += "_runtimeSelection";
     }
-    String qualName = packageName + "." + className;
 
     pw = context.tryCreate(logger, packageName, className);
     if (pw != null) {
@@ -320,4 +319,8 @@
     }
     locales.add(locale);
   }
+  
+  private String quoteQuotes(String val) {
+    return val.replace("\"", "\\\"");
+  }
 }
diff --git a/user/src/com/google/gwt/i18n/rebind/LocalizableLinkageCreator.java b/user/src/com/google/gwt/i18n/rebind/LocalizableLinkageCreator.java
index df3c14c..304ebe2 100644
--- a/user/src/com/google/gwt/i18n/rebind/LocalizableLinkageCreator.java
+++ b/user/src/com/google/gwt/i18n/rebind/LocalizableLinkageCreator.java
@@ -126,8 +126,9 @@
     for (GwtLocale search : locale.getCompleteSearchList()) {
       result = matchingClasses.get(search.toString());
       if (result != null) {
+        className = result.getQualifiedSourceName();
         implCache.put(baseName + locale.toString(), className);
-        return result.getQualifiedSourceName();
+        return className;
       }
     }
     // No classes matched.
diff --git a/user/src/com/google/gwt/i18n/rebind/keygen/FullyQualifiedMethodNameKeyGenerator.java b/user/src/com/google/gwt/i18n/rebind/keygen/FullyQualifiedMethodNameKeyGenerator.java
index a835522..5131fae 100644
--- a/user/src/com/google/gwt/i18n/rebind/keygen/FullyQualifiedMethodNameKeyGenerator.java
+++ b/user/src/com/google/gwt/i18n/rebind/keygen/FullyQualifiedMethodNameKeyGenerator.java
@@ -15,7 +15,6 @@
  */
 package com.google.gwt.i18n.rebind.keygen;
 
-
 /**
  * Key generator using the fully-qualified method name.
  */
diff --git a/user/src/com/google/gwt/i18n/rebind/keygen/MethodNameKeyGenerator.java b/user/src/com/google/gwt/i18n/rebind/keygen/MethodNameKeyGenerator.java
index bb7976d..558c73c 100644
--- a/user/src/com/google/gwt/i18n/rebind/keygen/MethodNameKeyGenerator.java
+++ b/user/src/com/google/gwt/i18n/rebind/keygen/MethodNameKeyGenerator.java
@@ -15,7 +15,6 @@
  */
 package com.google.gwt.i18n.rebind.keygen;
 
-
 /**
  * Key generator using just the method name as the lookup key. Note: this is
  * prone to collisions if multiple Messages classes are aggregated for
diff --git a/user/src/com/google/gwt/jsonp/client/JsonpRequestBuilder.java b/user/src/com/google/gwt/jsonp/client/JsonpRequestBuilder.java
index 7d26448..e5a376d 100644
--- a/user/src/com/google/gwt/jsonp/client/JsonpRequestBuilder.java
+++ b/user/src/com/google/gwt/jsonp/client/JsonpRequestBuilder.java
@@ -18,7 +18,6 @@
 import com.google.gwt.core.client.JavaScriptObject;
 import com.google.gwt.user.client.rpc.AsyncCallback;
 
-
 /**
  * Class to send cross domain requests to an http server. The server will receive a request
  * including a callback url parameter, which should be used to return the response as following:
diff --git a/user/src/com/google/gwt/junit/JUnitMessageQueue.java b/user/src/com/google/gwt/junit/JUnitMessageQueue.java
index e45ac3f..6dbe0ae 100644
--- a/user/src/com/google/gwt/junit/JUnitMessageQueue.java
+++ b/user/src/com/google/gwt/junit/JUnitMessageQueue.java
@@ -63,7 +63,7 @@
   /**
    * The lock used to synchronize access to clientStatuses.
    */
-  private Object clientStatusesLock = new Object();
+  private final Object clientStatusesLock = new Object();
 
   /**
    * The current test to execute.
diff --git a/user/src/com/google/gwt/junit/RunStyleSelenium.java b/user/src/com/google/gwt/junit/RunStyleSelenium.java
index 211c093..c58a6a8 100644
--- a/user/src/com/google/gwt/junit/RunStyleSelenium.java
+++ b/user/src/com/google/gwt/junit/RunStyleSelenium.java
@@ -72,15 +72,17 @@
     for (int i = 0; i < targets.length; ++i) {
       Matcher matcher = pattern.matcher(targetsIn[i]);
       if (!matcher.matches()) {
-        throw new JUnitFatalLaunchException("Unable to parse Selenium target "
-            + targetsIn[i] + " (expected format is [host]:[port]/[browser])");
+        throw new JUnitFatalLaunchException("Unable to parse Selenium target " + targetsIn[i]
+            + " (expected format is [host]:[port]/[browser])");
       }
-      RCSelenium instance = new RCSelenium(matcher.group(3), matcher.group(1),
-          Integer.parseInt(matcher.group(2)));
+      RCSelenium instance =
+          new RCSelenium(matcher.group(3), matcher.group(1), Integer.parseInt(matcher.group(2)));
       targets[i] = instance;
     }
 
-    return new RunStyleSelenium(shell, targets);
+    RunStyleSelenium runStyle = new RunStyleSelenium(shell, targets);
+    runStyle.start();
+    return runStyle;
   }
 
   private RCSelenium remotes[];
@@ -100,8 +102,7 @@
    */
   private final Object wasInterruptedLock = new Object();
 
-  public RunStyleSelenium(final JUnitShell shell, RCSelenium targets[]) {
-
+  protected RunStyleSelenium(final JUnitShell shell, RCSelenium targets[]) {
     super(shell);
     this.remotes = targets;
 
@@ -115,34 +116,16 @@
             try {
               remote.getSelenium().stop();
             } catch (SeleniumException se) {
-              shell.getTopLogger().log(TreeLogger.WARN,
-                  "Error stoping selenium session", se);
+              shell.getTopLogger().log(TreeLogger.WARN, "Error stoping selenium session", se);
             }
           }
         }
       }
     });
-
-    // Crank up the keep-alive thread. This will periodically check for failure
-    // of the Selenium session and stop the test if something goes wrong.
-    Thread keepAliveThread = new Thread() {
-      @Override
-      public void run() {
-        do {
-          try {
-            Thread.sleep(1000);
-          } catch (InterruptedException ignored) {
-          }
-        } while (doKeepAlives());
-      }
-    };
-    keepAliveThread.setDaemon(true);
-    keepAliveThread.start();
   }
 
   @Override
-  public synchronized void launchModule(String moduleName)
-      throws UnableToCompleteException {
+  public synchronized void launchModule(String moduleName) throws UnableToCompleteException {
     // Get the localhost address.
     String domain;
     try {
@@ -156,8 +139,7 @@
     for (RCSelenium remote : remotes) {
       try {
         shell.getTopLogger().log(TreeLogger.TRACE,
-            "Starting with domain: " + domain 
-            + " Opening URL: " + getMyUrl(moduleName)); 
+            "Starting with domain: " + domain + " Opening URL: " + getMyUrl(moduleName));
         remote.createSelenium(domain);
         remote.getSelenium().start();
         remote.getSelenium().open(getMyUrl(moduleName));
@@ -175,6 +157,27 @@
     }
   }
 
+  /**
+   * Create the keep-alive thread.
+   */
+  protected void start() {
+    // This will periodically check for failure of the Selenium session and stop
+    // the test if something goes wrong.
+    Thread keepAliveThread = new Thread() {
+      @Override
+      public void run() {
+        do {
+          try {
+            Thread.sleep(1000);
+          } catch (InterruptedException ignored) {
+          }
+        } while (doKeepAlives());
+      }
+    };
+    keepAliveThread.setDaemon(true);
+    keepAliveThread.start();
+  }
+
   private synchronized boolean doKeepAlives() {
     if (remotes != null) {
       for (RCSelenium remote : remotes) {
diff --git a/user/src/com/google/gwt/junit/remote/BrowserManagerServer.java b/user/src/com/google/gwt/junit/remote/BrowserManagerServer.java
index 4459938..d395747 100644
--- a/user/src/com/google/gwt/junit/remote/BrowserManagerServer.java
+++ b/user/src/com/google/gwt/junit/remote/BrowserManagerServer.java
@@ -61,6 +61,11 @@
  * be adapted for that purpose one day.)
  * </p>
  * 
+ * <p>
+ * This class is not actually serializable as-is, because timer is not
+ * serializable.
+ * </p>
+ * 
  * see http://bugs.sun.com/bugdatabase/view_bug.do;:YfiG?bug_id=4062587
  */
 public class BrowserManagerServer extends UnicastRemoteObject implements
@@ -74,7 +79,7 @@
   /**
    * Entry in the launchCommandQueue to use when tasks are serialized.
    */
-  private class LaunchCommand {
+  private static class LaunchCommand {
     long keepAliveMsecs;
     int token;
     String url;
diff --git a/user/src/com/google/gwt/junit/remote/BrowserManagerServerLauncher.java b/user/src/com/google/gwt/junit/remote/BrowserManagerServerLauncher.java
index e382a00..0c35290 100644
--- a/user/src/com/google/gwt/junit/remote/BrowserManagerServerLauncher.java
+++ b/user/src/com/google/gwt/junit/remote/BrowserManagerServerLauncher.java
@@ -110,7 +110,7 @@
     }
   }
 
-  private class BMSEntry {
+  private static class BMSEntry {
     final String browserPath;
     final String registrationKey;
 
diff --git a/user/src/com/google/gwt/resources/css/Minify.java b/user/src/com/google/gwt/resources/css/Minify.java
index 1a75c5b..5523312 100644
--- a/user/src/com/google/gwt/resources/css/Minify.java
+++ b/user/src/com/google/gwt/resources/css/Minify.java
@@ -39,7 +39,12 @@
    * See {@link #printHelp()} for usage.
    */
   public static void main(String[] args) {
-    (new Minify()).exec(args);
+    Minify m = new Minify();
+    if (m.exec(args)) {
+      System.exit(0);
+    } else {
+      System.exit(-1);
+    }
   }
 
   private final PrintWriterTreeLogger logger = new PrintWriterTreeLogger(
@@ -56,7 +61,7 @@
     return "Minify a CSS file";
   }
 
-  private void exec(String[] args) {
+  private boolean exec(String[] args) {
     registerHandler(new ArgHandlerExtra() {
 
       @Override
@@ -103,12 +108,12 @@
     });
 
     if (!processArgs(args)) {
-      System.exit(-1);
+      return false;
     }
 
     if (source == null) {
       printHelp();
-      System.exit(-1);
+      return false;
     }
 
     try {
@@ -120,6 +125,6 @@
       logger.log(TreeLogger.ERROR, "Unable to compile CSS");
     }
 
-    System.exit(0);
+    return true;
   }
 }
diff --git a/user/src/com/google/gwt/resources/rg/CssResourceGenerator.java b/user/src/com/google/gwt/resources/rg/CssResourceGenerator.java
index 5e32938..fafb7b1 100644
--- a/user/src/com/google/gwt/resources/rg/CssResourceGenerator.java
+++ b/user/src/com/google/gwt/resources/rg/CssResourceGenerator.java
@@ -74,6 +74,7 @@
 import com.google.gwt.user.rebind.SourceWriter;
 import com.google.gwt.user.rebind.StringSourceWriter;
 
+import java.io.Serializable;
 import java.lang.reflect.InvocationTargetException;
 import java.lang.reflect.Method;
 import java.net.URL;
@@ -258,7 +259,8 @@
     }
   }
 
-  static class JClassOrderComparator implements Comparator<JClassType> {
+  static class JClassOrderComparator implements Comparator<JClassType>,
+      Serializable {
     public int compare(JClassType o1, JClassType o2) {
       return o1.getQualifiedSourceName().compareTo(o2.getQualifiedSourceName());
     }
@@ -1185,12 +1187,12 @@
       for (Class<? extends CssResource> clazz : imp.value()) {
         JClassType importType = context.getGeneratorContext().getTypeOracle().findType(
             clazz.getName().replace('$', '.'));
+        assert importType != null;
         String prefix = importType.getSimpleSourceName();
         ImportedWithPrefix exp = importType.getAnnotation(ImportedWithPrefix.class);
         if (exp != null) {
           prefix = exp.value();
         }
-        assert importType != null;
 
         if (replacementsWithPrefix.put(prefix + "-",
             computeReplacementsForType(importType)) != null) {
diff --git a/user/src/com/google/gwt/user/client/Event.java b/user/src/com/google/gwt/user/client/Event.java
index ce866ff..301c4eb 100644
--- a/user/src/com/google/gwt/user/client/Event.java
+++ b/user/src/com/google/gwt/user/client/Event.java
@@ -431,6 +431,8 @@
    * @return the element's event listener
    */
   public static EventListener getEventListener(Element elem) {
+    // This cast is always valid because both Element types are JSOs and have
+    // no new fields are added in the subclass.
     return DOM.getEventListener((com.google.gwt.user.client.Element) elem);
   }
 
@@ -442,6 +444,8 @@
    *         values are described in {@link Event})
    */
   public static int getEventsSunk(Element elem) {
+    // This cast is always valid because both Element types are JSOs and have
+    // no new fields are added in the subclass.
     return DOM.getEventsSunk((com.google.gwt.user.client.Element) elem);
   }
 
@@ -497,6 +501,8 @@
    * @param listener the listener to receive {@link Event events}
    */
   public static void setEventListener(Element elem, EventListener listener) {
+    // This cast is always valid because both Element types are JSOs and have
+    // no new fields are added in the subclass.
     DOM.setEventListener((com.google.gwt.user.client.Element) elem, listener);
   }
 
@@ -510,6 +516,8 @@
    *          possible values are described in {@link Event})
    */
   public static void sinkEvents(Element elem, int eventBits) {
+    // This cast is always valid because both Element types are JSOs and have
+    // no new fields are added in the subclass.
     DOM.sinkEvents((com.google.gwt.user.client.Element) elem, eventBits);
   }
 
diff --git a/user/src/com/google/gwt/user/client/impl/HTTPRequestImpl.java b/user/src/com/google/gwt/user/client/impl/HTTPRequestImpl.java
index ccab00b..46c1cbd 100644
--- a/user/src/com/google/gwt/user/client/impl/HTTPRequestImpl.java
+++ b/user/src/com/google/gwt/user/client/impl/HTTPRequestImpl.java
@@ -27,6 +27,8 @@
   static JavaScriptObject nullFunc;
   
   public HTTPRequestImpl() {
+    // TODO - consider moving this to clinit or creating it on the fly rather
+    // than assigning it to a static
     nullFunc = JavaScriptObject.createFunction();
   }
   
diff --git a/user/src/com/google/gwt/user/client/rpc/GwtTransient.java b/user/src/com/google/gwt/user/client/rpc/GwtTransient.java
index 376e055..d8f2816 100644
--- a/user/src/com/google/gwt/user/client/rpc/GwtTransient.java
+++ b/user/src/com/google/gwt/user/client/rpc/GwtTransient.java
@@ -17,6 +17,8 @@
 
 import java.lang.annotation.Documented;
 import java.lang.annotation.ElementType;
+import java.lang.annotation.Retention;
+import java.lang.annotation.RetentionPolicy;
 import java.lang.annotation.Target;
 
 /**
@@ -27,6 +29,7 @@
  * can be useful.
  */
 @Documented
+@Retention(RetentionPolicy.RUNTIME)
 @Target(ElementType.FIELD)
 public @interface GwtTransient {
 }
diff --git a/user/src/com/google/gwt/user/client/rpc/core/java/lang/Byte_CustomFieldSerializer.java b/user/src/com/google/gwt/user/client/rpc/core/java/lang/Byte_CustomFieldSerializer.java
index ef1b640..ecad46a 100644
--- a/user/src/com/google/gwt/user/client/rpc/core/java/lang/Byte_CustomFieldSerializer.java
+++ b/user/src/com/google/gwt/user/client/rpc/core/java/lang/Byte_CustomFieldSerializer.java
@@ -31,7 +31,7 @@
 
   public static Byte instantiate(SerializationStreamReader streamReader)
       throws SerializationException {
-    return new Byte(streamReader.readByte());
+    return Byte.valueOf(streamReader.readByte());
   }
 
   public static void serialize(SerializationStreamWriter streamWriter,
diff --git a/user/src/com/google/gwt/user/client/rpc/core/java/lang/Character_CustomFieldSerializer.java b/user/src/com/google/gwt/user/client/rpc/core/java/lang/Character_CustomFieldSerializer.java
index e679341..9b42adc 100644
--- a/user/src/com/google/gwt/user/client/rpc/core/java/lang/Character_CustomFieldSerializer.java
+++ b/user/src/com/google/gwt/user/client/rpc/core/java/lang/Character_CustomFieldSerializer.java
@@ -31,7 +31,7 @@
 
   public static Character instantiate(SerializationStreamReader streamReader)
       throws SerializationException {
-    return new Character(streamReader.readChar());
+    return Character.valueOf(streamReader.readChar());
   }
 
   public static void serialize(SerializationStreamWriter streamWriter,
diff --git a/user/src/com/google/gwt/user/client/rpc/core/java/lang/Integer_CustomFieldSerializer.java b/user/src/com/google/gwt/user/client/rpc/core/java/lang/Integer_CustomFieldSerializer.java
index fae99d4..c31869d 100644
--- a/user/src/com/google/gwt/user/client/rpc/core/java/lang/Integer_CustomFieldSerializer.java
+++ b/user/src/com/google/gwt/user/client/rpc/core/java/lang/Integer_CustomFieldSerializer.java
@@ -31,7 +31,7 @@
 
   public static Integer instantiate(SerializationStreamReader streamReader)
       throws SerializationException {
-    return new Integer(streamReader.readInt());
+    return Integer.valueOf(streamReader.readInt());
   }
 
   public static void serialize(SerializationStreamWriter streamWriter,
diff --git a/user/src/com/google/gwt/user/client/rpc/core/java/lang/Short_CustomFieldSerializer.java b/user/src/com/google/gwt/user/client/rpc/core/java/lang/Short_CustomFieldSerializer.java
index 8389fc1..4068846 100644
--- a/user/src/com/google/gwt/user/client/rpc/core/java/lang/Short_CustomFieldSerializer.java
+++ b/user/src/com/google/gwt/user/client/rpc/core/java/lang/Short_CustomFieldSerializer.java
@@ -31,7 +31,7 @@
 
   public static Short instantiate(SerializationStreamReader streamReader)
       throws SerializationException {
-    return new Short(streamReader.readShort());
+    return Short.valueOf(streamReader.readShort());
   }
 
   public static void serialize(SerializationStreamWriter streamWriter,
diff --git a/user/src/com/google/gwt/user/client/ui/AbstractImagePrototype.java b/user/src/com/google/gwt/user/client/ui/AbstractImagePrototype.java
index 17ce5b8..e7e81e8 100644
--- a/user/src/com/google/gwt/user/client/ui/AbstractImagePrototype.java
+++ b/user/src/com/google/gwt/user/client/ui/AbstractImagePrototype.java
@@ -55,7 +55,7 @@
    */
   public static class ImagePrototypeElement extends Element {
     protected ImagePrototypeElement() {
-    };
+    }
   }
 
   /**
diff --git a/user/src/com/google/gwt/user/client/ui/DialogBox.java b/user/src/com/google/gwt/user/client/ui/DialogBox.java
index b259fcc..fd2172a 100644
--- a/user/src/com/google/gwt/user/client/ui/DialogBox.java
+++ b/user/src/com/google/gwt/user/client/ui/DialogBox.java
@@ -92,7 +92,7 @@
   public interface Caption extends HasAllMouseHandlers {
   }
 
-  private class CaptionImpl extends HTML implements Caption {
+  private static class CaptionImpl extends HTML implements Caption {
   }
 
   private class MouseHandler implements MouseDownHandler, MouseUpHandler,
diff --git a/user/src/com/google/gwt/user/client/ui/DockPanel.java b/user/src/com/google/gwt/user/client/ui/DockPanel.java
index bd32fe2..6373631 100644
--- a/user/src/com/google/gwt/user/client/ui/DockPanel.java
+++ b/user/src/com/google/gwt/user/client/ui/DockPanel.java
@@ -304,15 +304,13 @@
       DockLayoutConstant dir = ((LayoutData) child.getLayoutData()).direction;
 
       // Get a debug id
-      Integer count = dirCount.get(dir);
-      if (count == null) {
-        count = new Integer(1);
-      }
-      String debugID = generateDebugId(dir, count.intValue());
+      Integer countObj = dirCount.get(dir);
+      int count = countObj == null ? 1 : countObj.intValue();
+      String debugID = generateDebugId(dir, count);
       ensureDebugId(DOM.getParent(child.getElement()), baseID, debugID);
 
       // Increment the count
-      dirCount.put(dir, count.intValue() + 1);
+      dirCount.put(dir, count + 1);
     }
   }
 
diff --git a/user/src/com/google/gwt/user/client/ui/HorizontalSplitPanel.java b/user/src/com/google/gwt/user/client/ui/HorizontalSplitPanel.java
index 3917cd9..e0ff61c 100644
--- a/user/src/com/google/gwt/user/client/ui/HorizontalSplitPanel.java
+++ b/user/src/com/google/gwt/user/client/ui/HorizontalSplitPanel.java
@@ -547,12 +547,12 @@
   }
 
   @Override
-  final void onSplitterResize(int x, int y) {
+  void onSplitterResize(int x, int y) {
     impl.onSplitResize(initialLeftWidth + x - initialThumbPos);
   }
 
   @Override
-  final void onSplitterResizeStarted(int x, int y) {
+  void onSplitterResizeStarted(int x, int y) {
     initialThumbPos = x;
     initialLeftWidth = getOffsetWidth(getElement(LEFT));
   }
diff --git a/user/src/com/google/gwt/user/client/ui/SuggestBox.java b/user/src/com/google/gwt/user/client/ui/SuggestBox.java
index 1c8a60d..4962c92 100644
--- a/user/src/com/google/gwt/user/client/ui/SuggestBox.java
+++ b/user/src/com/google/gwt/user/client/ui/SuggestBox.java
@@ -209,7 +209,6 @@
     }
   }
 
-
   /**
    * Class for menu items in a SuggestionMenu. A SuggestionMenuItem differs from
    * a MenuItem in that each item is backed by a Suggestion object. The text of
diff --git a/user/src/com/google/gwt/user/client/ui/VerticalSplitPanel.java b/user/src/com/google/gwt/user/client/ui/VerticalSplitPanel.java
index 3f1ec79..d5bac1c 100644
--- a/user/src/com/google/gwt/user/client/ui/VerticalSplitPanel.java
+++ b/user/src/com/google/gwt/user/client/ui/VerticalSplitPanel.java
@@ -282,7 +282,7 @@
    * 
    * @return the widget, <code>null</code> if there is not one
    */
-  public final Widget getBottomWidget() {
+  public Widget getBottomWidget() {
     return getWidget(BOTTOM);
   }
 
@@ -291,7 +291,7 @@
    * 
    * @return the widget, <code>null</code> if there is not one
    */
-  public final Widget getTopWidget() {
+  public Widget getTopWidget() {
     return getWidget(TOP);
   }
 
@@ -300,7 +300,7 @@
    * 
    * @param w the widget
    */
-  public final void setBottomWidget(Widget w) {
+  public void setBottomWidget(Widget w) {
     setWidget(BOTTOM, w);
   }
 
@@ -310,7 +310,7 @@
   }
 
   @Override
-  public final void setSplitPosition(String pos) {
+  public void setSplitPosition(String pos) {
     lastSplitPosition = pos;
     final Element topElem = getElement(TOP);
     setHeight(topElem, pos);
@@ -322,7 +322,7 @@
    * 
    * @param w the widget
    */
-  public final void setTopWidget(Widget w) {
+  public void setTopWidget(Widget w) {
     setWidget(TOP, w);
   }
 
@@ -365,12 +365,12 @@
   }
 
   @Override
-  final void onSplitterResize(int x, int y) {
+  void onSplitterResize(int x, int y) {
     impl.onSplitterResize(initialTopHeight + y - initialThumbPos);
   }
 
   @Override
-  final void onSplitterResizeStarted(int x, int y) {
+  void onSplitterResizeStarted(int x, int y) {
     initialThumbPos = y;
     initialTopHeight = getOffsetHeight(getElement(TOP));
   }
diff --git a/user/src/com/google/gwt/user/client/ui/WidgetIterators.java b/user/src/com/google/gwt/user/client/ui/WidgetIterators.java
index 01d3281..8188f37 100644
--- a/user/src/com/google/gwt/user/client/ui/WidgetIterators.java
+++ b/user/src/com/google/gwt/user/client/ui/WidgetIterators.java
@@ -25,7 +25,7 @@
  */
 class WidgetIterators {
 
-  private static final Widget[] copyWidgetArray(final Widget[] widgets) {
+  private static Widget[] copyWidgetArray(final Widget[] widgets) {
     final Widget[] clone = new Widget[widgets.length];
     for (int i = 0; i < widgets.length; i++) {
       clone[i] = widgets[i];
diff --git a/user/src/com/google/gwt/user/datepicker/client/CellGridImpl.java b/user/src/com/google/gwt/user/datepicker/client/CellGridImpl.java
index 68c54e1..a1931f9 100644
--- a/user/src/com/google/gwt/user/datepicker/client/CellGridImpl.java
+++ b/user/src/com/google/gwt/user/datepicker/client/CellGridImpl.java
@@ -148,6 +148,8 @@
   }

 

   public Cell getCell(Element element) {

+    // This cast is always valid because both Element types are JSOs and have

+    // no new fields are added in the subclass.

     return elementToCell.get((com.google.gwt.user.client.Element) element);

   }

 

diff --git a/user/src/com/google/gwt/user/datepicker/client/DatePicker.java b/user/src/com/google/gwt/user/datepicker/client/DatePicker.java
index 9cac19e..5ebb67d 100644
--- a/user/src/com/google/gwt/user/datepicker/client/DatePicker.java
+++ b/user/src/com/google/gwt/user/datepicker/client/DatePicker.java
@@ -192,7 +192,7 @@
   /**

    * A date highlighted event that copied on read.

    */

-  private class DateHighlightEvent extends HighlightEvent<Date> {

+  private static class DateHighlightEvent extends HighlightEvent<Date> {

     protected DateHighlightEvent(Date highlighted) {

       super(highlighted);

     }

@@ -203,7 +203,7 @@
     }

   }

 

-  private class DateStyler {

+  private static class DateStyler {

     private Map<String, String> info = new HashMap<String, String>();

 

     public String getStyleName(Date d) {

diff --git a/user/src/com/google/gwt/user/rebind/rpc/BlacklistTypeFilter.java b/user/src/com/google/gwt/user/rebind/rpc/BlacklistTypeFilter.java
index 239d1f5..d2d71e2 100644
--- a/user/src/com/google/gwt/user/rebind/rpc/BlacklistTypeFilter.java
+++ b/user/src/com/google/gwt/user/rebind/rpc/BlacklistTypeFilter.java
@@ -85,7 +85,6 @@
     return "BlacklistTypeFilter";
   }
   
-
   public boolean isAllowed(JClassType type) {
     String name = getBaseTypeName(type);
     // For types not handled by getBaseTypeName just return true.
diff --git a/user/src/com/google/gwt/user/rebind/rpc/ProblemReport.java b/user/src/com/google/gwt/user/rebind/rpc/ProblemReport.java
index 848fc8d..63b77a7 100644
--- a/user/src/com/google/gwt/user/rebind/rpc/ProblemReport.java
+++ b/user/src/com/google/gwt/user/rebind/rpc/ProblemReport.java
@@ -48,7 +48,7 @@
    * An individual report, which may require multiple entries (expressed as

    * logs under a branchpoint), but relates to an individual issue.

    */

-  public class Problem {

+  public static class Problem {

     private String message;

     private List<String> childMessages;

 

@@ -253,8 +253,8 @@
    */

   private void doReport(TreeLogger logger, Type level,

       Map<JClassType, List<Problem>> problems) {

-    for (JClassType type : problems.keySet()) {

-      for (Problem problem : problems.get(type)) {

+    for (List<Problem> problemList : problems.values()) {

+      for (Problem problem : problemList) {

         if (problem.hasSubMessages()) {

           TreeLogger sublogger = logger.branch(level, problem.getPrimaryMessage());

           for (String sub : problem.getSubMessages()) {

diff --git a/user/src/com/google/gwt/user/rebind/rpc/ProxyCreator.java b/user/src/com/google/gwt/user/rebind/rpc/ProxyCreator.java
index 346e2cd..1e01347 100644
--- a/user/src/com/google/gwt/user/rebind/rpc/ProxyCreator.java
+++ b/user/src/com/google/gwt/user/rebind/rpc/ProxyCreator.java
@@ -273,27 +273,34 @@
     // output.
     OutputStream pathInfo = context.tryCreateResource(logger,
         serviceIntf.getQualifiedSourceName() + ".rpc.log");
-    PrintWriter writer = new PrintWriter(pathInfo);
-    
-    typesSentFromBrowserBuilder.setLogOutputStream(pathInfo);
-    typesSentToBrowserBuilder.setLogOutputStream(pathInfo);
-    
-    writer.write("====================================\n");
-    writer.write("Types potentially sent from browser:\n");
-    writer.write("====================================\n\n");
-    writer.flush();
-    SerializableTypeOracle typesSentFromBrowser
-        = typesSentFromBrowserBuilder.build(logger);
-    
-    writer.write("===================================\n");
-    writer.write("Types potentially sent from server:\n");
-    writer.write("===================================\n\n");
-    writer.flush();
-    SerializableTypeOracle typesSentToBrowser
-        = typesSentToBrowserBuilder.build(logger);
-    
-    if (pathInfo != null) {
-      context.commitResource(logger, pathInfo).setPrivate(true);
+    PrintWriter writer = null;
+    SerializableTypeOracle typesSentFromBrowser;
+    SerializableTypeOracle typesSentToBrowser;    
+    try {
+      writer = new PrintWriter(pathInfo);
+
+      typesSentFromBrowserBuilder.setLogOutputStream(pathInfo);
+      typesSentToBrowserBuilder.setLogOutputStream(pathInfo);
+
+      writer.write("====================================\n");
+      writer.write("Types potentially sent from browser:\n");
+      writer.write("====================================\n\n");
+      writer.flush();
+      typesSentFromBrowser = typesSentFromBrowserBuilder.build(logger);
+
+      writer.write("===================================\n");
+      writer.write("Types potentially sent from server:\n");
+      writer.write("===================================\n\n");
+      writer.flush();
+      typesSentToBrowser = typesSentToBrowserBuilder.build(logger);
+      
+      if (pathInfo != null) {
+        context.commitResource(logger, pathInfo).setPrivate(true);
+      }
+    } finally {
+      if (writer != null) {
+        writer.close();
+      }
     }
 
     TypeSerializerCreator tsc = new TypeSerializerCreator(logger,
diff --git a/user/src/com/google/gwt/user/rebind/rpc/TypeConstrainer.java b/user/src/com/google/gwt/user/rebind/rpc/TypeConstrainer.java
index c089795..2f44123 100644
--- a/user/src/com/google/gwt/user/rebind/rpc/TypeConstrainer.java
+++ b/user/src/com/google/gwt/user/rebind/rpc/TypeConstrainer.java
@@ -207,12 +207,13 @@
           constraints);
     }
 
-    assert (type1Generic == null);
-    assert (type2Generic == null);
-    assert (type1Wild == null);
-    assert (type2Wild == null);
-    assert (type1Raw == null);
-    assert (type2Raw == null);
+    // The following assertions are known to be true, given the tests above.
+//    assert (type1Generic == null);
+//    assert (type2Generic == null);
+//    assert (type1Wild == null);
+//    assert (type2Wild == null);
+//    assert (type1Raw == null);
+//    assert (type2Raw == null);
 
     if (type1 == type2) {
       return true;
diff --git a/user/src/com/google/gwt/user/rebind/ui/ImageBundleGenerator.java b/user/src/com/google/gwt/user/rebind/ui/ImageBundleGenerator.java
index e3cd7f0..211cfd4 100644
--- a/user/src/com/google/gwt/user/rebind/ui/ImageBundleGenerator.java
+++ b/user/src/com/google/gwt/user/rebind/ui/ImageBundleGenerator.java
@@ -73,7 +73,7 @@
     boolean isResourcePresent(String resName);
   }
 
-  private class JMethodOracleImpl implements JMethodOracle {
+  private static class JMethodOracleImpl implements JMethodOracle {
     private final JMethod delegate;
 
     public JMethodOracleImpl(JMethod delegate) {
diff --git a/user/src/com/google/gwt/user/server/rpc/RemoteServiceServlet.java b/user/src/com/google/gwt/user/server/rpc/RemoteServiceServlet.java
index 85b559d..92f7eaf 100644
--- a/user/src/com/google/gwt/user/server/rpc/RemoteServiceServlet.java
+++ b/user/src/com/google/gwt/user/server/rpc/RemoteServiceServlet.java
@@ -48,9 +48,12 @@
    */
   protected static final String STRONG_NAME_HEADER = "X-GWT-Permutation";
 
-  private final ThreadLocal<HttpServletRequest> perThreadRequest = new ThreadLocal<HttpServletRequest>();
+  // ThreadLocal is not serializable, so mark these fields as transient and
+  // recreate them upon deserialization.
+  
+  private transient ThreadLocal<HttpServletRequest> perThreadRequest;
 
-  private final ThreadLocal<HttpServletResponse> perThreadResponse = new ThreadLocal<HttpServletResponse>();
+  private transient ThreadLocal<HttpServletResponse> perThreadResponse;
 
   /**
    * A cache of moduleBaseURL and serialization policy strong name to
@@ -74,11 +77,16 @@
   @Override
   public final void doPost(HttpServletRequest request,
       HttpServletResponse response) {
+    // Ensure the thread-local data fields have been initialized
+    
     try {
       // Store the request & response objects in thread-local storage.
       //
-      perThreadRequest.set(request);
-      perThreadResponse.set(response);
+      synchronized (this) {
+        validateThreadLocalData();
+        perThreadRequest.set(request);
+        perThreadResponse.set(response);
+      }
 
       // Read the request fully.
       //
@@ -304,14 +312,17 @@
   protected final String getPermutationStrongName() {
     return getThreadLocalRequest().getHeader(STRONG_NAME_HEADER);
   }
-
+  
   /**
    * Gets the <code>HttpServletRequest</code> object for the current call. It is
    * stored thread-locally so that simultaneous invocations can have different
    * request objects.
    */
   protected final HttpServletRequest getThreadLocalRequest() {
-    return perThreadRequest.get();
+    synchronized (this) {
+      validateThreadLocalData();
+      return perThreadRequest.get();
+    }
   }
 
   /**
@@ -320,7 +331,10 @@
    * different response objects.
    */
   protected final HttpServletResponse getThreadLocalResponse() {
-    return perThreadResponse.get();
+    synchronized (this) {
+      validateThreadLocalData();
+      return perThreadResponse.get();
+    }
   }
 
   /**
@@ -398,6 +412,22 @@
     }
   }
 
+  /**
+   * Initializes the perThreadRequest and perThreadResponse fields if they are
+   * null. This will occur the first time they are accessed after an instance of
+   * this class is constructed or deserialized.  This method should be called
+   * from within a 'synchronized(this) {}' block in order to ensure that
+   * only one thread creates the objects.
+   */
+  private void validateThreadLocalData() {
+    if (perThreadRequest == null) {
+      perThreadRequest = new ThreadLocal<HttpServletRequest>();
+    }
+    if (perThreadResponse == null) {
+      perThreadResponse = new ThreadLocal<HttpServletResponse>();
+    }
+  }
+
   private void writeResponse(HttpServletRequest request,
       HttpServletResponse response, String responsePayload) throws IOException {
     boolean gzipEncode = RPCServletUtils.acceptsGzipEncoding(request)
diff --git a/user/src/com/google/gwt/user/tools/util/CreatorUtilities.java b/user/src/com/google/gwt/user/tools/util/CreatorUtilities.java
index 2c9a802..d5b2f2f 100644
--- a/user/src/com/google/gwt/user/tools/util/CreatorUtilities.java
+++ b/user/src/com/google/gwt/user/tools/util/CreatorUtilities.java
@@ -22,6 +22,8 @@
 import java.net.MalformedURLException;
 import java.net.URL;
 import java.net.URLClassLoader;
+import java.security.AccessController;
+import java.security.PrivilegedAction;
 import java.util.ArrayList;
 import java.util.List;
 
@@ -140,9 +142,14 @@
      * that the current class loader will contain the same gwt.xml module def
      * files.
      */
-    URL urlArray[] = urlList.toArray(new URL[urlList.size()]);
-    URLClassLoader classLoader = new URLClassLoader(urlArray,
-        CreatorUtilities.class.getClassLoader());
+    final URL urlArray[] = urlList.toArray(new URL[urlList.size()]);
+    URLClassLoader classLoader = AccessController.doPrivileged(
+        new PrivilegedAction<URLClassLoader>() {
+      public URLClassLoader run() {
+        return new URLClassLoader(urlArray,
+            CreatorUtilities.class.getClassLoader());
+      }
+    });
     if (moduleList != null) {
       for (String module : moduleList) {
         String modulePath = module.replace(".", "/")
diff --git a/user/super/com/google/gwt/emul/java/lang/Byte.java b/user/super/com/google/gwt/emul/java/lang/Byte.java
index 4033f80..4d6b757 100644
--- a/user/super/com/google/gwt/emul/java/lang/Byte.java
+++ b/user/super/com/google/gwt/emul/java/lang/Byte.java
@@ -33,7 +33,7 @@
   }
 
   public static Byte decode(String s) throws NumberFormatException {
-    return new Byte((byte) __decodeAndValidateInt(s, MIN_VALUE, MAX_VALUE));
+    return Byte.valueOf((byte) __decodeAndValidateInt(s, MIN_VALUE, MAX_VALUE));
   }
 
   /**
@@ -69,11 +69,11 @@
   }
 
   public static Byte valueOf(String s) throws NumberFormatException {
-    return new Byte(Byte.parseByte(s));
+    return Byte.valueOf(Byte.parseByte(s));
   }
 
   public static Byte valueOf(String s, int radix) throws NumberFormatException {
-    return new Byte(Byte.parseByte(s, radix));
+    return Byte.valueOf(Byte.parseByte(s, radix));
   }
 
   private final transient byte value;
diff --git a/user/super/com/google/gwt/emul/java/lang/Integer.java b/user/super/com/google/gwt/emul/java/lang/Integer.java
index 6a4c1ad..aa4ed50 100644
--- a/user/super/com/google/gwt/emul/java/lang/Integer.java
+++ b/user/super/com/google/gwt/emul/java/lang/Integer.java
@@ -57,7 +57,7 @@
   }
 
   public static Integer decode(String s) throws NumberFormatException {
-    return new Integer((int) __decodeAndValidateInt(s, MIN_VALUE, MAX_VALUE));
+    return Integer.valueOf((int) __decodeAndValidateInt(s, MIN_VALUE, MAX_VALUE));
   }
 
   /**
@@ -216,12 +216,12 @@
   }
 
   public static Integer valueOf(String s) throws NumberFormatException {
-    return new Integer(Integer.parseInt(s));
+    return Integer.valueOf(Integer.parseInt(s));
   }
 
   public static Integer valueOf(String s, int radix)
       throws NumberFormatException {
-    return new Integer(Integer.parseInt(s, radix));
+    return Integer.valueOf(Integer.parseInt(s, radix));
   }
 
   private static String toPowerOfTwoString(int value, int shift) {
diff --git a/user/super/com/google/gwt/emul/java/lang/Short.java b/user/super/com/google/gwt/emul/java/lang/Short.java
index a27fa68..945fd75 100644
--- a/user/super/com/google/gwt/emul/java/lang/Short.java
+++ b/user/super/com/google/gwt/emul/java/lang/Short.java
@@ -33,7 +33,7 @@
   }
 
   public static Short decode(String s) throws NumberFormatException {
-    return new Short((short) __decodeAndValidateInt(s, MIN_VALUE, MAX_VALUE));
+    return Short.valueOf((short) __decodeAndValidateInt(s, MIN_VALUE, MAX_VALUE));
   }
 
   /**
@@ -73,11 +73,11 @@
   }
 
   public static Short valueOf(String s) throws NumberFormatException {
-    return new Short(Short.parseShort(s));
+    return Short.valueOf(Short.parseShort(s));
   }
 
   public static Short valueOf(String s, int radix) throws NumberFormatException {
-    return new Short(Short.parseShort(s, radix));
+    return Short.valueOf(Short.parseShort(s, radix));
   }
 
   private final transient short value;
diff --git a/user/super/com/google/gwt/emul/java/lang/String.java b/user/super/com/google/gwt/emul/java/lang/String.java
index 8296a16..1190b9e 100644
--- a/user/super/com/google/gwt/emul/java/lang/String.java
+++ b/user/super/com/google/gwt/emul/java/lang/String.java
@@ -141,6 +141,7 @@
         hashCode += str.charAt(i);
       }
       // force to 32-bits
+      // TODO: make a JSNI call in case JDT gets smart about removing this
       hashCode |= 0;
       return hashCode;
     }
diff --git a/user/super/com/google/gwt/emul/java/sql/Timestamp.java b/user/super/com/google/gwt/emul/java/sql/Timestamp.java
index 59b5b06..369f0c2 100644
--- a/user/super/com/google/gwt/emul/java/sql/Timestamp.java
+++ b/user/super/com/google/gwt/emul/java/sql/Timestamp.java
@@ -89,6 +89,7 @@
         || (getTime() == ts.getTime() && getNanos() < ts.getNanos());
   }
 
+  @Override
   public int compareTo(java.util.Date o) {
     // JavaDoc says a ClassCastException is correct behavior
     return compareTo((Timestamp) o);
@@ -99,8 +100,10 @@
     return delta == 0 ? getNanos() - o.getNanos() : delta;
   }
 
+  @Override
   public boolean equals(Object ts) {
     // Timestamps can't be compared to java.util.Date
+    // This is known to not be symmetric, which follows the JRE.
     return ts instanceof Timestamp ? equals((Timestamp) ts) : false;
   }
 
@@ -112,10 +115,12 @@
     return nanos;
   }
 
+  @Override
   public long getTime() {
     return super.getTime();
   }
 
+  @Override
   public int hashCode() {
     // This is correct, per the Javadoc
     return super.hashCode();
@@ -131,11 +136,13 @@
     super.setTime((getTime() / 1000) * 1000 + (nanos / 1000000));
   }
 
+  @Override
   public void setTime(long time) {
     super.setTime(time);
     nanos = (((int) (time % 1000)) * 1000000);
   }
 
+  @Override
   public String toString() {
     return String.valueOf(1900 + getYear()) + "-" + padTwo(1 + getMonth())
         + "-" + padTwo(getDate()) + " " + padTwo(getHours()) + ":"
diff --git a/user/super/com/google/gwt/emul/java/util/Arrays.java b/user/super/com/google/gwt/emul/java/util/Arrays.java
index a7a2a70..15d39f4 100644
--- a/user/super/com/google/gwt/emul/java/util/Arrays.java
+++ b/user/super/com/google/gwt/emul/java/util/Arrays.java
@@ -1175,7 +1175,7 @@
             b.append(deepToString(objArray, tempSet));
           }
         } else if (obj instanceof boolean[]) {
-          b.append(toString((byte[]) obj));
+          b.append(toString((boolean[]) obj));
         } else if (obj instanceof byte[]) {
           b.append(toString((byte[]) obj));
         } else if (obj instanceof char[]) {
diff --git a/user/super/com/google/gwt/emul/java/util/Collections.java b/user/super/com/google/gwt/emul/java/util/Collections.java
index fdb3c9a..52d5f98 100644
--- a/user/super/com/google/gwt/emul/java/util/Collections.java
+++ b/user/super/com/google/gwt/emul/java/util/Collections.java
@@ -358,10 +358,20 @@
       return sortedMap.comparator();
     }
 
+    @Override
+    public boolean equals(Object o) {
+      return sortedMap.equals(o);
+    }
+
     public K firstKey() {
       return sortedMap.firstKey();
     }
 
+    @Override
+    public int hashCode() {
+      return sortedMap.hashCode();
+    }
+
     public SortedMap<K, V> headMap(K toKey) {
       return new UnmodifiableSortedMap<K, V>(sortedMap.headMap(toKey));
     }
@@ -369,11 +379,11 @@
     public K lastKey() {
       return sortedMap.lastKey();
     }
-
+    
     public SortedMap<K, V> subMap(K fromKey, K toKey) {
       return new UnmodifiableSortedMap<K, V>(sortedMap.subMap(fromKey, toKey));
     }
-
+    
     public SortedMap<K, V> tailMap(K fromKey) {
       return new UnmodifiableSortedMap<K, V>(sortedMap.tailMap(fromKey));
     }
@@ -392,10 +402,20 @@
     public Comparator<? super E> comparator() {
       return sortedSet.comparator();
     }
+    
+    @Override
+    public boolean equals(Object o) {
+      return sortedSet.equals(o);
+    }
 
     public E first() {
       return sortedSet.first();
     }
+    
+    @Override
+    public int hashCode() {
+      return sortedSet.hashCode();
+    }
 
     public SortedSet<E> headSet(E toElement) {
       return new UnmodifiableSortedSet<E>(sortedSet.headSet(toElement));
diff --git a/user/super/com/google/gwt/emul/java/util/LinkedHashMap.java b/user/super/com/google/gwt/emul/java/util/LinkedHashMap.java
index d061f78..a7080d8 100644
--- a/user/super/com/google/gwt/emul/java/util/LinkedHashMap.java
+++ b/user/super/com/google/gwt/emul/java/util/LinkedHashMap.java
@@ -15,7 +15,6 @@
  */
 package java.util;
 
-
 /**
  * Hash table implementation of the Map interface with predictable iteration
  * order. <a
diff --git a/user/super/com/google/gwt/emul/java/util/TreeMap.java b/user/super/com/google/gwt/emul/java/util/TreeMap.java
index d25c200..43b810a 100644
--- a/user/super/com/google/gwt/emul/java/util/TreeMap.java
+++ b/user/super/com/google/gwt/emul/java/util/TreeMap.java
@@ -903,6 +903,13 @@
     return node != null && node.isRed;
   }
 
+  /**
+   * Remove a key from the tree, returning whether it was found and its value.
+   * 
+   * @param key key to remove
+   * @param state return state, not null
+   * @return true if the value was found
+   */
   private boolean removeWithState(K key, State<V> state) {
     if (root == null) {
       return false;
@@ -956,10 +963,8 @@
     }
 
     if (found != null) {
-      if (state != null) {
-        state.found = true;
-        state.value = found.value;
-      }
+      state.found = true;
+      state.value = found.value;
       /**
        * put the "node" values in "found" (the node with key K) and cut "node"
        * out. However, we do not want to corrupt "found" -- issue 3423. So
diff --git a/user/super/com/google/gwt/junit/translatable/com/google/gwt/junit/client/impl/GWTRunner.java b/user/super/com/google/gwt/junit/translatable/com/google/gwt/junit/client/impl/GWTRunner.java
index aae21e0..ae70235 100644
--- a/user/super/com/google/gwt/junit/translatable/com/google/gwt/junit/client/impl/GWTRunner.java
+++ b/user/super/com/google/gwt/junit/translatable/com/google/gwt/junit/client/impl/GWTRunner.java
@@ -101,6 +101,8 @@
    */
   private boolean serverless = false;
 
+  // TODO(FINDBUGS): can this be a private constructor to avoid multiple
+  // instances?
   public GWTRunner() {
     sInstance = this;
 
diff --git a/user/super/com/google/gwt/junit/translatable/junit/framework/Assert.java b/user/super/com/google/gwt/junit/translatable/junit/framework/Assert.java
index fd3a5e1..d57fc6f 100644
--- a/user/super/com/google/gwt/junit/translatable/junit/framework/Assert.java
+++ b/user/super/com/google/gwt/junit/translatable/junit/framework/Assert.java
@@ -60,11 +60,11 @@
   }
 
   public static void assertEquals(String str, byte obj1, byte obj2) {
-    assertEquals(str, new Byte(obj1), new Byte(obj2));
+    assertEquals(str, Byte.valueOf(obj1), Byte.valueOf(obj2));
   }
 
   public static void assertEquals(String str, char obj1, char obj2) {
-    assertEquals(str, new Character(obj1), new Character(obj2));
+    assertEquals(str, Character.valueOf(obj1), Character.valueOf(obj2));
   }
 
   public static void assertEquals(String str, double obj1, double obj2,
@@ -112,7 +112,7 @@
   }
 
   public static void assertEquals(String str, short obj1, short obj2) {
-    assertEquals(str, new Short(obj1), new Short(obj2));
+    assertEquals(str, Short.valueOf(obj1), Short.valueOf(obj2));
   }
 
   public static void assertEquals(String obj1, String obj2) {
diff --git a/user/test/com/google/gwt/core/ext/test/IFrameLinkerTest.java b/user/test/com/google/gwt/core/ext/test/IFrameLinkerTest.java
index d4b8f88..7389c8a 100644
--- a/user/test/com/google/gwt/core/ext/test/IFrameLinkerTest.java
+++ b/user/test/com/google/gwt/core/ext/test/IFrameLinkerTest.java
@@ -15,7 +15,6 @@
  */
 package com.google.gwt.core.ext.test;
 
-
 /**
  * Tests the iframe-based linker.
  */
diff --git a/user/test/com/google/gwt/core/ext/test/SingleScriptLinkerTest.java b/user/test/com/google/gwt/core/ext/test/SingleScriptLinkerTest.java
index 4f9a3ac..e183c73 100644
--- a/user/test/com/google/gwt/core/ext/test/SingleScriptLinkerTest.java
+++ b/user/test/com/google/gwt/core/ext/test/SingleScriptLinkerTest.java
@@ -15,7 +15,6 @@
  */
 package com.google.gwt.core.ext.test;
 
-
 /**
  * Tests the single-script linker.
  */
diff --git a/user/test/com/google/gwt/core/ext/test/XSLinkerTest.java b/user/test/com/google/gwt/core/ext/test/XSLinkerTest.java
index d9bf3ac..9b9d019 100644
--- a/user/test/com/google/gwt/core/ext/test/XSLinkerTest.java
+++ b/user/test/com/google/gwt/core/ext/test/XSLinkerTest.java
@@ -15,7 +15,6 @@
  */
 package com.google.gwt.core.ext.test;
 
-
 /**
  * Tests the cross-site linker.
  */
diff --git a/user/test/com/google/gwt/dev/jjs/test/CompilerTest.java b/user/test/com/google/gwt/dev/jjs/test/CompilerTest.java
index d62627f..5413ff8 100644
--- a/user/test/com/google/gwt/dev/jjs/test/CompilerTest.java
+++ b/user/test/com/google/gwt/dev/jjs/test/CompilerTest.java
@@ -1083,6 +1083,7 @@
     switch (i) {
       case 1:
         i = 2;
+        // fallthrough
       case 2:
         break;
       case 3:
diff --git a/user/test/com/google/gwt/dev/jjs/test/CoverageTest.java b/user/test/com/google/gwt/dev/jjs/test/CoverageTest.java
index 17f21bd..1f71d9b 100644
--- a/user/test/com/google/gwt/dev/jjs/test/CoverageTest.java
+++ b/user/test/com/google/gwt/dev/jjs/test/CoverageTest.java
@@ -308,12 +308,16 @@
       switch (j) {
         case 1:
           ++i;
+          // fallthrough
         case 2:
           i += 2;
+          // fallthrough
         case 3:
           i += 3;
+          // fallthrough
         case 4:
           i += 4;
+          // fallthrough
         default:
           i += 0;
       }
diff --git a/user/test/com/google/gwt/dev/jjs/test/JsniConstructorTest.java b/user/test/com/google/gwt/dev/jjs/test/JsniConstructorTest.java
index 657b2ae..485a345 100644
--- a/user/test/com/google/gwt/dev/jjs/test/JsniConstructorTest.java
+++ b/user/test/com/google/gwt/dev/jjs/test/JsniConstructorTest.java
@@ -67,7 +67,7 @@
     }
 
     public String toString() {
-      return null;
+      return "";
     }
   }
 
diff --git a/user/test/com/google/gwt/dev/jjs/test/MemberShadowingTest.java b/user/test/com/google/gwt/dev/jjs/test/MemberShadowingTest.java
index 60adcde..45f1f6f 100644
--- a/user/test/com/google/gwt/dev/jjs/test/MemberShadowingTest.java
+++ b/user/test/com/google/gwt/dev/jjs/test/MemberShadowingTest.java
@@ -71,7 +71,6 @@
     public int a;
   }
 
-  
   /**
    * TODO: document me.
    */
diff --git a/user/test/com/google/gwt/emultest/java/lang/CharacterTest.java b/user/test/com/google/gwt/emultest/java/lang/CharacterTest.java
index c8a615c..6a24ce6 100644
--- a/user/test/com/google/gwt/emultest/java/lang/CharacterTest.java
+++ b/user/test/com/google/gwt/emultest/java/lang/CharacterTest.java
@@ -51,7 +51,6 @@
     }
   }
 
-
   /**
    * Helper class which applies some arbitrary char mutation function
    * to a string and returns it.
diff --git a/user/test/com/google/gwt/http/server/RequestBuilderTestServlet.java b/user/test/com/google/gwt/http/server/RequestBuilderTestServlet.java
index 4ba06c8..8101b5d 100644
--- a/user/test/com/google/gwt/http/server/RequestBuilderTestServlet.java
+++ b/user/test/com/google/gwt/http/server/RequestBuilderTestServlet.java
@@ -127,7 +127,7 @@
       throws IOException {
     BufferedReader reader = request.getReader();
     String content = reader.readLine();
-    if (content.equals("<html><body>Put Me</body></html>")) {
+    if (content != null && content.equals("<html><body>Put Me</body></html>")) {
       response.getWriter().print(RequestBuilderTest.SERVLET_PUT_RESPONSE);
       response.setStatus(HttpServletResponse.SC_OK);
     } else {
diff --git a/user/test/com/google/gwt/i18n/client/TestAnnotatedMessages.java b/user/test/com/google/gwt/i18n/client/TestAnnotatedMessages.java
index 7c0d56c..55210ce 100644
--- a/user/test/com/google/gwt/i18n/client/TestAnnotatedMessages.java
+++ b/user/test/com/google/gwt/i18n/client/TestAnnotatedMessages.java
@@ -80,12 +80,12 @@
   String getTimeDate(Date value);
 
   @DefaultMessage("{0} widgets")
-  @PluralText( {"one", "A widget"})
+  @PluralText({"one", "A widget"})
   String pluralWidgetsOther(@PluralCount
   int count);
 
   @DefaultMessage("{1} {0}")
-  @PluralText( {"one", "A {0}"})
+  @PluralText({"one", "A {0}"})
   String twoParamPlural(String name, @PluralCount
   int count);
 }
diff --git a/user/test/com/google/gwt/jsonp/client/JsonpRequestTest.java b/user/test/com/google/gwt/jsonp/client/JsonpRequestTest.java
index 7784827..a5330f8 100644
--- a/user/test/com/google/gwt/jsonp/client/JsonpRequestTest.java
+++ b/user/test/com/google/gwt/jsonp/client/JsonpRequestTest.java
@@ -67,7 +67,7 @@
   /**
    * Checks that a timeout happens.
    */
-  private class AssertTimeoutException<T> implements AsyncCallback<T> {
+  private class AssertTimeoutExceptionCallback<T> implements AsyncCallback<T> {
     public void onFailure(Throwable throwable) {
       assertTrue(throwable instanceof TimeoutException);
       finishTest();
@@ -165,7 +165,7 @@
   }
 
   public void testTimeout() {
-    jsonp.requestString(echoTimeout(), new AssertTimeoutException<String>());
+    jsonp.requestString(echoTimeout(), new AssertTimeoutExceptionCallback<String>());
     delayTestFinish(2000);
   }
 
diff --git a/user/test/com/google/gwt/junit/client/BenchmarkTest.java b/user/test/com/google/gwt/junit/client/BenchmarkTest.java
index a5260c8..9cb190a 100644
--- a/user/test/com/google/gwt/junit/client/BenchmarkTest.java
+++ b/user/test/com/google/gwt/junit/client/BenchmarkTest.java
@@ -135,8 +135,8 @@
    * Tests {@link Setup} and {@link Teardown}.
    * 
    */
-  @Setup("setup")
-  @Teardown("teardown")
+  @Setup("customSetup")
+  @Teardown("customTeardown")
   public void testSetupAndTeardown() {
     assertEquals("setup", stateString);
     stateString = "running";
@@ -165,12 +165,12 @@
     assertTrue(intTwo >= 10 && intTwo <= 1000 && intTwo % 10 == 0);
   }
 
-  protected void setup() {
+  protected void customSetup() {
     assertNull(stateString);
     stateString = "setup";
   }
 
-  protected void teardown() {
+  protected void customTeardown() {
     assertNotNull(stateString);
     assertTrue(stateString.equals("running") || stateString.equals("setup"));
     stateString = null;
diff --git a/user/test/com/google/gwt/user/client/CommandExecutorTest.java b/user/test/com/google/gwt/user/client/CommandExecutorTest.java
index d96a761..ca18dc7 100644
--- a/user/test/com/google/gwt/user/client/CommandExecutorTest.java
+++ b/user/test/com/google/gwt/user/client/CommandExecutorTest.java
@@ -97,8 +97,7 @@
 
     UncaughtExceptionHandler ueh1 = new UncaughtExceptionHandler() {
       public void onUncaughtException(Throwable e) {
-        if (!(e instanceof CommandCanceledException)
-            && !(e instanceof IncrementalCommandCanceledException)) {
+        if (!(e instanceof CommandCanceledException)) {
           originalUEH.onUncaughtException(e);
           return;
         }
@@ -206,7 +205,7 @@
 
     UncaughtExceptionHandler ueh1 = new UncaughtExceptionHandler() {
       public void onUncaughtException(Throwable e) {
-        if (!(e instanceof CommandCanceledException || e instanceof IncrementalCommandCanceledException)) {
+        if (!(e instanceof IncrementalCommandCanceledException)) {
           originalUEH.onUncaughtException(e);
           return;
         }
diff --git a/user/test/com/google/gwt/user/client/CookieTest.java b/user/test/com/google/gwt/user/client/CookieTest.java
index 15be1a7..918072f 100644
--- a/user/test/com/google/gwt/user/client/CookieTest.java
+++ b/user/test/com/google/gwt/user/client/CookieTest.java
@@ -54,8 +54,6 @@
     assertEquals(Cookies.getCookie("notpresent"), null);
   }
   
-  
-  
   /*
    * Test that the cookie will expire correctly after a set amount of time,
    * but does not expire before that time. 
diff --git a/user/test/com/google/gwt/user/client/Profile.java b/user/test/com/google/gwt/user/client/Profile.java
index 8fafb13..8a1a45d 100644
--- a/user/test/com/google/gwt/user/client/Profile.java
+++ b/user/test/com/google/gwt/user/client/Profile.java
@@ -24,16 +24,20 @@
  * TODO: document me.
  */
 public abstract class Profile extends GWTTestCase {
+  
+  /**
+   * An enumeration defining the possible report types.
+   */
+  public enum ReportType {
+    REPORT_TO_BROWSER, REPORT_TO_EXCEL, REPORT_TO_WIKI
+  }
 
-  public static String REPORT_TO_BROWSER = "Report to Browser";
-  public static String REPORT_TO_EXCEL = "Report to Excel";
-  public static String REPORT_TO_WIKI = "Report to Wiki";
   private static String browser;
-  private static String reportType = REPORT_TO_WIKI;
+  private static ReportType reportType = ReportType.REPORT_TO_WIKI;
   private static double time;
 
-  public static void setReportType(String s) {
-    reportType = s;
+  public static void setReportType(ReportType type) {
+    reportType = type;
   }
 
   private void browserTiming(String s) {
@@ -51,16 +55,20 @@
 
   protected void timing(String s) {
     double elapsed = Duration.currentTimeMillis() - time;
-    if (reportType == REPORT_TO_BROWSER) {
-      browserTiming(s);
-    } else if (reportType == REPORT_TO_WIKI) {
-      this.addCheckpoint("|" + browser + "|" + s + "|" + elapsed
-          + " milliseconds|");
-    } else if (reportType == REPORT_TO_EXCEL) {
-      s = s.replace('|', '\t');
-      this.addCheckpoint(browser + "\t" + s + "\t" + elapsed);
-    } else {
-      throw new IllegalStateException("Should not ever get here");
+    switch (reportType) {
+      case REPORT_TO_BROWSER:
+        browserTiming(s);
+        break;
+      case REPORT_TO_WIKI:
+        this.addCheckpoint("|" + browser + "|" + s + "|" + elapsed
+            + " milliseconds|");
+        break;
+      case REPORT_TO_EXCEL:
+        s = s.replace('|', '\t');
+        this.addCheckpoint(browser + "\t" + s + "\t" + elapsed);
+        break;
+      default:
+        throw new IllegalStateException("Should not ever get here");
     }
   }
 
diff --git a/user/test/com/google/gwt/user/client/rpc/InheritanceTestServiceAsync.java b/user/test/com/google/gwt/user/client/rpc/InheritanceTestServiceAsync.java
index 5630faa..4d6d0f1 100644
--- a/user/test/com/google/gwt/user/client/rpc/InheritanceTestServiceAsync.java
+++ b/user/test/com/google/gwt/user/client/rpc/InheritanceTestServiceAsync.java
@@ -21,7 +21,6 @@
 import com.google.gwt.user.client.rpc.InheritanceTestSetFactory.SerializableClass;
 import com.google.gwt.user.client.rpc.InheritanceTestSetFactory.SerializableClassWithTransientField;
 
-
 /**
  * Async service interface used by the
  * {@link com.google.gwt.user.client.rpc.InheritanceTest InheritanceTest} unit
diff --git a/user/test/com/google/gwt/user/client/rpc/InheritanceTestServiceSubtypeAsync.java b/user/test/com/google/gwt/user/client/rpc/InheritanceTestServiceSubtypeAsync.java
index 4757406..66ec765 100644
--- a/user/test/com/google/gwt/user/client/rpc/InheritanceTestServiceSubtypeAsync.java
+++ b/user/test/com/google/gwt/user/client/rpc/InheritanceTestServiceSubtypeAsync.java
@@ -20,5 +20,5 @@
  */
 public interface InheritanceTestServiceSubtypeAsync extends
     InheritanceTestServiceAsync {
-  public void foo(AsyncCallback callback);
+  void foo(AsyncCallback callback);
 }
diff --git a/user/test/com/google/gwt/user/client/rpc/ManuallySerializedClass_CustomFieldSerializer.java b/user/test/com/google/gwt/user/client/rpc/ManuallySerializedClass_CustomFieldSerializer.java
index 70c2495..61ec28d 100644
--- a/user/test/com/google/gwt/user/client/rpc/ManuallySerializedClass_CustomFieldSerializer.java
+++ b/user/test/com/google/gwt/user/client/rpc/ManuallySerializedClass_CustomFieldSerializer.java
@@ -27,7 +27,7 @@
     instance.setB(streamReader.readInt());
     instance.setC(streamReader.readInt());
     instance.setString(streamReader.readString());
-    instance.setStackTraceElement((StackTraceElement)streamReader.readObject());
+    instance.setStackTraceElement((StackTraceElement) streamReader.readObject());
   }
 
   public static void serialize(SerializationStreamWriter streamWriter,
diff --git a/user/test/com/google/gwt/user/client/ui/AnchorTest.java b/user/test/com/google/gwt/user/client/ui/AnchorTest.java
index c98d156..ff15450 100644
--- a/user/test/com/google/gwt/user/client/ui/AnchorTest.java
+++ b/user/test/com/google/gwt/user/client/ui/AnchorTest.java
@@ -26,7 +26,7 @@
  * Tests for {@link Anchor}.
  */
 public class AnchorTest extends GWTTestCase {
-  private final class TestClickHandler implements ClickHandler {
+  private static final class TestClickHandler implements ClickHandler {
     private int clicks = 0;
     private Object lastSender;
 
@@ -78,7 +78,7 @@
   }
 
   @Deprecated
-  private final class TestClickListener implements ClickListener {
+  private static final class TestClickListener implements ClickListener {
     private int clicks = 0;
     private Widget lastSender;
 
diff --git a/user/test/com/google/gwt/user/client/ui/ButtonTest.java b/user/test/com/google/gwt/user/client/ui/ButtonTest.java
index 9ba6cef..0fcf4dd 100644
--- a/user/test/com/google/gwt/user/client/ui/ButtonTest.java
+++ b/user/test/com/google/gwt/user/client/ui/ButtonTest.java
@@ -29,7 +29,7 @@
     return "com.google.gwt.user.User";
   }
 
-  private class H implements ClickHandler {
+  private static class H implements ClickHandler {
     boolean clicked;
     EventTarget target;
 
diff --git a/user/test/com/google/gwt/user/client/ui/CreateEventTest.java b/user/test/com/google/gwt/user/client/ui/CreateEventTest.java
index 09a06f9..793b0ae 100644
--- a/user/test/com/google/gwt/user/client/ui/CreateEventTest.java
+++ b/user/test/com/google/gwt/user/client/ui/CreateEventTest.java
@@ -150,7 +150,7 @@
    * An event listener that asserts that events are received properly for the
    * img element.
    */
-  private class ImgEventListener implements EventListener {
+  private static class ImgEventListener implements EventListener {
     private boolean imgReceived;
     private final String eventType;
 
diff --git a/user/test/com/google/gwt/user/client/ui/DelegatingKeyboardListenerCollectionTest.java b/user/test/com/google/gwt/user/client/ui/DelegatingKeyboardListenerCollectionTest.java
index 2f49814..6c73661 100644
--- a/user/test/com/google/gwt/user/client/ui/DelegatingKeyboardListenerCollectionTest.java
+++ b/user/test/com/google/gwt/user/client/ui/DelegatingKeyboardListenerCollectionTest.java
@@ -28,7 +28,7 @@
    * A {@link Widget} that uses the {@link DelegatingKeyboardListenerCollection}
    * to save its list of keyboard events.
    */
-  public class DelegatingWidget extends Widget {
+  public static class DelegatingWidget extends Widget {
     // The delegating collection of keyboard listeners
     private DelegatingKeyboardListenerCollection keyboardListeners;
 
diff --git a/user/test/com/google/gwt/user/client/ui/HTMLTableTestBase.java b/user/test/com/google/gwt/user/client/ui/HTMLTableTestBase.java
index 2874c8b..9e31ea3 100644
--- a/user/test/com/google/gwt/user/client/ui/HTMLTableTestBase.java
+++ b/user/test/com/google/gwt/user/client/ui/HTMLTableTestBase.java
@@ -20,6 +20,7 @@
 import com.google.gwt.user.client.ui.HTMLTable.CellFormatter;
 import com.google.gwt.user.client.ui.HTMLTable.RowFormatter;
 
+import java.util.Arrays;
 import java.util.Iterator;
 import java.util.List;
 
@@ -46,7 +47,7 @@
    */
   protected static void assertEquals(Object[] array, List<?> target) {
     if (target.size() != array.length) {
-      fail(target + " should be the same length as" + array);
+      fail(target + " should be the same length as" + Arrays.toString(array));
     }
     for (int i = 0; i < array.length; i++) {
       assertEquals(target.get(i), array[i]);
diff --git a/user/test/com/google/gwt/user/client/ui/PopupTest.java b/user/test/com/google/gwt/user/client/ui/PopupTest.java
index 7d8768c..33ed174 100644
--- a/user/test/com/google/gwt/user/client/ui/PopupTest.java
+++ b/user/test/com/google/gwt/user/client/ui/PopupTest.java
@@ -30,7 +30,7 @@
   /**
    * Expose otherwise private or protected methods.
    */
-  private class TestablePopupPanel extends PopupPanel {
+  private static class TestablePopupPanel extends PopupPanel {
     private int onLoadCount;
 
     @Override
diff --git a/user/test/com/google/gwt/user/datepicker/client/DateChangeEventTest.java b/user/test/com/google/gwt/user/datepicker/client/DateChangeEventTest.java
index 9c68c69..7683c67 100644
--- a/user/test/com/google/gwt/user/datepicker/client/DateChangeEventTest.java
+++ b/user/test/com/google/gwt/user/datepicker/client/DateChangeEventTest.java
@@ -33,7 +33,7 @@
  */

 public class DateChangeEventTest extends TestCase {

 

-  private class MockWidget implements HasValue<Date> {

+  private static class MockWidget implements HasValue<Date> {

     private final HandlerManager handlers = new HandlerManager(this);

     private Date value;

 

diff --git a/user/test/com/google/gwt/user/rebind/rpc/testcases/client/NotAllSubtypesAreSerializable.java b/user/test/com/google/gwt/user/rebind/rpc/testcases/client/NotAllSubtypesAreSerializable.java
index 78cb5e2..0dfdab8 100644
--- a/user/test/com/google/gwt/user/rebind/rpc/testcases/client/NotAllSubtypesAreSerializable.java
+++ b/user/test/com/google/gwt/user/rebind/rpc/testcases/client/NotAllSubtypesAreSerializable.java
@@ -14,7 +14,6 @@
  * the License.
  */
 
-
 package com.google.gwt.user.rebind.rpc.testcases.client;
 
 import com.google.gwt.user.client.rpc.IsSerializable;
diff --git a/user/test/com/google/gwt/user/rebind/rpc/testcases/client/ObjectInMethodSignature.java b/user/test/com/google/gwt/user/rebind/rpc/testcases/client/ObjectInMethodSignature.java
index 37f113f..c99c705 100644
--- a/user/test/com/google/gwt/user/rebind/rpc/testcases/client/ObjectInMethodSignature.java
+++ b/user/test/com/google/gwt/user/rebind/rpc/testcases/client/ObjectInMethodSignature.java
@@ -14,7 +14,6 @@
  * the License.
  */
 
-
 package com.google.gwt.user.rebind.rpc.testcases.client;
 
 import com.google.gwt.user.client.rpc.RemoteService;
diff --git a/user/test/com/google/gwt/user/server/rpc/CollectionsTestServiceImpl.java b/user/test/com/google/gwt/user/server/rpc/CollectionsTestServiceImpl.java
index d02c6e1..9687d4d 100644
--- a/user/test/com/google/gwt/user/server/rpc/CollectionsTestServiceImpl.java
+++ b/user/test/com/google/gwt/user/server/rpc/CollectionsTestServiceImpl.java
@@ -66,7 +66,7 @@
     boolean[] expected = TestSetFactory.createPrimitiveBooleanArray();
     if (!TestSetValidator.equals(expected, actual)) {
       throw new CollectionsTestServiceException("expected: "
-          + expected.toString() + " actual: " + actual.toString());
+          + Arrays.toString(expected) + " actual: " + Arrays.toString(actual));
     }
 
     return actual;
@@ -77,7 +77,7 @@
     Boolean[] expected = TestSetFactory.createBooleanArray();
     if (!TestSetValidator.equals(expected, actual)) {
       throw new CollectionsTestServiceException("expected: "
-          + expected.toString() + " actual: " + actual.toString());
+          + Arrays.toString(expected) + " actual: " + Arrays.toString(actual));
     }
 
     return actual;
@@ -87,7 +87,7 @@
     byte[] expected = TestSetFactory.createPrimitiveByteArray();
     if (!TestSetValidator.equals(expected, actual)) {
       throw new CollectionsTestServiceException("expected: "
-          + expected.toString() + " actual: " + actual.toString());
+          + Arrays.toString(expected) + " actual: " + Arrays.toString(actual));
     }
 
     return actual;
@@ -97,7 +97,7 @@
     Byte[] expected = TestSetFactory.createByteArray();
     if (!TestSetValidator.equals(expected, actual)) {
       throw new CollectionsTestServiceException("expected: "
-          + expected.toString() + " actual: " + actual.toString());
+          + Arrays.toString(expected) + " actual: " + Arrays.toString(actual));
     }
 
     return actual;
@@ -107,7 +107,7 @@
     char[] expected = TestSetFactory.createPrimitiveCharArray();
     if (!TestSetValidator.equals(expected, actual)) {
       throw new CollectionsTestServiceException("expected: "
-          + expected.toString() + " actual: " + actual.toString());
+          + Arrays.toString(expected) + " actual: " + Arrays.toString(actual));
     }
 
     return actual;
@@ -118,7 +118,7 @@
     Character[] expected = TestSetFactory.createCharArray();
     if (!TestSetValidator.equals(expected, actual)) {
       throw new CollectionsTestServiceException("expected: "
-          + expected.toString() + " actual: " + actual.toString());
+          + Arrays.toString(expected) + " actual: " + Arrays.toString(actual));
     }
 
     return actual;
@@ -138,7 +138,7 @@
     double[] expected = TestSetFactory.createPrimitiveDoubleArray();
     if (!TestSetValidator.equals(expected, actual)) {
       throw new CollectionsTestServiceException("expected: "
-          + expected.toString() + " actual: " + actual.toString());
+          + Arrays.toString(expected) + " actual: " + Arrays.toString(actual));
     }
 
     return actual;
@@ -148,7 +148,7 @@
     Double[] expected = TestSetFactory.createDoubleArray();
     if (!TestSetValidator.equals(expected, actual)) {
       throw new CollectionsTestServiceException("expected: "
-          + expected.toString() + " actual: " + actual.toString());
+          + Arrays.toString(expected) + " actual: " + Arrays.toString(actual));
     }
 
     return actual;
@@ -158,7 +158,7 @@
     float[] expected = TestSetFactory.createPrimitiveFloatArray();
     if (!TestSetValidator.equals(expected, actual)) {
       throw new CollectionsTestServiceException("expected: "
-          + expected.toString() + " actual: " + actual.toString());
+          + Arrays.toString(expected) + " actual: " + Arrays.toString(actual));
     }
 
     return actual;
@@ -168,7 +168,7 @@
     Float[] expected = TestSetFactory.createFloatArray();
     if (!TestSetValidator.equals(expected, actual)) {
       throw new CollectionsTestServiceException("expected: "
-          + expected.toString() + " actual: " + actual.toString());
+          + Arrays.toString(expected) + " actual: " + Arrays.toString(actual));
     }
 
     return actual;
@@ -205,7 +205,7 @@
       expected = TestSetFactory.createVeryLargeArray();
       if (!TestSetValidator.equals(expected, actual)) {
         throw new CollectionsTestServiceException("expected: "
-            + expected.toString() + " actual: " + actual.toString());
+            + Arrays.toString(expected) + " actual: " + Arrays.toString(actual));
       }
     }
 
@@ -217,7 +217,7 @@
     Integer[] expected = TestSetFactory.createIntegerArray();
     if (!TestSetValidator.equals(expected, actual)) {
       throw new CollectionsTestServiceException("expected: "
-          + expected.toString() + " actual: " + actual.toString());
+          + Arrays.toString(expected) + " actual: " + Arrays.toString(actual));
     }
 
     return actual;
@@ -260,7 +260,7 @@
     long[] expected = TestSetFactory.createPrimitiveLongArray();
     if (!TestSetValidator.equals(expected, actual)) {
       throw new CollectionsTestServiceException("expected: "
-          + expected.toString() + " actual: " + actual.toString());
+          + Arrays.toString(expected) + " actual: " + Arrays.toString(actual));
     }
 
     return actual;
@@ -280,7 +280,7 @@
     short[] expected = TestSetFactory.createPrimitiveShortArray();
     if (!TestSetValidator.equals(expected, actual)) {
       throw new CollectionsTestServiceException("expected: "
-          + expected.toString() + " actual: " + actual.toString());
+          + Arrays.toString(expected) + " actual: " + Arrays.toString(actual));
     }
 
     return actual;
@@ -290,7 +290,7 @@
     Short[] expected = TestSetFactory.createShortArray();
     if (!TestSetValidator.equals(expected, actual)) {
       throw new CollectionsTestServiceException("expected: "
-          + expected.toString() + " actual: " + actual.toString());
+          + Arrays.toString(expected) + " actual: " + Arrays.toString(actual));
     }
 
     return actual;
@@ -300,7 +300,7 @@
     String[] expected = TestSetFactory.createStringArray();
     if (!TestSetValidator.equals(expected, actual)) {
       throw new CollectionsTestServiceException("expected: "
-          + expected.toString() + " actual: " + actual.toString());
+          + Arrays.toString(expected) + " actual: " + Arrays.toString(actual));
     }
 
     return actual;
diff --git a/user/test/com/google/gwt/user/server/rpc/RPCServletUtilsTest.java b/user/test/com/google/gwt/user/server/rpc/RPCServletUtilsTest.java
index d976a0e..f68f971 100644
--- a/user/test/com/google/gwt/user/server/rpc/RPCServletUtilsTest.java
+++ b/user/test/com/google/gwt/user/server/rpc/RPCServletUtilsTest.java
@@ -71,7 +71,7 @@
     }
   }
 
-  class MockServletInputStream extends ServletInputStream {
+  static class MockServletInputStream extends ServletInputStream {
     private boolean readOnce = false;
     final private String value;
 
diff --git a/user/test/com/google/gwt/user/server/rpc/RemoteServiceServletTest.java b/user/test/com/google/gwt/user/server/rpc/RemoteServiceServletTest.java
index dd0d39b..6ab9605 100644
--- a/user/test/com/google/gwt/user/server/rpc/RemoteServiceServletTest.java
+++ b/user/test/com/google/gwt/user/server/rpc/RemoteServiceServletTest.java
@@ -52,7 +52,7 @@
   private static class Foo implements IsSerializable {
   }
 
-  private class MockHttpServletRequestContextPath extends
+  private static class MockHttpServletRequestContextPath extends
       MockHttpServletRequest {
     private String contextPath;
 
@@ -62,7 +62,7 @@
     }
   }
 
-  private class MockServletConfig implements ServletConfig {
+  private static class MockServletConfig implements ServletConfig {
     private ServletContext context;
 
     public MockServletConfig(ServletContext context) {
diff --git a/user/test/org/apache/commons/collections/TestTreeMap.java b/user/test/org/apache/commons/collections/TestTreeMap.java
deleted file mode 100644
index 56e8719..0000000
--- a/user/test/org/apache/commons/collections/TestTreeMap.java
+++ /dev/null
@@ -1,52 +0,0 @@
-/*
- * Copyright 1999-2004 The Apache Software Foundation
- * 
- * Licensed under the Apache License, Version 2.0 (the "License"); you may not
- * use this file except in compliance with the License. You may obtain a copy of
- * the License at
- * 
- * http://www.apache.org/licenses/LICENSE-2.0
- * 
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
- * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
- * License for the specific language governing permissions and limitations under
- * the License.
- */
-package org.apache.commons.collections;
-
-import java.util.TreeMap;
-
-/**
- * @author <a href="mailto:jvanzyl@apache.org">Jason van Zyl</a>
- * @version $Id: TestTreeMap.java,v 1.6.2.1 2004/05/22 12:14:05 scolebourne Exp $
- */
-public abstract class TestTreeMap extends TestMap {
-  // public static void main(String args[])
-  // {
-  // String[] testCaseName = { TestTreeMap.class.getName() };
-  // junit.textui.TestRunner.main(testCaseName);
-  // }
-
-  protected TreeMap map = null;
-
-  public void gwtSetUp() {
-    map = (TreeMap) makeEmptyMap();
-  }
-
-  public void testNewMap() {
-    assertTrue("New map is empty", map.isEmpty());
-    assertEquals("New map has size zero", map.size(), 0);
-  }
-
-  public void testSearch() {
-    map.put("first", "First Item");
-    map.put("second", "Second Item");
-    assertEquals("Top item is 'Second Item'", map.get("first"), "First Item");
-    assertEquals("Next Item is 'First Item'", map.get("second"), "Second Item");
-  }
-
-  public boolean useNullKey() {
-    return false;
-  }
-}