summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/de/fernflower/main/ClassWriter.java2
-rw-r--r--src/de/fernflower/main/rels/NestedClassProcessor.java9
2 files changed, 6 insertions, 5 deletions
diff --git a/src/de/fernflower/main/ClassWriter.java b/src/de/fernflower/main/ClassWriter.java
index 72dcf97..6a12cc5 100644
--- a/src/de/fernflower/main/ClassWriter.java
+++ b/src/de/fernflower/main/ClassWriter.java
@@ -296,7 +296,7 @@ public class ClassWriter {
if(inner.type == ClassNode.CLASS_MEMBER) {
StructClass innercl = inner.classStruct;
- boolean isSynthetic = (innercl.access_flags & CodeConstants.ACC_SYNTHETIC) != 0 || innercl.getAttributes().containsKey("Synthetic");
+ boolean isSynthetic = ((inner.access | innercl.access_flags) & CodeConstants.ACC_SYNTHETIC) != 0 || innercl.getAttributes().containsKey("Synthetic");
if((!isSynthetic || !DecompilerContext.getOption(IFernflowerPreferences.REMOVE_SYNTHETIC))
&& !wrapper.getHideMembers().contains(innercl.qualifiedName)) {
writer.write(DecompilerContext.getNewLineSeparator());
diff --git a/src/de/fernflower/main/rels/NestedClassProcessor.java b/src/de/fernflower/main/rels/NestedClassProcessor.java
index 4b7a466..6667f02 100644
--- a/src/de/fernflower/main/rels/NestedClassProcessor.java
+++ b/src/de/fernflower/main/rels/NestedClassProcessor.java
@@ -80,11 +80,12 @@ public class NestedClassProcessor {
for(ClassNode child : node.nested) {
// ensure not-empty class name
if((child.type == ClassNode.CLASS_LOCAL || child.type == ClassNode.CLASS_MEMBER) && child.simpleName == null) {
- if((child.classStruct.access_flags & CodeConstants.ACC_SYNTHETIC) == 0) {
- DecompilerContext.getLogger().writeMessage("Nameless local or member class " + child.classStruct.qualifiedName + "!", IFernflowerLogger.WARNING);
- child.simpleName = "NamelessClass_" + (++nameless);
- } else {
+ StructClass cl = child.classStruct;
+ if(((child.access | cl.access_flags) & CodeConstants.ACC_SYNTHETIC) != 0 || cl.getAttributes().containsKey("Synthetic")) {
child.simpleName = "SyntheticClass_" + (++synthetics);
+ } else {
+ DecompilerContext.getLogger().writeMessage("Nameless local or member class " + cl.qualifiedName + "!", IFernflowerLogger.WARNING);
+ child.simpleName = "NamelessClass_" + (++nameless);
}
}
}