Author: [email protected]
Date: Thu Apr 2 17:55:54 2009
New Revision: 5179
Modified:
changes/scottb/memory/dev/core/src/com/google/gwt/dev/jjs/ast/JTypeOracle.java
changes/scottb/memory/dev/core/src/com/google/gwt/dev/jjs/impl/GenerateJavaScriptAST.java
Log:
Fix null callers to hasClinit()
Modified:
changes/scottb/memory/dev/core/src/com/google/gwt/dev/jjs/ast/JTypeOracle.java
==============================================================================
---
changes/scottb/memory/dev/core/src/com/google/gwt/dev/jjs/ast/JTypeOracle.java
(original)
+++
changes/scottb/memory/dev/core/src/com/google/gwt/dev/jjs/ast/JTypeOracle.java
Thu Apr 2 17:55:54 2009
@@ -390,7 +390,7 @@
if (fromType == toType) {
return false;
}
- if (!hasClinit(toType)) {
+ if (toType == null || !hasClinit(toType)) {
return false;
}
if (fromType instanceof JClassType && toType instanceof JClassType
Modified:
changes/scottb/memory/dev/core/src/com/google/gwt/dev/jjs/impl/GenerateJavaScriptAST.java
==============================================================================
---
changes/scottb/memory/dev/core/src/com/google/gwt/dev/jjs/impl/GenerateJavaScriptAST.java
(original)
+++
changes/scottb/memory/dev/core/src/com/google/gwt/dev/jjs/impl/GenerateJavaScriptAST.java
Thu Apr 2 17:55:54 2009
@@ -1665,11 +1665,11 @@
return null;
}
JReferenceType enclosingType = x.getEnclosingType();
- if (!typeOracle.hasClinit(enclosingType)) {
+ if (enclosingType == null || !typeOracle.hasClinit(enclosingType)) {
return null;
}
// avoid recursion sickness
- if (x == enclosingType.methods.get(0)) {
+ if (JProgram.isClinit(x)) {
return null;
}
--~--~---------~--~----~------------~-------~--~----~
http://groups.google.com/group/Google-Web-Toolkit-Contributors
-~----------~----~----~----~------~----~------~--~---