changeset 392:9711a6c2db7e

6807255: LineNumberTable wrong if enhanced-for-loops are used Summary: end position of iterable for-each loop was not set properly Reviewed-by: jjg
author mcimadamore
date Thu, 05 Mar 2009 17:25:13 +0000
parents 84a18d7da478
children 86b60aa941c6
files src/share/classes/com/sun/tools/javac/comp/Lower.java
diffstat 1 files changed, 1 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/src/share/classes/com/sun/tools/javac/comp/Lower.java	Thu Mar 05 17:24:40 2009 +0000
+++ b/src/share/classes/com/sun/tools/javac/comp/Lower.java	Thu Mar 05 17:25:13 2009 +0000
@@ -3012,6 +3012,7 @@
                                                   vardefinit).setType(tree.var.type);
             indexDef.sym = tree.var.sym;
             JCBlock body = make.Block(0, List.of(indexDef, tree.body));
+            body.endpos = TreeInfo.endPos(tree.body);
             result = translate(make.
                 ForLoop(List.of(init),
                         cond,