java-decompiler: optimization (empty lists allocation avoided)

This commit is contained in:
Roman Shevchenko
2014-09-04 18:16:16 +04:00
parent 1cea85e49a
commit 686b5abef9
15 changed files with 345 additions and 343 deletions

View File

@@ -201,7 +201,7 @@ public class NestedClassProcessor {
StructEnclosingMethodAttribute attr =
(StructEnclosingMethodAttribute)child.classStruct.getAttributes().getWithKey("EnclosingMethod");
if (attr != null && attr.getMethodName() != null) {
if (node.classStruct.qualifiedName.equals(attr.getClassname()) &&
if (node.classStruct.qualifiedName.equals(attr.getClassName()) &&
node.classStruct.getMethod(attr.getMethodName(), attr.getMethodDescriptor()) != null) {
child.enclosingMethod = InterpreterUtil.makeUniqueKey(attr.getMethodName(), attr.getMethodDescriptor());
continue;