langtools/src/share/classes/com/sun/tools/javac/comp/Attr.java
changeset 6587 344aa81a3b35
parent 6582 c7a4fb5a2f86
child 6592 dc56420a69bc
--- a/langtools/src/share/classes/com/sun/tools/javac/comp/Attr.java	Fri Sep 03 11:25:43 2010 +0530
+++ b/langtools/src/share/classes/com/sun/tools/javac/comp/Attr.java	Fri Sep 03 12:36:43 2010 +0530
@@ -328,6 +328,12 @@
             attribExpr(expr, env);
         } catch (BreakAttr b) {
             return b.env;
+        } catch (AssertionError ae) {
+            if (ae.getCause() instanceof BreakAttr) {
+                return ((BreakAttr)(ae.getCause())).env;
+            } else {
+                throw ae;
+            }
         } finally {
             breakTree = null;
             log.useSource(prev);
@@ -342,6 +348,12 @@
             attribStat(stmt, env);
         } catch (BreakAttr b) {
             return b.env;
+        } catch (AssertionError ae) {
+            if (ae.getCause() instanceof BreakAttr) {
+                return ((BreakAttr)(ae.getCause())).env;
+            } else {
+                throw ae;
+            }
         } finally {
             breakTree = null;
             log.useSource(prev);