fix: clear node flags for custom decompilation mode
This commit is contained in:
@@ -139,14 +139,12 @@ public abstract class AttrNode implements IAttributeNode {
|
||||
storage = EMPTY_ATTR_STORAGE;
|
||||
}
|
||||
|
||||
/**
|
||||
* Remove all attribute
|
||||
*/
|
||||
public void unloadAttributes() {
|
||||
if (storage == EMPTY_ATTR_STORAGE) {
|
||||
return;
|
||||
}
|
||||
storage.unloadAttributes();
|
||||
storage.clearFlags();
|
||||
unloadIfEmpty();
|
||||
}
|
||||
|
||||
|
||||
@@ -102,6 +102,10 @@ public class AttributeStorage {
|
||||
flags.remove(flag);
|
||||
}
|
||||
|
||||
public void clearFlags() {
|
||||
flags.clear();
|
||||
}
|
||||
|
||||
public <T extends IJadxAttribute> void remove(IJadxAttrType<T> type) {
|
||||
if (!attributes.isEmpty()) {
|
||||
writeAttributes(map -> map.remove(type));
|
||||
|
||||
@@ -432,7 +432,7 @@ public class ClassNode extends NotificationAttrNode
|
||||
}
|
||||
methods.forEach(MethodNode::unload);
|
||||
innerClasses.forEach(ClassNode::unload);
|
||||
fields.forEach(FieldNode::unloadAttributes);
|
||||
fields.forEach(FieldNode::unload);
|
||||
unloadAttributes();
|
||||
setState(NOT_LOADED);
|
||||
this.loadStage = LoadStage.NONE;
|
||||
|
||||
@@ -38,6 +38,10 @@ public class FieldNode extends NotificationAttrNode implements ICodeNode {
|
||||
this.accFlags = new AccessInfo(accessFlags, AFType.FIELD);
|
||||
}
|
||||
|
||||
public void unload() {
|
||||
unloadAttributes();
|
||||
}
|
||||
|
||||
public void updateType(ArgType type) {
|
||||
this.type = type;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user