--- a/langtools/src/jdk.compiler/share/classes/com/sun/tools/javac/comp/Attr.java Wed Jul 05 20:30:11 2017 +0200
+++ b/langtools/src/jdk.compiler/share/classes/com/sun/tools/javac/comp/Attr.java Mon Apr 27 16:31:29 2015 +0200
@@ -2425,6 +2425,11 @@
resultInfo.checkContext.report(that, cause);
result = that.type = types.createErrorType(pt());
return;
+ } catch (Throwable t) {
+ //when an unexpected exception happens, avoid attempts to attribute the same tree again
+ //as that would likely cause the same exception again.
+ needsRecovery = false;
+ throw t;
} finally {
localEnv.info.scope.leave();
if (needsRecovery) {