decompiler: fixed anonymous class line numbers

This commit is contained in:
Egor.Ushakov
2015-01-21 21:21:43 +03:00
parent 0bba28eded
commit a74f586e34
10 changed files with 148 additions and 33 deletions

View File

@@ -252,12 +252,16 @@ public class NewExprent extends Exprent {
buf.setLength(0); // remove the usual 'new <class>()', it will be replaced with lambda style '() ->'
}
Exprent methodObject = constructor == null ? null : constructor.getInstance();
new ClassWriter().classLambdaToJava(child, buf, methodObject, indent);
tracer.incrementCurrentSourceLine(buf.countLines());
TextBuffer clsBuf = new TextBuffer();
new ClassWriter().classLambdaToJava(child, clsBuf, methodObject, indent);
buf.append(clsBuf);
tracer.incrementCurrentSourceLine(clsBuf.countLines());
}
else {
new ClassWriter().classToJava(child, buf, indent, tracer);
tracer.incrementCurrentSourceLine(buf.countLines());
TextBuffer clsBuf = new TextBuffer();
new ClassWriter().classToJava(child, clsBuf, indent, tracer);
buf.append(clsBuf);
tracer.incrementCurrentSourceLine(clsBuf.countLines());
}
}
else if (directArrayInit) {