Fixed a pair of NPEs that can occur when running a test case that has compile errors.

git-svn-id: https://google-web-toolkit.googlecode.com/svn/trunk@2876 8db76d5a-ed1c-0410-87a9-c151d255dfc7
diff --git a/dev/core/src/com/google/gwt/dev/javac/CompilationUnitInvalidator.java b/dev/core/src/com/google/gwt/dev/javac/CompilationUnitInvalidator.java
index 0a670ed..8951234 100644
--- a/dev/core/src/com/google/gwt/dev/javac/CompilationUnitInvalidator.java
+++ b/dev/core/src/com/google/gwt/dev/javac/CompilationUnitInvalidator.java
@@ -143,7 +143,7 @@
   public static void validateCompilationUnits(Set<CompilationUnit> units,
       Map<String, CompiledClass> compiledClasses) {
     for (CompilationUnit unit : units) {
-      if (unit.getState() != State.CHECKED) {
+      if (unit.getState() == State.COMPILED) {
         CompilationUnitDeclaration jdtCud = unit.getJdtCud();
         JSORestrictionsChecker.check(jdtCud);
         LongFromJSNIChecker.check(jdtCud);
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 41f95e5..aae21e0 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
@@ -181,6 +181,7 @@
       JUnitResult result = new JUnitResult();
       result.setExceptionWrapper(new ExceptionWrapper(ex));
       reportResultsAndGetNextMethod(result);
+      return;
     }
 
     testCase.setName(currentTest.getTestMethod());