Author: [email protected]
Date: Mon May 11 07:46:56 2009
New Revision: 5329

Modified:
     
changes/jat/ihm/dev/core/src/com/google/gwt/dev/javac/CompilationState.java
     
changes/jat/ihm/dev/core/src/com/google/gwt/dev/javac/CompilationUnit.java

Log:
Fix incorrect nesting when there is no binary oracle, ignore compiled
classes that can't compute their referenced types (mocks).


Modified:  
changes/jat/ihm/dev/core/src/com/google/gwt/dev/javac/CompilationState.java
==============================================================================
---  
changes/jat/ihm/dev/core/src/com/google/gwt/dev/javac/CompilationState.java     
 
(original)
+++  
changes/jat/ihm/dev/core/src/com/google/gwt/dev/javac/CompilationState.java     
 
Mon May 11 07:46:56 2009
@@ -506,15 +506,15 @@
              binary = null;
            }
          }
-        if (binary == null) {
-          ++sourceCount;
-        } else {
-          binary.setSourceFile(newSourceFile);
-          ++binaryCount;
-        }
-        unitMap.put(typeName, new SourceFileCompilationUnit(newSourceFile,
-            binary));
        }
+      if (binary == null) {
+        ++sourceCount;
+      } else {
+        binary.setSourceFile(newSourceFile);
+        ++binaryCount;
+      }
+      unitMap.put(typeName, new SourceFileCompilationUnit(newSourceFile,
+          binary));
      }

      long delta = System.currentTimeMillis() - startTimestamp;

Modified:  
changes/jat/ihm/dev/core/src/com/google/gwt/dev/javac/CompilationUnit.java
==============================================================================
---  
changes/jat/ihm/dev/core/src/com/google/gwt/dev/javac/CompilationUnit.java      
 
(original)
+++  
changes/jat/ihm/dev/core/src/com/google/gwt/dev/javac/CompilationUnit.java      
 
Mon May 11 07:46:56 2009
@@ -487,7 +487,13 @@
        }, cud.scope);
      } else if (compiledClasses != null) {
        for (CompiledClass compiledClass : compiledClasses) {
-        referencedTypes.addAll(compiledClass.getReferencedTypes());
+        Set<String> refTypes = compiledClass.getReferencedTypes();
+        if (refTypes != null) {
+          // TODO(jat): this means we have a CompiledClass that isn't  
actually
+          //    compiled.  This comes up from the mocked tests, but maybe  
we
+          //    need to do something better than ignore them.
+          referencedTypes.addAll(refTypes);
+        }
        }
      } else {
        // TODO(jat): error here?

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

Reply via email to