Revision: 10398
Author: sco...@google.com
Date: Fri Jun 24 15:51:33 2011
Log: Suppress additional JDT compile problems.
http://gwt-code-reviews.appspot.com/1461804/
Review by: zun...@google.com
http://code.google.com/p/google-web-toolkit/source/detail?r=10398
Modified:
/trunk/dev/core/src/com/google/gwt/dev/jjs/impl/ReferenceMapper.java
=======================================
--- /trunk/dev/core/src/com/google/gwt/dev/jjs/impl/ReferenceMapper.java
Fri Jun 24 09:10:50 2011
+++ /trunk/dev/core/src/com/google/gwt/dev/jjs/impl/ReferenceMapper.java
Fri Jun 24 15:51:33 2011
@@ -41,6 +41,7 @@
import org.eclipse.jdt.internal.compiler.lookup.SourceTypeBinding;
import org.eclipse.jdt.internal.compiler.lookup.SyntheticArgumentBinding;
import org.eclipse.jdt.internal.compiler.lookup.TypeBinding;
+import org.eclipse.jdt.internal.compiler.problem.AbortCompilation;
import java.util.ArrayList;
import java.util.HashMap;
@@ -139,19 +140,30 @@
} else {
ReferenceBinding refBinding = (ReferenceBinding) binding;
JDeclaredType declType = createType(refBinding);
- if (declType instanceof JClassType) {
- ReferenceBinding superclass = refBinding.superclass();
- if (superclass != null && superclass.isValidBinding()) {
- ((JClassType) declType).setSuperClass((JClassType)
get(superclass));
- }
- }
- ReferenceBinding[] superInterfaces = refBinding.superInterfaces();
- if (superInterfaces != null) {
- for (ReferenceBinding intf : superInterfaces) {
- if (intf.isValidBinding()) {
- declType.addImplements((JInterfaceType) get(intf));
+ try {
+ if (declType instanceof JClassType) {
+ ReferenceBinding superclass = refBinding.superclass();
+ if (superclass != null && superclass.isValidBinding()) {
+ ((JClassType) declType).setSuperClass((JClassType)
get(superclass));
+ }
+ }
+ ReferenceBinding[] superInterfaces = refBinding.superInterfaces();
+ if (superInterfaces != null) {
+ for (ReferenceBinding intf : superInterfaces) {
+ if (intf.isValidBinding()) {
+ declType.addImplements((JInterfaceType) get(intf));
+ }
}
}
+ } catch (AbortCompilation ignored) {
+ /*
+ * The currently-compiling unit has no errors; however, we're
running
+ * into a case where it references something with a bad hierarchy.
This
+ * doesn't cause an error in the current unit, but it does mean we
run
+ * into a wall here trying to construct the hierarchy. Catch the
error
+ * so that compilation can proceed; the error units themselves will
+ * eventually cause the full compile to error out.
+ */
}
// Emulate clinit method for super clinit calls.
JMethod clinit =
--
http://groups.google.com/group/Google-Web-Toolkit-Contributors