Fix NPE in TypeOracle build.
http://gwt-code-reviews.appspot.com/910802/show
Review by: conroy@google.com
git-svn-id: https://google-web-toolkit.googlecode.com/svn/trunk@8852 8db76d5a-ed1c-0410-87a9-c151d255dfc7
diff --git a/dev/core/src/com/google/gwt/dev/javac/MethodArgNamesLookup.java b/dev/core/src/com/google/gwt/dev/javac/MethodArgNamesLookup.java
index aba7337..b4bb5a3 100644
--- a/dev/core/src/com/google/gwt/dev/javac/MethodArgNamesLookup.java
+++ b/dev/core/src/com/google/gwt/dev/javac/MethodArgNamesLookup.java
@@ -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) {