From 2df49d32a71818227e80a8628688906f2ede8a6a Mon Sep 17 00:00:00 2001 From: Roman Shevchenko Date: Tue, 2 Sep 2014 20:56:03 +0400 Subject: java-decompiler: fixes and cleanups - unified attribute loading code - common methods for checking member flags - verifying skip() - correct resource closing - typos --- .../java/decompiler/main/rels/NestedClassProcessor.java | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) (limited to 'src/org/jetbrains/java/decompiler/main/rels/NestedClassProcessor.java') diff --git a/src/org/jetbrains/java/decompiler/main/rels/NestedClassProcessor.java b/src/org/jetbrains/java/decompiler/main/rels/NestedClassProcessor.java index 3eec983..003bdc2 100644 --- a/src/org/jetbrains/java/decompiler/main/rels/NestedClassProcessor.java +++ b/src/org/jetbrains/java/decompiler/main/rels/NestedClassProcessor.java @@ -71,7 +71,7 @@ public class NestedClassProcessor { // ensure not-empty class name if ((child.type == ClassNode.CLASS_LOCAL || child.type == ClassNode.CLASS_MEMBER) && child.simpleName == null) { StructClass cl = child.classStruct; - if (((child.access | cl.access_flags) & CodeConstants.ACC_SYNTHETIC) != 0 || cl.getAttributes().containsKey("Synthetic")) { + if ((child.access & CodeConstants.ACC_SYNTHETIC) != 0 || cl.isSynthetic()) { child.simpleName = "SyntheticClass_" + (++synthetics); } else { @@ -675,7 +675,7 @@ public class NestedClassProcessor { return null; } - boolean notsynth = DecompilerContext.getOption(IFernflowerPreferences.SYNTHETIC_NOT_SET); + boolean noSynthFlag = DecompilerContext.getOption(IFernflowerPreferences.SYNTHETIC_NOT_SET); // no loop at the begin DirectNode firstnode = graph.first; @@ -692,10 +692,8 @@ public class NestedClassProcessor { if (fd != null) { // local (== not inherited) field if (cl.qualifiedName.equals(left.getClassname()) && - (fd.access_flags & CodeConstants.ACC_FINAL) != 0 && - ((fd.access_flags & CodeConstants.ACC_SYNTHETIC) != 0 || - fd.getAttributes().containsKey("Synthetic") || - (notsynth && (fd.access_flags & CodeConstants.ACC_PRIVATE) != 0))) { + fd.hasModifier(CodeConstants.ACC_FINAL) && + (fd.isSynthetic() || (noSynthFlag && fd.hasModifier(CodeConstants.ACC_PRIVATE)))) { field = InterpreterUtil.makeUniqueKey(left.getName(), left.getDescriptor().descriptorString); break; } -- cgit v1.2.3