mirror of
https://git.huckle.dev/Huckles-Minecraft-Archive/jpexs-decompiler.git
synced 2026-06-16 15:02:02 +00:00
Fixed #1951 Clearing Namespace/Multiname cache after renaming identifiers
This commit is contained in:
@@ -2695,12 +2695,16 @@ public final class SWF implements SWFContainerItem, Timelined, Openable {
|
||||
for (Tag tag : getTags()) {
|
||||
if (tag instanceof ABCContainerTag) {
|
||||
((ABCContainerTag) tag).getABC().deobfuscateIdentifiers(deobfuscated, renameType, true);
|
||||
((ABCContainerTag) tag).getABC().constants.clearCachedMultinames();
|
||||
((ABCContainerTag) tag).getABC().constants.clearCachedDottedChains();
|
||||
tag.setModified(true);
|
||||
}
|
||||
}
|
||||
for (Tag tag : getTags()) {
|
||||
if (tag instanceof ABCContainerTag) {
|
||||
((ABCContainerTag) tag).getABC().deobfuscateIdentifiers(deobfuscated, renameType, false);
|
||||
((ABCContainerTag) tag).getABC().constants.clearCachedMultinames();
|
||||
((ABCContainerTag) tag).getABC().constants.clearCachedDottedChains();
|
||||
tag.setModified(true);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -101,6 +101,14 @@ public class AVM2ConstantPool implements Cloneable {
|
||||
multinameWithNamespaceCache.put(multiName, multinameWithNamespace);
|
||||
}
|
||||
|
||||
public void clearCachedMultinames() {
|
||||
multinameWithNamespaceCache.clear();
|
||||
}
|
||||
|
||||
public void clearCachedDottedChains() {
|
||||
dottedChainCache.clear();
|
||||
}
|
||||
|
||||
private void ensureDefault(List<?> list) {
|
||||
if (list.isEmpty()) {
|
||||
list.add(null);
|
||||
|
||||
Reference in New Issue
Block a user