8059710: javac, the same approach used in fix for JDK-8058708 should be applied to Code.closeAliveRanges
Reviewed-by: jjg
--- 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<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);
+ }
}
}
}