diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/SourceGeneratorLocalData.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/SourceGeneratorLocalData.java index 12d6dfcc0..fa31413a6 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/SourceGeneratorLocalData.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/SourceGeneratorLocalData.java @@ -69,7 +69,7 @@ public class SourceGeneratorLocalData implements Serializable { public boolean subMethod = false; public String getFullClass() { - return pkg == null || pkg.isEmpty() ? currentClass : pkg + "." + currentClass; + return pkg == null || pkg.isEmpty() ? currentClass : pkg.toRawString() + "." + currentClass; } public SourceGeneratorLocalData(HashMap registerVars, Integer inFunction, Boolean inMethod, Integer forInLevel) { diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/parser/script/AVM2SourceGenerator.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/parser/script/AVM2SourceGenerator.java index 5cdca82f4..21bdce713 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/parser/script/AVM2SourceGenerator.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/parser/script/AVM2SourceGenerator.java @@ -1458,7 +1458,7 @@ public class AVM2SourceGenerator implements SourceGenerator { List registerNames = new ArrayList<>(); List registerTypes = new ArrayList<>(); if (className != null) { - String fullClassName = pkg == null || pkg.isEmpty() ? className : pkg + "." + className; + String fullClassName = pkg == null || pkg.isEmpty() ? className : pkg.toRawString() + "." + className; registerTypes.add(fullClassName); localData.scopeStack.add(new LocalRegAVM2Item(null, registerNames.size(), null)); registerNames.add("this"); @@ -2444,7 +2444,7 @@ public class AVM2SourceGenerator implements SourceGenerator { TypeItem type = (TypeItem) typeItem; DottedChain dname = type.fullTypeName; - String pkg = dname.getWithoutLast().toString(); + String pkg = dname.getWithoutLast().toRawString(); String name = dname.getLast(); for (InstanceInfo ii : abc.instance_info) { Multiname mname = abc.constants.constant_multiname.get(ii.name_index); diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/parser/script/ActionScript3Parser.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/parser/script/ActionScript3Parser.java index 03441596c..aecde14ff 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/parser/script/ActionScript3Parser.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/parser/script/ActionScript3Parser.java @@ -920,8 +920,8 @@ public class ActionScript3Parser { //int publicNs = namespace; int protectedStaticNs = 0; - openedNamespaces.add(protectedNs = abc.constants.getNamespaceId(new Namespace(Namespace.KIND_PROTECTED, abc.constants.getStringId(packageName == null ? (scriptName + "$0:"/*FIXME?*/ + classNameStr) : packageName.isEmpty() ? classNameStr : packageName + ":" + classNameStr, true)), 0, true)); - openedNamespaces.add(protectedStaticNs = abc.constants.getNamespaceId(new Namespace(Namespace.KIND_STATIC_PROTECTED, abc.constants.getStringId(packageName == null || packageName.isEmpty() ? classNameStr : packageName + ":" + classNameStr, true)), 0, true)); + openedNamespaces.add(protectedNs = abc.constants.getNamespaceId(new Namespace(Namespace.KIND_PROTECTED, abc.constants.getStringId(packageName == null ? (scriptName + "$0:"/*FIXME?*/ + classNameStr) : packageName.isEmpty() ? classNameStr : packageName.toRawString() + ":" + classNameStr, true)), 0, true)); + openedNamespaces.add(protectedStaticNs = abc.constants.getNamespaceId(new Namespace(Namespace.KIND_STATIC_PROTECTED, abc.constants.getStringId(packageName == null || packageName.isEmpty() ? classNameStr : packageName.toRawString() + ":" + classNameStr, true)), 0, true)); if (extendsStr != null) { List indices = new ArrayList<>(); diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/parser/script/PropertyAVM2Item.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/parser/script/PropertyAVM2Item.java index 0385f7151..24053ae93 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/parser/script/PropertyAVM2Item.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/parser/script/PropertyAVM2Item.java @@ -228,7 +228,7 @@ public class PropertyAVM2Item extends AssignableAVM2Item { Reference outPropType = new Reference<>(null); Reference outPropValue = new Reference<>(null); if (AVM2SourceGenerator.searchPrototypeChain(false, abcs, m.getNamespace(a.constants).getName(a.constants), m.getName(a.constants, null, true), propertyName, outName, outNs, outPropNs, outPropNsKind, outPropNsIndex, outPropType, outPropValue)) { - objType = new TypeItem("".equals(outNs.getVal()) ? outName.getVal() : outNs.getVal() + "." + outName.getVal()); + objType = new TypeItem(outNs.getVal().isEmpty() ? outName.getVal() : outNs.getVal().toRawString() + "." + outName.getVal()); propType = outPropType.getVal(); propIndex = abc.constants.getMultinameId(new Multiname(Multiname.QNAME, abc.constants.getStringId(propertyName, true), diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/parser/script/UnresolvedAVM2Item.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/parser/script/UnresolvedAVM2Item.java index 9d71abbf7..22575dbca 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/parser/script/UnresolvedAVM2Item.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/parser/script/UnresolvedAVM2Item.java @@ -264,7 +264,7 @@ public class UnresolvedAVM2Item extends AssignableAVM2Item { if (resolved != null) { return resolved.toString(); } - return name.toString(); + return name.toRawString(); } @Override diff --git a/src/com/jpexs/decompiler/flash/console/CommandLineArgumentParser.java b/src/com/jpexs/decompiler/flash/console/CommandLineArgumentParser.java index 4b34608e3..40e871a7a 100644 --- a/src/com/jpexs/decompiler/flash/console/CommandLineArgumentParser.java +++ b/src/com/jpexs/decompiler/flash/console/CommandLineArgumentParser.java @@ -1401,7 +1401,7 @@ public class CommandLineArgumentParser { inFile.delete(); tmpFile.renameTo(inFile); tmpFile = null; - System.out.println("" + inFile + " overwritten."); + System.out.println(inFile + " overwritten."); } System.out.println("OK"); } catch (FileNotFoundException ex) { diff --git a/src/com/jpexs/decompiler/flash/gui/abc/ABCPanel.java b/src/com/jpexs/decompiler/flash/gui/abc/ABCPanel.java index abc659f6e..a7d07b24c 100644 --- a/src/com/jpexs/decompiler/flash/gui/abc/ABCPanel.java +++ b/src/com/jpexs/decompiler/flash/gui/abc/ABCPanel.java @@ -626,7 +626,7 @@ public class ABCPanel extends JPanel implements ItemListener, SearchListener