# HG changeset patch # User vromero # Date 1414086002 25200 # Node ID b63718dce4c1a03be652ad855fd478c35db1d4df # Parent 53535e4e1b084a171768eb62a05a31a2ed3abffe 8059710: javac, the same approach used in fix for JDK-8058708 should be applied to Code.closeAliveRanges Reviewed-by: jjg diff -r 53535e4e1b08 -r b63718dce4c1 langtools/src/jdk.compiler/share/classes/com/sun/tools/javac/jvm/Code.java --- a/langtools/src/jdk.compiler/share/classes/com/sun/tools/javac/jvm/Code.java Tue Oct 21 17:50:13 2014 -0700 +++ b/langtools/src/jdk.compiler/share/classes/com/sun/tools/javac/jvm/Code.java Thu Oct 23 10:40:02 2014 -0700 @@ -2017,13 +2017,12 @@ List 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); + } } } }