Suppress additional JDT compile problems.
http://gwt-code-reviews.appspot.com/1461804/
Review by: zundel@google.com
git-svn-id: https://google-web-toolkit.googlecode.com/svn/trunk@10398 8db76d5a-ed1c-0410-87a9-c151d255dfc7
diff --git a/dev/core/src/com/google/gwt/dev/jjs/impl/ReferenceMapper.java b/dev/core/src/com/google/gwt/dev/jjs/impl/ReferenceMapper.java
index 017fe78..e8d863b 100644
--- a/dev/core/src/com/google/gwt/dev/jjs/impl/ReferenceMapper.java
+++ b/dev/core/src/com/google/gwt/dev/jjs/impl/ReferenceMapper.java
@@ -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 =