decompiler: fixed bytecode mapping for anonymous classes

This commit is contained in:
Egor.Ushakov
2014-10-17 15:41:17 +04:00
parent b3681fe952
commit 32e7765874
9 changed files with 95 additions and 52 deletions

View File

@@ -270,9 +270,11 @@ public class NewExprent extends Exprent {
}
Exprent methodObject = constructor == null ? null : constructor.getInstance();
new ClassWriter().classLambdaToJava(child, buf, methodObject, indent);
tracer.incrementCurrentSourceLine(buf.countLines());
}
else {
new ClassWriter().classToJava(child, buf, indent);
new ClassWriter().classToJava(child, buf, indent, tracer);
tracer.incrementCurrentSourceLine(buf.countLines());
}
}
else if (directArrayInit) {

View File

@@ -17,7 +17,6 @@ package org.jetbrains.java.decompiler.modules.decompiler.exps;
import java.util.ArrayList;
import java.util.List;
import java.util.Set;
import org.jetbrains.java.decompiler.code.CodeConstants;
import org.jetbrains.java.decompiler.main.ClassWriter;
@@ -92,7 +91,7 @@ public class VarExprent extends Exprent {
if (classdef) {
ClassNode child = DecompilerContext.getClassProcessor().getMapRootClasses().get(vartype.value);
new ClassWriter().classToJava(child, buffer, indent);
new ClassWriter().classToJava(child, buffer, indent, tracer);
}
else {
String name = null;