Revision: 8852
Author: [email protected]
Date: Thu Sep 23 07:20:47 2010
Log: Fix NPE in TypeOracle build.
http://gwt-code-reviews.appspot.com/910802/show
Review by: [email protected]
http://code.google.com/p/google-web-toolkit/source/detail?r=8852
Modified:
/trunk/dev/core/src/com/google/gwt/dev/javac/MethodArgNamesLookup.java
=======================================
--- /trunk/dev/core/src/com/google/gwt/dev/javac/MethodArgNamesLookup.java
Thu Sep 23 06:33:21 2010
+++ /trunk/dev/core/src/com/google/gwt/dev/javac/MethodArgNamesLookup.java
Thu Sep 23 07:20:47 2010
@@ -38,15 +38,15 @@
}
/**
- * Prevent further modification to this object. Calls to
- * {...@link #store(String, AbstractMethodDeclaration)} or
+ * Prevent further modification to this object. Calls to
+ * {...@link #store(String, AbstractMethodDeclaration)} or
* {...@link #mergeFrom(MethodArgNamesLookup)} on this object will fail
after
* this method is called.
*/
public void freeze() {
methodArgs = Maps.normalizeUnmodifiable(methodArgs);
}
-
+
/**
* Lookup the argument names for a given method.
*
@@ -80,8 +80,11 @@
* @param enclosingType fully qualified binary name of the enclosing type
* @param method JDT method
*/
- public void store(String enclosingType,
- AbstractMethodDeclaration method) {
+ public void store(String enclosingType, AbstractMethodDeclaration
method) {
+ if (method.binding == null) {
+ // Compile problem with this method, skip
+ return;
+ }
int n = method.arguments.length;
String[] argNames = new String[n];
for (int i = 0; i < n; ++i) {
--
http://groups.google.com/group/Google-Web-Toolkit-Contributors