diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/SWFInputStream.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/SWFInputStream.java index f32206885..3212a910c 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/SWFInputStream.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/SWFInputStream.java @@ -12,7 +12,8 @@ * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public - * License along with this library. */ + * License along with this library. + */ package com.jpexs.decompiler.flash; import com.jpexs.decompiler.flash.action.Action; @@ -1090,7 +1091,7 @@ public class SWFInputStream implements AutoCloseable { Future future = executor.submit(new TagResolutionTask((TagStub) tag, di, level, parallel, skipUnusualTags)); futureResults.add(future); } else { - Future future = new ImmediateFuture(tag); + Future future = new ImmediateFuture<>(tag); futureResults.add(future); if (!(tag instanceof TagStub)) { if (di != null) { diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/ABC.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/ABC.java index f12e266c3..cf4a5a28e 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/ABC.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/ABC.java @@ -300,7 +300,7 @@ public class ABC { int mIndex = body.code.code.get(ip).operands[0]; if (mIndex > 0) { Multiname m = constants.getMultiname(mIndex); - if (m.getNameWithNamespace(constants,true).equals("flash.utils.getDefinitionByName")) { + if (m.getNameWithNamespace(constants, true).equals("flash.utils.getDefinitionByName")) { if (ip > 0) { if (body.code.code.get(ip - 1).definition instanceof PushStringIns) { int strIndex = body.code.code.get(ip - 1).operands[0]; @@ -698,7 +698,7 @@ public class ABC { for (Trait t : instance_info.get(i).instance_traits.traits) { if (t instanceof TraitMethodGetterSetter) { TraitMethodGetterSetter t2 = (TraitMethodGetterSetter) t; - if (methodName.equals(t2.getName(this).getName(constants, new ArrayList(),true))) { + if (methodName.equals(t2.getName(this).getName(constants, new ArrayList(), true))) { for (MethodBody body : bodies) { if (body.method_info == t2.method_info) { return body; @@ -711,11 +711,11 @@ public class ABC { } } for (int i = 0; i < class_info.size(); i++) { - if (className.equals(constants.getMultiname(instance_info.get(i).name_index).getName(constants, new ArrayList(),true))) { + if (className.equals(constants.getMultiname(instance_info.get(i).name_index).getName(constants, new ArrayList(), true))) { for (Trait t : class_info.get(i).static_traits.traits) { if (t instanceof TraitMethodGetterSetter) { TraitMethodGetterSetter t2 = (TraitMethodGetterSetter) t; - if (methodName.equals(t2.getName(this).getName(constants, new ArrayList(),true))) { + if (methodName.equals(t2.getName(this).getName(constants, new ArrayList(), true))) { for (MethodBody body : bodies) { if (body.method_info == t2.method_info) { return body; @@ -794,7 +794,7 @@ public class ABC { TraitSlotConst s = ((TraitSlotConst) t); if (s.isNamespace()) { String key = constants.getNamespace(s.value_index).getName(constants); //assume not null - String val = constants.getMultiname(s.name_index).getNameWithNamespace(constants,true); + String val = constants.getMultiname(s.name_index).getNameWithNamespace(constants, true); namespaceMap.put(key, val); } } @@ -955,7 +955,7 @@ public class ABC { if (classId > -1) { for (Trait t : instance_info.get(classId).instance_traits.traits) { if (t instanceof TraitMethodGetterSetter) { - if (t.getName(this).getName(constants, new ArrayList(),true).equals(methodName)) { + if (t.getName(this).getName(constants, new ArrayList(), true).equals(methodName)) { return ((TraitMethodGetterSetter) t).method_info; } } @@ -968,7 +968,7 @@ public class ABC { if (classId > -1) { for (Trait t : instance_info.get(classId).instance_traits.traits) { if (t instanceof TraitMethodGetterSetter) { - if (t.getName(this).getName(constants, new ArrayList(),true).equals(methodName)) { + if (t.getName(this).getName(constants, new ArrayList(), true).equals(methodName)) { return findBodyIndex(((TraitMethodGetterSetter) t).method_info); } } @@ -984,7 +984,7 @@ public class ABC { public int findClassByName(String name) { for (int c = 0; c < instance_info.size(); c++) { - String s = constants.getMultiname(instance_info.get(c).name_index).getNameWithNamespace(constants,true); + String s = constants.getMultiname(instance_info.get(c).name_index).getNameWithNamespace(constants, true); if (name.equals(s)) { return c; } diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/ScriptPack.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/ScriptPack.java index 6729c6a99..2ce47c975 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/ScriptPack.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/ScriptPack.java @@ -87,7 +87,7 @@ public class ScriptPack implements TreeElementItem { Multiname name = abc.script_info.get(scriptIndex).traits.traits.get(t).getName(abc); Namespace ns = name.getNamespace(abc.constants); if ((ns.kind == Namespace.KIND_PACKAGE) || (ns.kind == Namespace.KIND_PACKAGE_INTERNAL)) { - scriptName = name.getName(abc.constants, new ArrayList(),false); + scriptName = name.getName(abc.constants, new ArrayList(), false); } } return scriptName; diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/InstructionDefinition.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/InstructionDefinition.java index 9951e7b44..604642cfb 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/InstructionDefinition.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/InstructionDefinition.java @@ -119,7 +119,7 @@ public class InstructionDefinition implements Serializable { if (constants.getMultiname(multinameIndex).needsName()) { name = stack.get(pos).toString(); } else { - name = GraphTextWriter.hilighOffset(constants.getMultiname(multinameIndex).getName(constants, fullyQualifiedNames,false), ins.offset); + name = GraphTextWriter.hilighOffset(constants.getMultiname(multinameIndex).getName(constants, fullyQualifiedNames, false), ins.offset); } return name + ns; } diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/construction/ConstructIns.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/construction/ConstructIns.java index 5bf2913a7..6ad22e62f 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/construction/ConstructIns.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/construction/ConstructIns.java @@ -96,7 +96,7 @@ public class ConstructIns extends InstructionDefinition { } if (obj instanceof GetLexAVM2Item) { GetLexAVM2Item glt = (GetLexAVM2Item) obj; - isXML = glt.propertyName.getName(constants, fullyQualifiedNames,true).equals("XML"); + isXML = glt.propertyName.getName(constants, fullyQualifiedNames, true).equals("XML"); } if (isXML) { diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/construction/NewClassIns.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/construction/NewClassIns.java index 25150567d..c8dc17f1d 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/construction/NewClassIns.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/construction/NewClassIns.java @@ -45,7 +45,7 @@ public class NewClassIns extends InstructionDefinition { HilightedTextWriter writer = new HilightedTextWriter(Configuration.getCodeFormatting(), false); stack.pop().toString(writer, LocalData.create(constants, localRegNames, fullyQualifiedNames)); String baseType = writer.toString(); - stack.push(new UnparsedAVM2Item(ins, "new " + abc.constants.getMultiname(abc.instance_info.get(clsIndex).name_index).getName(constants, fullyQualifiedNames,false) + ".class extends " + baseType)); + stack.push(new UnparsedAVM2Item(ins, "new " + abc.constants.getMultiname(abc.instance_info.get(clsIndex).name_index).getName(constants, fullyQualifiedNames, false) + ".class extends " + baseType)); } @Override diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/ClassAVM2Item.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/ClassAVM2Item.java index ab39cf8fd..5136172f7 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/ClassAVM2Item.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/ClassAVM2Item.java @@ -33,7 +33,7 @@ public class ClassAVM2Item extends AVM2Item { @Override public GraphTextWriter appendTo(GraphTextWriter writer, LocalData localData) { - return writer.append(className.getName(localData.constantsAvm2, localData.fullyQualifiedNames,false)); + return writer.append(className.getName(localData.constantsAvm2, localData.fullyQualifiedNames, false)); } @Override diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/FullMultinameAVM2Item.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/FullMultinameAVM2Item.java index 6d8c0e55d..0169911cd 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/FullMultinameAVM2Item.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/FullMultinameAVM2Item.java @@ -62,7 +62,7 @@ public class FullMultinameAVM2Item extends AVM2Item { if (name != null) { cname = name.toString(LocalData.create(constants, localRegNames, fullyQualifiedNames)); } else { - cname = (constants.getMultiname(multinameIndex).getName(constants, fullyQualifiedNames,true)); + cname = (constants.getMultiname(multinameIndex).getName(constants, fullyQualifiedNames, true)); } String cns = ""; if (namespace != null) { @@ -94,7 +94,7 @@ public class FullMultinameAVM2Item extends AVM2Item { } else { ConstantPool constants = localData.constantsAvm2; List fullyQualifiedNames = localData.fullyQualifiedNames; - writer.append(constants.getMultiname(multinameIndex).getName(constants, fullyQualifiedNames,false)); + writer.append(constants.getMultiname(multinameIndex).getName(constants, fullyQualifiedNames, false)); } return writer; } diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/GetLexAVM2Item.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/GetLexAVM2Item.java index c5321128f..553358925 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/GetLexAVM2Item.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/GetLexAVM2Item.java @@ -34,7 +34,7 @@ public class GetLexAVM2Item extends AVM2Item { @Override public GraphTextWriter appendTo(GraphTextWriter writer, LocalData localData) { - return writer.append(propertyName.getName(localData.constantsAvm2, localData.fullyQualifiedNames,false)); + return writer.append(propertyName.getName(localData.constantsAvm2, localData.fullyQualifiedNames, false)); } @Override diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/GetSlotAVM2Item.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/GetSlotAVM2Item.java index 2f91ef03d..4d7e46540 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/GetSlotAVM2Item.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/GetSlotAVM2Item.java @@ -39,7 +39,7 @@ public class GetSlotAVM2Item extends AVM2Item { if (slotName == null) { return writer.append("/*UnknownSlot*/"); } - return writer.append(slotName.getName(localData.constantsAvm2, localData.fullyQualifiedNames,false)); + return writer.append(slotName.getName(localData.constantsAvm2, localData.fullyQualifiedNames, false)); } @Override diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/SetSlotAVM2Item.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/SetSlotAVM2Item.java index b52ca6a71..f59460a9a 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/SetSlotAVM2Item.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/SetSlotAVM2Item.java @@ -65,7 +65,7 @@ public class SetSlotAVM2Item extends AVM2Item implements SetTypeAVM2Item, Assign if (slotName == null) { return writer.append("/*UnknownSlot*/"); } - return writer.append(slotName.getName(localData.constantsAvm2, localData.fullyQualifiedNames,false)); + return writer.append(slotName.getName(localData.constantsAvm2, localData.fullyQualifiedNames, false)); } @Override 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 6df1adb5f..d0f9d5d95 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 @@ -1630,9 +1630,9 @@ public class AVM2SourceGenerator implements SourceGenerator { TraitSlotConst tsc = (TraitSlotConst) mbody.traits.traits.get(i); GraphTargetItem type = TypeItem.UNBOUNDED; if (tsc.type_index > 0) { - type = new TypeItem(abc.constants.constant_multiname.get(tsc.type_index).getNameWithNamespace(abc.constants,true)); + type = new TypeItem(abc.constants.constant_multiname.get(tsc.type_index).getNameWithNamespace(abc.constants, true)); } - NameAVM2Item d = new NameAVM2Item(type, 0, tsc.getName(abc).getName(abc.constants, new ArrayList(),true), NameAVM2Item.getDefaultValue("" + type), true, new ArrayList()); + NameAVM2Item d = new NameAVM2Item(type, 0, tsc.getName(abc).getName(abc.constants, new ArrayList(), true), NameAVM2Item.getDefaultValue("" + type), true, new ArrayList()); d.setSlotNumber(tsc.slot_id); d.setSlotScope(slotScope); mbody.code.code.addAll(0, toInsList(d.toSourceIgnoreReturnValue(localData, this))); @@ -1819,7 +1819,7 @@ public class AVM2SourceGenerator implements SourceGenerator { for (ScriptInfo si : a.script_info) { for (Trait t : si.traits.traits) { Multiname m = t.getName(a); - if (fullCustom.equals(m.getNameWithNamespace(a.constants,true))) { + if (fullCustom.equals(m.getNameWithNamespace(a.constants, true))) { if (t instanceof TraitSlotConst) { if (((TraitSlotConst) t).isNamespace()) { return ((TraitSlotConst) t).value_index; @@ -2133,7 +2133,7 @@ public class AVM2SourceGenerator implements SourceGenerator { indices.add( abc.constants.getMultinameId( new Multiname(Multiname.QNAME, - abc.constants.getStringId(superName.getName(a.constants, new ArrayList(),true), true), + abc.constants.getStringId(superName.getName(a.constants, new ArrayList(), true), true), abc.constants.getNamespaceId(new Namespace(superName.getNamespace(a.constants).kind, abc.constants.getStringId(superName.getNamespace(a.constants).getName(a.constants), true)), 0, true), 0, 0, new ArrayList()), true) ); } @@ -2189,7 +2189,7 @@ public class AVM2SourceGenerator implements SourceGenerator { } for (Trait t : ii.traits.traits) { if (eq(pkg, t.getName(abc).getNamespace(abc.constants).getName(abc.constants))) { - if (propertyName.equals(t.getName(abc).getName(abc.constants, new ArrayList(),true))) { + if (propertyName.equals(t.getName(abc).getName(abc.constants, new ArrayList(), true))) { outName.setVal(obj); outNs.setVal(pkg); outPropNs.setVal(t.getName(abc).getNamespace(abc.constants).getName(abc.constants)); @@ -2212,7 +2212,7 @@ public class AVM2SourceGenerator implements SourceGenerator { continue; } Multiname clsName = ii.getName(abc.constants); - if (obj.equals(clsName.getName(abc.constants, new ArrayList(),true))) { + if (obj.equals(clsName.getName(abc.constants, new ArrayList(), true))) { if (eq(pkg, clsName.getNamespace(abc.constants).getName(abc.constants))) { //class found @@ -2220,7 +2220,7 @@ public class AVM2SourceGenerator implements SourceGenerator { if (t.getName(abc) == null) { //in traits phase 2 continue; } - if (propertyName.equals(t.getName(abc).getName(abc.constants, new ArrayList(),true))) { + if (propertyName.equals(t.getName(abc).getName(abc.constants, new ArrayList(), true))) { outName.setVal(obj); outNs.setVal(pkg); outPropNs.setVal(t.getName(abc).getNamespace(abc.constants).getName(abc.constants)); @@ -2240,7 +2240,7 @@ public class AVM2SourceGenerator implements SourceGenerator { if (t.getName(abc) == null) { //in traits phase 2 continue; } - if (propertyName.equals(t.getName(abc).getName(abc.constants, new ArrayList(),true))) { + if (propertyName.equals(t.getName(abc).getName(abc.constants, new ArrayList(), true))) { outName.setVal(obj); outNs.setVal(pkg); outPropNs.setVal(t.getName(abc).getNamespace(abc.constants).getName(abc.constants)); @@ -2258,7 +2258,7 @@ public class AVM2SourceGenerator implements SourceGenerator { Multiname superName = abc.constants.constant_multiname.get(ii.super_index); if (superName != null) { - return searchPrototypeChain(instanceOnly, abcs, superName.getNamespace(abc.constants).getName(abc.constants), superName.getName(abc.constants, new ArrayList(),true), propertyName, outName, outNs, outPropNs, outPropNsKind, outPropNsIndex, outPropType, outPropValue); + return searchPrototypeChain(instanceOnly, abcs, superName.getNamespace(abc.constants).getName(abc.constants), superName.getName(abc.constants, new ArrayList(), true), propertyName, outName, outNs, outPropNs, outPropNsKind, outPropNsIndex, outPropType, outPropValue); } else { return false; } @@ -2271,7 +2271,7 @@ public class AVM2SourceGenerator implements SourceGenerator { public static void parentNames(ABC abc, List allABCs, int name_index, List indices, List names, List namespaces, List outABCs) { indices.add(name_index); - names.add(abc.constants.constant_multiname.get(name_index).getName(abc.constants, new ArrayList(),true)); + names.add(abc.constants.constant_multiname.get(name_index).getName(abc.constants, new ArrayList(), true)); namespaces.add(abc.constants.constant_multiname.get(name_index).getNamespace(abc.constants).getName(abc.constants)); Multiname mname = abc.constants.constant_multiname.get(name_index); @@ -2284,7 +2284,7 @@ public class AVM2SourceGenerator implements SourceGenerator { for (ABC a : abcs) { for (int i = 0; i < a.instance_info.size(); i++) { Multiname m = a.constants.constant_multiname.get(a.instance_info.get(i).name_index); - if (m.getName(a.constants, new ArrayList(),true).equals(mname.getName(abc.constants, new ArrayList(),true))) { + if (m.getName(a.constants, new ArrayList(), true).equals(mname.getName(abc.constants, new ArrayList(), true))) { if (m.getNamespace(a.constants).hasName(a.constants, mname.getNamespace(abc.constants).getName(abc.constants))) { //Multiname superName = a.constants.constant_multiname.get(a.instance_info.get(i).super_index); @@ -2380,7 +2380,7 @@ public class AVM2SourceGenerator implements SourceGenerator { } for (InstanceInfo ii : abc.instance_info) { Multiname mname = abc.constants.constant_multiname.get(ii.name_index); - if (mname != null && name.equals(mname.getName(abc.constants, new ArrayList(),true))) { + if (mname != null && name.equals(mname.getName(abc.constants, new ArrayList(), true))) { if (mname.getNamespace(abc.constants).hasName(pkg, abc.constants)) { name_index = ii.name_index; break; @@ -2389,7 +2389,7 @@ public class AVM2SourceGenerator implements SourceGenerator { } for (int i = 1; i < abc.constants.constant_multiname.size(); i++) { Multiname mname = abc.constants.constant_multiname.get(i); - if (mname != null && name.equals(mname.getName(abc.constants, new ArrayList(),true))) { + if (mname != null && name.equals(mname.getName(abc.constants, new ArrayList(), true))) { if (mname.getNamespace(abc.constants) != null && pkg.equals(mname.getNamespace(abc.constants).getName(abc.constants))) { name_index = i; break; @@ -2399,7 +2399,7 @@ public class AVM2SourceGenerator implements SourceGenerator { if (name_index == 0) { if (pkg.isEmpty() && localData.currentScript != null /*FIXME!*/) { for (Trait t : localData.currentScript.traits.traits) { - if (t.getName(abc).getName(abc.constants, new ArrayList(),true).equals(name)) { + if (t.getName(abc).getName(abc.constants, new ArrayList(), true).equals(name)) { name_index = t.name_index; break; } diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/types/MethodBody.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/types/MethodBody.java index 3b09c6581..a2419a4c0 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/types/MethodBody.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/types/MethodBody.java @@ -12,7 +12,7 @@ * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public - * License along with this library. */ + * License along with this library. */ package com.jpexs.decompiler.flash.abc.types; import com.jpexs.decompiler.flash.AppStrings; diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/types/ScriptInfo.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/types/ScriptInfo.java index 3dfc3375b..403ebf610 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/types/ScriptInfo.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/types/ScriptInfo.java @@ -51,7 +51,7 @@ public class ScriptInfo { if ((ns.kind == Namespace.KIND_PACKAGE_INTERNAL) || (ns.kind == Namespace.KIND_PACKAGE)) { String packageName = ns.getName(abc.constants); //assume not null package - String objectName = name.getName(abc.constants, new ArrayList(),false); + String objectName = name.getName(abc.constants, new ArrayList(), false); List traitIndices = new ArrayList<>(); traitIndices.add(j); diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/usages/ClassNameMultinameUsage.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/usages/ClassNameMultinameUsage.java index db13ec67e..1416b83b8 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/usages/ClassNameMultinameUsage.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/usages/ClassNameMultinameUsage.java @@ -32,6 +32,6 @@ public class ClassNameMultinameUsage extends InsideClassMultinameUsage implement @Override public String toString() { - return "class " + abc.constants.getMultiname(abc.instance_info.get(classIndex).name_index).getNameWithNamespace(abc.constants,false); + return "class " + abc.constants.getMultiname(abc.instance_info.get(classIndex).name_index).getNameWithNamespace(abc.constants, false); } } diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/usages/InsideClassMultinameUsage.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/usages/InsideClassMultinameUsage.java index 2f71af1a0..b3e9fd7f1 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/usages/InsideClassMultinameUsage.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/usages/InsideClassMultinameUsage.java @@ -37,7 +37,7 @@ public abstract class InsideClassMultinameUsage extends MultinameUsage { @Override public String toString() { - return "class " + abc.constants.getMultiname(abc.instance_info.get(classIndex).name_index).getNameWithNamespace(abc.constants,false); + return "class " + abc.constants.getMultiname(abc.instance_info.get(classIndex).name_index).getNameWithNamespace(abc.constants, false); } public int getMultinameIndex() { diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/Action.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/Action.java index 6acfe2612..4cdf46962 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/Action.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/Action.java @@ -12,7 +12,7 @@ * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public - * License along with this library. */ + * License along with this library. */ package com.jpexs.decompiler.flash.action; import com.jpexs.decompiler.flash.AppStrings; diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/Deobfuscation.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/Deobfuscation.java index 16106fa27..6e5b078b9 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/Deobfuscation.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/Deobfuscation.java @@ -251,7 +251,7 @@ public class Deobfuscation { } public static String makeObfuscatedIdentifier(String s){ - return "\u00A7"+escapeOIdentifier(s)+"\u00A7"; + return "\u00A7" + escapeOIdentifier(s) + "\u00A7"; } diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/DefineLocalActionItem.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/DefineLocalActionItem.java index 11bdb7a13..6e88258d8 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/DefineLocalActionItem.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/DefineLocalActionItem.java @@ -12,7 +12,8 @@ * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public - * License along with this library. */ + * License along with this library. + */ package com.jpexs.decompiler.flash.action.model; import com.jpexs.decompiler.flash.SourceGeneratorLocalData; @@ -74,8 +75,8 @@ public class DefineLocalActionItem extends ActionItem implements SetTypeActionIt @Override public GraphTextWriter appendTo(GraphTextWriter writer, LocalData localData) throws InterruptedException { writer.append("var "); - - if (((name instanceof DirectValueActionItem)) && (((DirectValueActionItem) name).isString()) && (!Deobfuscation.isValidName(((DirectValueActionItem) name).toStringNoQuotes(localData),"this","super"))){ + + if (((name instanceof DirectValueActionItem)) && (((DirectValueActionItem) name).isString()) && (!Deobfuscation.isValidName(((DirectValueActionItem) name).toStringNoQuotes(localData), "this", "super"))) { writer.append(Deobfuscation.makeObfuscatedIdentifier(((DirectValueActionItem) name).toStringNoQuotes(localData))); } else { stripQuotes(name, localData, writer); diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/GetVariableActionItem.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/GetVariableActionItem.java index 52aceb4e3..f9263f66e 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/GetVariableActionItem.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/GetVariableActionItem.java @@ -12,7 +12,8 @@ * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public - * License along with this library. */ + * License along with this library. + */ package com.jpexs.decompiler.flash.action.model; import com.jpexs.decompiler.flash.SourceGeneratorLocalData; @@ -52,10 +53,10 @@ public class GetVariableActionItem extends ActionItem { @Override public GraphTextWriter appendTo(GraphTextWriter writer, LocalData localData) throws InterruptedException { - - if (((name instanceof DirectValueActionItem)) && (((DirectValueActionItem) name).isString()) && (!Deobfuscation.isValidName(((DirectValueActionItem) name).toStringNoQuotes(localData),"this","super"))){ + + if (((name instanceof DirectValueActionItem)) && (((DirectValueActionItem) name).isString()) && (!Deobfuscation.isValidName(((DirectValueActionItem) name).toStringNoQuotes(localData), "this", "super"))) { return writer.append(Deobfuscation.makeObfuscatedIdentifier(((DirectValueActionItem) name).toStringNoQuotes(localData))); - }else if ((!(name instanceof DirectValueActionItem)) || (!((DirectValueActionItem) name).isString())) { + } else if ((!(name instanceof DirectValueActionItem)) || (!((DirectValueActionItem) name).isString())) { writer.append("eval("); name.appendTo(writer, localData); return writer.append(")"); diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/SetVariableActionItem.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/SetVariableActionItem.java index 61237da09..b1addaa41 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/SetVariableActionItem.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/SetVariableActionItem.java @@ -12,13 +12,13 @@ * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public - * License along with this library. */ + * License along with this library. + */ package com.jpexs.decompiler.flash.action.model; import com.jpexs.decompiler.flash.SourceGeneratorLocalData; import com.jpexs.decompiler.flash.action.Deobfuscation; import com.jpexs.decompiler.flash.action.parser.script.ActionSourceGenerator; -import com.jpexs.decompiler.flash.action.parser.script.VariableActionItem; import com.jpexs.decompiler.flash.action.swf4.ActionPush; import com.jpexs.decompiler.flash.action.swf4.ActionSetVariable; import com.jpexs.decompiler.flash.action.swf4.RegisterNumber; @@ -72,12 +72,12 @@ public class SetVariableActionItem extends ActionItem implements SetTypeActionIt } @Override - public GraphTextWriter appendTo(GraphTextWriter writer, LocalData localData) throws InterruptedException { - if (((name instanceof DirectValueActionItem)) && (((DirectValueActionItem) name).isString()) && (!Deobfuscation.isValidName(((DirectValueActionItem) name).toStringNoQuotes(localData),"this","super"))){ + public GraphTextWriter appendTo(GraphTextWriter writer, LocalData localData) throws InterruptedException { + if (((name instanceof DirectValueActionItem)) && (((DirectValueActionItem) name).isString()) && (!Deobfuscation.isValidName(((DirectValueActionItem) name).toStringNoQuotes(localData), "this", "super"))) { writer.append(Deobfuscation.makeObfuscatedIdentifier(((DirectValueActionItem) name).toStringNoQuotes(localData))); writer.append(" = "); return value.toString(writer, localData); - }else if ((!(name instanceof DirectValueActionItem)) || (!((DirectValueActionItem) name).isString())) { + } else if ((!(name instanceof DirectValueActionItem)) || (!((DirectValueActionItem) name).isString())) { writer.append("set"); writer.spaceBeforeCallParenthesies(2); writer.append("("); diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/swf4/ActionPush.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/swf4/ActionPush.java index 1ed8db20e..df3a8229e 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/swf4/ActionPush.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/swf4/ActionPush.java @@ -12,7 +12,8 @@ * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public - * License along with this library. */ + * License along with this library. + */ package com.jpexs.decompiler.flash.action.swf4; import com.jpexs.decompiler.flash.EndOfStreamException; @@ -41,8 +42,6 @@ import java.io.IOException; import java.util.ArrayList; import java.util.HashMap; import java.util.List; -import java.util.logging.Level; -import java.util.logging.Logger; public class ActionPush extends Action { diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/tags/DefineButton2Tag.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/tags/DefineButton2Tag.java index 9c9ec8493..b8865918b 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/tags/DefineButton2Tag.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/tags/DefineButton2Tag.java @@ -12,7 +12,8 @@ * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public - * License along with this library. */ + * License along with this library. + */ package com.jpexs.decompiler.flash.tags; import com.jpexs.decompiler.flash.SWFInputStream; @@ -44,8 +45,6 @@ import java.util.ArrayList; import java.util.HashSet; import java.util.List; import java.util.Set; -import java.util.logging.Level; -import java.util.logging.Logger; /** * Extends the capabilities of DefineButton by allowing any state transition to diff --git a/libsrc/ffdec_lib/src/com/jpexs/helpers/Cache.java b/libsrc/ffdec_lib/src/com/jpexs/helpers/Cache.java index 2a78e7e9e..e2735b55d 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/helpers/Cache.java +++ b/libsrc/ffdec_lib/src/com/jpexs/helpers/Cache.java @@ -90,14 +90,14 @@ public class Cache { } public boolean contains(Object key) { - if (storageType == STORAGE_FILES) { + if (storageType == STORAGE_FILES) { return cacheFiles.containsKey(key); } else if (storageType == STORAGE_MEMORY) { return cacheMemory.containsKey(key); } return false; } - + public void clear() { cacheMemory.clear(); for (File f : cacheFiles.values()) { diff --git a/libsrc/ffdec_lib/src/com/jpexs/helpers/Helper.java b/libsrc/ffdec_lib/src/com/jpexs/helpers/Helper.java index ae87367bc..6d39af092 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/helpers/Helper.java +++ b/libsrc/ffdec_lib/src/com/jpexs/helpers/Helper.java @@ -12,7 +12,8 @@ * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public - * License along with this library. */ + * License along with this library. + */ package com.jpexs.helpers; import com.jpexs.decompiler.flash.AppStrings; diff --git a/libsrc/ffdec_lib/src/com/jpexs/helpers/ImmediateFuture.java b/libsrc/ffdec_lib/src/com/jpexs/helpers/ImmediateFuture.java index 1649907f0..bf70791b0 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/helpers/ImmediateFuture.java +++ b/libsrc/ffdec_lib/src/com/jpexs/helpers/ImmediateFuture.java @@ -12,7 +12,8 @@ * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public - * License along with this library. */ + * License along with this library. + */ package com.jpexs.helpers; import java.util.concurrent.ExecutionException; @@ -28,11 +29,11 @@ import java.util.concurrent.TimeoutException; public class ImmediateFuture implements Future { private final V value; - + public ImmediateFuture(V value) { this.value = value; } - + @Override public boolean cancel(boolean mayInterruptIfRunning) { return false; diff --git a/libsrc/ffdec_lib/src/com/jpexs/helpers/Searchable.java b/libsrc/ffdec_lib/src/com/jpexs/helpers/Searchable.java index d5f834fd3..597ab365a 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/helpers/Searchable.java +++ b/libsrc/ffdec_lib/src/com/jpexs/helpers/Searchable.java @@ -12,7 +12,8 @@ * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public - * License along with this library. */ + * License along with this library. + */ package com.jpexs.helpers; import java.io.InputStream; diff --git a/libsrc/ffdec_lib/src/com/jpexs/helpers/StreamSearch.java b/libsrc/ffdec_lib/src/com/jpexs/helpers/StreamSearch.java index 8f384270b..c04f54a85 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/helpers/StreamSearch.java +++ b/libsrc/ffdec_lib/src/com/jpexs/helpers/StreamSearch.java @@ -12,7 +12,8 @@ * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public - * License along with this library. */ + * License along with this library. + */ package com.jpexs.helpers; import java.io.IOException; diff --git a/libsrc/ffdec_lib/src/com/jpexs/helpers/SwfHeaderStreamSearch.java b/libsrc/ffdec_lib/src/com/jpexs/helpers/SwfHeaderStreamSearch.java index 40267165a..7576a79f4 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/helpers/SwfHeaderStreamSearch.java +++ b/libsrc/ffdec_lib/src/com/jpexs/helpers/SwfHeaderStreamSearch.java @@ -12,7 +12,8 @@ * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public - * License along with this library. */ + * License along with this library. + */ package com.jpexs.helpers; import java.io.IOException; diff --git a/libsrc/ffdec_lib/test/com/jpexs/decompiler/flash/ABCStreamTest.java b/libsrc/ffdec_lib/test/com/jpexs/decompiler/flash/ABCStreamTest.java index bece77fff..e7cc13636 100644 --- a/libsrc/ffdec_lib/test/com/jpexs/decompiler/flash/ABCStreamTest.java +++ b/libsrc/ffdec_lib/test/com/jpexs/decompiler/flash/ABCStreamTest.java @@ -17,7 +17,6 @@ package com.jpexs.decompiler.flash; import com.jpexs.decompiler.flash.abc.ABCInputStream; import com.jpexs.decompiler.flash.abc.ABCOutputStream; -////import com.jpexs.decompiler.flash.gui.Main; import com.jpexs.helpers.MemoryInputStream; import java.io.ByteArrayOutputStream; import java.io.IOException; diff --git a/libsrc/ffdec_lib/test/com/jpexs/decompiler/flash/ActionScript2AssemblerTest.java b/libsrc/ffdec_lib/test/com/jpexs/decompiler/flash/ActionScript2AssemblerTest.java index 282b1c830..3bbed7967 100644 --- a/libsrc/ffdec_lib/test/com/jpexs/decompiler/flash/ActionScript2AssemblerTest.java +++ b/libsrc/ffdec_lib/test/com/jpexs/decompiler/flash/ActionScript2AssemblerTest.java @@ -20,7 +20,6 @@ import com.jpexs.decompiler.flash.action.parser.ParseException; import com.jpexs.decompiler.flash.action.parser.pcode.ASMParser; import com.jpexs.decompiler.flash.configuration.Configuration; import com.jpexs.decompiler.flash.exporters.modes.ScriptExportMode; -////import com.jpexs.decompiler.flash.gui.Main; import com.jpexs.decompiler.flash.helpers.CodeFormatting; import com.jpexs.decompiler.flash.helpers.HilightedTextWriter; import com.jpexs.decompiler.flash.tags.DoActionTag; diff --git a/libsrc/ffdec_lib/test/com/jpexs/decompiler/flash/ActionScript2DeobfuscatorTest.java b/libsrc/ffdec_lib/test/com/jpexs/decompiler/flash/ActionScript2DeobfuscatorTest.java index ac7791e96..a643a4ec9 100644 --- a/libsrc/ffdec_lib/test/com/jpexs/decompiler/flash/ActionScript2DeobfuscatorTest.java +++ b/libsrc/ffdec_lib/test/com/jpexs/decompiler/flash/ActionScript2DeobfuscatorTest.java @@ -19,7 +19,6 @@ import com.jpexs.decompiler.flash.action.Action; import com.jpexs.decompiler.flash.action.parser.ParseException; import com.jpexs.decompiler.flash.action.parser.pcode.ASMParser; import com.jpexs.decompiler.flash.configuration.Configuration; -//import com.jpexs.decompiler.flash.gui.Main; import com.jpexs.decompiler.flash.helpers.CodeFormatting; import com.jpexs.decompiler.flash.helpers.HilightedTextWriter; import com.jpexs.decompiler.flash.tags.DoActionTag; diff --git a/libsrc/ffdec_lib/test/com/jpexs/decompiler/flash/ActionScript2ModificationTest.java b/libsrc/ffdec_lib/test/com/jpexs/decompiler/flash/ActionScript2ModificationTest.java index e22f8ab33..1428fa841 100644 --- a/libsrc/ffdec_lib/test/com/jpexs/decompiler/flash/ActionScript2ModificationTest.java +++ b/libsrc/ffdec_lib/test/com/jpexs/decompiler/flash/ActionScript2ModificationTest.java @@ -23,7 +23,6 @@ import com.jpexs.decompiler.flash.action.swf4.ActionJump; import com.jpexs.decompiler.flash.action.swf5.ActionGetMember; import com.jpexs.decompiler.flash.configuration.Configuration; import com.jpexs.decompiler.flash.exporters.modes.ScriptExportMode; -//import com.jpexs.decompiler.flash.gui.Main; import com.jpexs.decompiler.flash.helpers.CodeFormatting; import com.jpexs.decompiler.flash.helpers.HilightedTextWriter; import com.jpexs.decompiler.flash.tags.DoActionTag; diff --git a/libsrc/ffdec_lib/test/com/jpexs/decompiler/flash/ActionScript2ParserTest.java b/libsrc/ffdec_lib/test/com/jpexs/decompiler/flash/ActionScript2ParserTest.java index 4f3d4f3b6..08ec88b25 100644 --- a/libsrc/ffdec_lib/test/com/jpexs/decompiler/flash/ActionScript2ParserTest.java +++ b/libsrc/ffdec_lib/test/com/jpexs/decompiler/flash/ActionScript2ParserTest.java @@ -18,7 +18,6 @@ package com.jpexs.decompiler.flash; import com.jpexs.decompiler.flash.action.parser.ParseException; import com.jpexs.decompiler.flash.action.parser.script.ActionScriptParser; import com.jpexs.decompiler.flash.configuration.Configuration; -//import com.jpexs.decompiler.flash.gui.Main; import com.jpexs.decompiler.flash.tags.DoActionTag; import com.jpexs.decompiler.graph.CompilationException; import java.io.BufferedInputStream; diff --git a/libsrc/ffdec_lib/test/com/jpexs/decompiler/flash/ActionScript2Test.java b/libsrc/ffdec_lib/test/com/jpexs/decompiler/flash/ActionScript2Test.java index 8817ca9ea..70d5ef741 100644 --- a/libsrc/ffdec_lib/test/com/jpexs/decompiler/flash/ActionScript2Test.java +++ b/libsrc/ffdec_lib/test/com/jpexs/decompiler/flash/ActionScript2Test.java @@ -17,7 +17,6 @@ package com.jpexs.decompiler.flash; import com.jpexs.decompiler.flash.action.Action; import com.jpexs.decompiler.flash.configuration.Configuration; -//import com.jpexs.decompiler.flash.gui.Main; import com.jpexs.decompiler.flash.helpers.CodeFormatting; import com.jpexs.decompiler.flash.helpers.HilightedTextWriter; import com.jpexs.decompiler.flash.tags.DoActionTag; @@ -90,7 +89,7 @@ public class ActionScript2Test extends ActionStript2TestBase { @Test public void frame24_unicodeTest() { compareSrc(24, "trace(\"unicodeTest\");\r\n" - + "var k = \"היפופו×�מי, ×�ו ×�\";\r\n" + + "var k = \"היפופוטמי, או א\";\r\n" + "trace(k);\r\n" ); } diff --git a/libsrc/ffdec_lib/test/com/jpexs/decompiler/flash/ActionScript3Test.java b/libsrc/ffdec_lib/test/com/jpexs/decompiler/flash/ActionScript3Test.java index b2b22d920..ef93c4f32 100644 --- a/libsrc/ffdec_lib/test/com/jpexs/decompiler/flash/ActionScript3Test.java +++ b/libsrc/ffdec_lib/test/com/jpexs/decompiler/flash/ActionScript3Test.java @@ -18,7 +18,6 @@ package com.jpexs.decompiler.flash; import com.jpexs.decompiler.flash.abc.ABC; import com.jpexs.decompiler.flash.configuration.Configuration; import com.jpexs.decompiler.flash.exporters.modes.ScriptExportMode; -//import com.jpexs.decompiler.flash.gui.Main; import com.jpexs.decompiler.flash.helpers.CodeFormatting; import com.jpexs.decompiler.flash.helpers.HilightedTextWriter; import com.jpexs.decompiler.flash.helpers.NulWriter; diff --git a/libsrc/ffdec_lib/test/com/jpexs/decompiler/flash/ExportTest.java b/libsrc/ffdec_lib/test/com/jpexs/decompiler/flash/ExportTest.java index 6276ef2fd..27978bfcb 100644 --- a/libsrc/ffdec_lib/test/com/jpexs/decompiler/flash/ExportTest.java +++ b/libsrc/ffdec_lib/test/com/jpexs/decompiler/flash/ExportTest.java @@ -17,7 +17,6 @@ package com.jpexs.decompiler.flash; import com.jpexs.decompiler.flash.configuration.Configuration; import com.jpexs.decompiler.flash.exporters.modes.ScriptExportMode; -//import com.jpexs.decompiler.flash.gui.Main; import java.io.File; import java.io.FileInputStream; import java.io.FilenameFilter; diff --git a/libsrc/ffdec_lib/test/com/jpexs/decompiler/flash/RecompileTest.java b/libsrc/ffdec_lib/test/com/jpexs/decompiler/flash/RecompileTest.java index 06f9b7ea2..ae98329aa 100644 --- a/libsrc/ffdec_lib/test/com/jpexs/decompiler/flash/RecompileTest.java +++ b/libsrc/ffdec_lib/test/com/jpexs/decompiler/flash/RecompileTest.java @@ -24,7 +24,6 @@ import com.jpexs.decompiler.flash.action.parser.ParseException; import com.jpexs.decompiler.flash.action.parser.script.ActionScriptParser; import com.jpexs.decompiler.flash.configuration.Configuration; import com.jpexs.decompiler.flash.exporters.modes.ScriptExportMode; -//import com.jpexs.decompiler.flash.gui.Main; import com.jpexs.decompiler.flash.helpers.CodeFormatting; import com.jpexs.decompiler.flash.helpers.HilightedTextWriter; import com.jpexs.decompiler.flash.helpers.collections.MyEntry; diff --git a/libsrc/ffdec_lib/test/com/jpexs/decompiler/flash/generators/AS3Generator.java b/libsrc/ffdec_lib/test/com/jpexs/decompiler/flash/generators/AS3Generator.java index dc14e9019..231dcbeac 100644 --- a/libsrc/ffdec_lib/test/com/jpexs/decompiler/flash/generators/AS3Generator.java +++ b/libsrc/ffdec_lib/test/com/jpexs/decompiler/flash/generators/AS3Generator.java @@ -57,7 +57,7 @@ public class AS3Generator { StringBuilder s = new StringBuilder(); for (Trait t : abc.instance_info.get(classId).instance_traits.traits) { if (t instanceof TraitMethodGetterSetter) { - String name = t.getName(abc).getName(abc.constants, new ArrayList(),true); + String name = t.getName(abc).getName(abc.constants, new ArrayList(), true); if (name.startsWith("test")) { s.append("@Test\r\npublic void "); s.append(name); diff --git a/src/com/jpexs/decompiler/flash/gui/LicenseUpdater.java b/src/com/jpexs/decompiler/flash/gui/LicenseUpdater.java index 29ce3022f..dcc7e2a3b 100644 --- a/src/com/jpexs/decompiler/flash/gui/LicenseUpdater.java +++ b/src/com/jpexs/decompiler/flash/gui/LicenseUpdater.java @@ -34,39 +34,38 @@ import java.util.regex.Pattern; public class LicenseUpdater { public static void updateLicense() { - updateLicenseInDir(new File(".\\src\\"),false); - updateLicenseInDir(new File(".\\test\\"),false); - updateLicenseInDir(new File(".\\libsrc\\ffdec_lib\\src\\"),true); - updateLicenseInDir(new File(".\\libsrc\\ffdec_lib\\test\\"),true); + updateLicenseInDir(new File(".\\src\\"), false); + updateLicenseInDir(new File(".\\test\\"), false); + updateLicenseInDir(new File(".\\libsrc\\ffdec_lib\\src\\"), true); + updateLicenseInDir(new File(".\\libsrc\\ffdec_lib\\test\\"), true); } /** * Script for updating license header in java files :-) * * @param dir Star directory (e.g. "src/") + * @param lgpl */ public static void updateLicenseInDir(File dir, boolean lgpl) { - - + /* - Copyright (c) ${year}, ${owner}, All rights reserved. + Copyright (c) ${year}, ${owner}, All rights reserved. -This library is free software; you can redistribute it and/or -modify it under the terms of the GNU Lesser General Public -License as published by the Free Software Foundation; either -version 3.0 of the License, or (at your option) any later version. + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 3.0 of the License, or (at your option) any later version. -This library is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -Lesser General Public License for more details. + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. -You should have received a copy of the GNU Lesser General Public -License along with this library. + You should have received a copy of the GNU Lesser General Public + License along with this library. - */ - + */ int defaultStartYear = 2010; int defaultFinalYear = 2014; String defaultAuthor = "JPEXS"; @@ -75,28 +74,27 @@ License along with this library. defaultYearStr += "-" + defaultFinalYear; } String gplLicense = "/*\r\n * Copyright (C) {year} {author}\r\n * \r\n * This program is free software: you can redistribute it and/or modify\r\n * it under the terms of the GNU General Public License as published by\r\n * the Free Software Foundation, either version 3 of the License, or\r\n * (at your option) any later version.\r\n * \r\n * This program is distributed in the hope that it will be useful,\r\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\r\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\r\n * GNU General Public License for more details.\r\n * \r\n * You should have received a copy of the GNU General Public License\r\n * along with this program. If not, see .\r\n */"; - - + String lgplLicense = "/*\r\n * Copyright (C) {year} {author}, All rights reserved.\r\n * \r\n" - + " * This library is free software; you can redistribute it and/or\r\n" + -" * modify it under the terms of the GNU Lesser General Public\r\n" + -" * License as published by the Free Software Foundation; either\r\n" + -" * version 3.0 of the License, or (at your option) any later version.\r\n" + -" * \r\n" + -" * This library is distributed in the hope that it will be useful,\r\n" + -" * but WITHOUT ANY WARRANTY; without even the implied warranty of\r\n" + -" * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU\r\n" + -" * Lesser General Public License for more details.\r\n" + -" * \r\n" + -" * You should have received a copy of the GNU Lesser General Public\r\n" + -" * License along with this library.\r"+ -" */"; - String license = lgpl?lgplLicense:gplLicense; + + " * This library is free software; you can redistribute it and/or\r\n" + + " * modify it under the terms of the GNU Lesser General Public\r\n" + + " * License as published by the Free Software Foundation; either\r\n" + + " * version 3.0 of the License, or (at your option) any later version.\r\n" + + " * \r\n" + + " * This library is distributed in the hope that it will be useful,\r\n" + + " * but WITHOUT ANY WARRANTY; without even the implied warranty of\r\n" + + " * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU\r\n" + + " * Lesser General Public License for more details.\r\n" + + " * \r\n" + + " * You should have received a copy of the GNU Lesser General Public\r\n" + + " * License along with this library.\r" + + " */"; + String license = lgpl ? lgplLicense : gplLicense; File[] files = dir.listFiles(); for (File f : files) { if (f.isDirectory()) { - updateLicenseInDir(f,lgpl); + updateLicenseInDir(f, lgpl); } else { if (f.getName().endsWith(".java")) { ByteArrayOutputStream baos = new ByteArrayOutputStream(); @@ -113,7 +111,7 @@ License along with this library. packageFound = true; pw.println(license.replace("{year}", yearStr).replace("{author}", author)); } else { - Matcher mAuthor = Pattern.compile(lgpl?"^.*Copyright \\(C\\) ([0-9]+)(-[0-9]+)? (.*), All rights reserved.*":"^.*Copyright \\(C\\) ([0-9]+)(-[0-9]+)? (.*)$").matcher(s); + Matcher mAuthor = Pattern.compile(lgpl ? "^.*Copyright \\(C\\) ([0-9]+)(-[0-9]+)? (.*), All rights reserved.*" : "^.*Copyright \\(C\\) ([0-9]+)(-[0-9]+)? (.*)$").matcher(s); if (mAuthor.matches()) { author = mAuthor.group(3).trim(); int startYear = Integer.parseInt(mAuthor.group(1).trim()); diff --git a/src/com/jpexs/decompiler/flash/gui/Main.java b/src/com/jpexs/decompiler/flash/gui/Main.java index a04ea85cd..3c4c455aa 100644 --- a/src/com/jpexs/decompiler/flash/gui/Main.java +++ b/src/com/jpexs/decompiler/flash/gui/Main.java @@ -878,7 +878,7 @@ public class Main { * @throws IOException */ public static void main(String[] args) throws IOException { - + String pluginPath = Configuration.pluginPath.get(); if (pluginPath != null && !pluginPath.isEmpty()) { try { diff --git a/src/com/jpexs/decompiler/flash/gui/QuickFindPanel.java b/src/com/jpexs/decompiler/flash/gui/QuickFindPanel.java index 6795c1767..22a76611b 100644 --- a/src/com/jpexs/decompiler/flash/gui/QuickFindPanel.java +++ b/src/com/jpexs/decompiler/flash/gui/QuickFindPanel.java @@ -163,7 +163,6 @@ public class QuickFindPanel extends JPanel implements ActionListener { } } - public void showQuickFind(final JTextComponent t, DocumentSearchData ds) { dsd = new WeakReference<>(ds); oldCaretPosition = t.getCaretPosition(); diff --git a/test/SampleTest.java b/test/SampleTest.java index 306b8f624..5f458efd1 100644 --- a/test/SampleTest.java +++ b/test/SampleTest.java @@ -14,6 +14,7 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ + import org.testng.annotations.Test; /** @@ -26,5 +27,5 @@ public class SampleTest { public void testDecompilePcode() { System.out.println("Hello, this is a test"); } - + }