changeset 2632:1cf5a53613ae

8059710: javac, the same approach used in fix for JDK-8058708 should be applied to Code.closeAliveRanges Reviewed-by: jjg
author vromero
date Thu, 23 Oct 2014 10:40:02 -0700
parents e7560bceb36a
children fa8be3ce18fc
files src/share/classes/com/sun/tools/javac/jvm/Code.java
diffstat 1 files changed, 6 insertions(+), 7 deletions(-) [+]
line wrap: on
line diff
--- a/src/share/classes/com/sun/tools/javac/jvm/Code.java	Wed Oct 22 12:30:25 2014 -0700
+++ b/src/share/classes/com/sun/tools/javac/jvm/Code.java	Thu Oct 23 10:40:02 2014 -0700
@@ -2017,13 +2017,12 @@
         List<VarSymbol> locals = lvtRanges.getVars(meth, tree);
         for (LocalVar localVar: lvar) {
             for (VarSymbol aliveLocal : locals) {
-                if (localVar == null) {
-                    return;
-                }
-                if (localVar.sym == aliveLocal && localVar.lastRange() != null) {
-                    char length = (char)(closingCP - localVar.lastRange().start_pc);
-                    if (length < Character.MAX_VALUE) {
-                        localVar.closeRange(length);
+                if (localVar != null) {
+                    if (localVar.sym == aliveLocal && localVar.lastRange() != null) {
+                        char length = (char)(closingCP - localVar.lastRange().start_pc);
+                        if (length < Character.MAX_VALUE) {
+                            localVar.closeRange(length);
+                        }
                     }
                 }
             }