From 97385bd6346edfbd35f2f1d42f2f22d7b2099660 Mon Sep 17 00:00:00 2001 From: Honfika Date: Mon, 9 Sep 2013 18:07:42 +0200 Subject: [PATCH] these files were accidentally not commited in the last 2 commit, sorry --- .../com/jpexs/decompiler/flash/abc/types/traits/Traits.java | 1 - .../jpexs/decompiler/flash/ActionScript2AssemblerTest.java | 2 +- trunk/test/com/jpexs/decompiler/flash/ActionScript3Test.java | 2 +- trunk/test/com/jpexs/decompiler/flash/ExportTest.java | 2 +- trunk/test/com/jpexs/decompiler/flash/RecompileTest.java | 2 +- .../com/jpexs/decompiler/flash/generators/AS2Generator.java | 2 +- .../com/jpexs/decompiler/flash/generators/AS3Generator.java | 4 ++-- 7 files changed, 7 insertions(+), 8 deletions(-) diff --git a/trunk/src/com/jpexs/decompiler/flash/abc/types/traits/Traits.java b/trunk/src/com/jpexs/decompiler/flash/abc/types/traits/Traits.java index f307a31a0..33473d67c 100644 --- a/trunk/src/com/jpexs/decompiler/flash/abc/types/traits/Traits.java +++ b/trunk/src/com/jpexs/decompiler/flash/abc/types/traits/Traits.java @@ -134,7 +134,6 @@ public class Traits implements Serializable { } else { traitConvertTasks = new ArrayList<>(); } - pcode = true; for (int t = 0; t < traits.length; t++) { TraitConvertTask task = new TraitConvertTask(traits[t], makePackages, path, abcTags, abc, isStatic, pcode, scriptIndex, classIndex, highlighting, fullyQualifiedNames, t, parallel); if (parallel) { diff --git a/trunk/test/com/jpexs/decompiler/flash/ActionScript2AssemblerTest.java b/trunk/test/com/jpexs/decompiler/flash/ActionScript2AssemblerTest.java index 5be10e6c0..6a6a9cdde 100644 --- a/trunk/test/com/jpexs/decompiler/flash/ActionScript2AssemblerTest.java +++ b/trunk/test/com/jpexs/decompiler/flash/ActionScript2AssemblerTest.java @@ -57,7 +57,7 @@ public class ActionScript2AssemblerTest { DoActionTag doa = getFirstActionTag(); doa.setActionBytes(Action.actionsToBytes(actions, true, swf.version)); String actualResult = Action.actionsToSource(doa.getActions(swf.version), swf.version, "", false); - String decompiled = doa.getASMSource(swf.version, false, false); + String decompiled = doa.getASMSource(swf.version, false, false, null); assertEquals(actualResult.trim(), "ok = false;"); assertTrue(decompiled.contains("Push \"ok\" false")); diff --git a/trunk/test/com/jpexs/decompiler/flash/ActionScript3Test.java b/trunk/test/com/jpexs/decompiler/flash/ActionScript3Test.java index d9b9f8911..1a7c6cbad 100644 --- a/trunk/test/com/jpexs/decompiler/flash/ActionScript3Test.java +++ b/trunk/test/com/jpexs/decompiler/flash/ActionScript3Test.java @@ -42,7 +42,7 @@ public class ActionScript3Test { private void decompileMethod(String methodName, String expectedResult, boolean isStatic) { int bodyIndex = abc.findMethodBodyByName(clsIndex, methodName); assertTrue(bodyIndex > -1); - String actualResult = abc.bodies[bodyIndex].toString(methodName, false, isStatic, -1/*FIX?*/, clsIndex, abc, abc.constants, abc.method_info, new Stack(), false, false, new ArrayList(), abc.instance_info[clsIndex].instance_traits); + String actualResult = abc.bodies[bodyIndex].toString(methodName, false, isStatic, -1/*FIX?*/, clsIndex, abc, abc.constants, abc.method_info, new Stack(), false, false, true, new ArrayList(), abc.instance_info[clsIndex].instance_traits); actualResult = actualResult.replaceAll("[ \r\n]", ""); expectedResult = expectedResult.replaceAll("[ \r\n]", ""); assertEquals(actualResult, expectedResult); diff --git a/trunk/test/com/jpexs/decompiler/flash/ExportTest.java b/trunk/test/com/jpexs/decompiler/flash/ExportTest.java index 1e21eafef..97f2a3389 100644 --- a/trunk/test/com/jpexs/decompiler/flash/ExportTest.java +++ b/trunk/test/com/jpexs/decompiler/flash/ExportTest.java @@ -64,7 +64,7 @@ public class ExportTest { if (!dir.exists()) { return new Object[0][0]; } - File files[] = dir.listFiles(new FilenameFilter() { + File[] files = dir.listFiles(new FilenameFilter() { @Override public boolean accept(File dir, String name) { return name.toLowerCase().endsWith(".swf"); diff --git a/trunk/test/com/jpexs/decompiler/flash/RecompileTest.java b/trunk/test/com/jpexs/decompiler/flash/RecompileTest.java index 328fe17d1..da4981161 100644 --- a/trunk/test/com/jpexs/decompiler/flash/RecompileTest.java +++ b/trunk/test/com/jpexs/decompiler/flash/RecompileTest.java @@ -31,7 +31,7 @@ public class RecompileTest { if (!dir.exists()) { return; } - File files[] = dir.listFiles(new FilenameFilter() { + File[] files = dir.listFiles(new FilenameFilter() { @Override public boolean accept(File dir, String name) { return name.toLowerCase().endsWith(".swf"); diff --git a/trunk/test/com/jpexs/decompiler/flash/generators/AS2Generator.java b/trunk/test/com/jpexs/decompiler/flash/generators/AS2Generator.java index aea24f048..9b8488b35 100644 --- a/trunk/test/com/jpexs/decompiler/flash/generators/AS2Generator.java +++ b/trunk/test/com/jpexs/decompiler/flash/generators/AS2Generator.java @@ -42,7 +42,7 @@ public class AS2Generator { } - String srcs[] = src.split("[\r\n]+"); + String[] srcs = src.split("[\r\n]+"); String testName="frame"+frame+"_Test"; String pref="trace(\""; for(String p:srcs){ diff --git a/trunk/test/com/jpexs/decompiler/flash/generators/AS3Generator.java b/trunk/test/com/jpexs/decompiler/flash/generators/AS3Generator.java index 2182e3ec2..f6abcf04d 100644 --- a/trunk/test/com/jpexs/decompiler/flash/generators/AS3Generator.java +++ b/trunk/test/com/jpexs/decompiler/flash/generators/AS3Generator.java @@ -43,8 +43,8 @@ public class AS3Generator { s.append("(){\r\ndecompileMethod(\""); s.append(name); s.append("\", "); - String src = abc.findBody(((TraitMethodGetterSetter) t).method_info).toString("", false, false, -1/*FIX?*/, classId, abc, abc.constants, abc.method_info, new Stack(), false, false, new ArrayList(), abc.instance_info[classId].instance_traits); - String srcs[] = src.split("[\r\n]+"); + String src = abc.findBody(((TraitMethodGetterSetter) t).method_info).toString("", false, false, -1/*FIX?*/, classId, abc, abc.constants, abc.method_info, new Stack(), false, false, true, new ArrayList(), abc.instance_info[classId].instance_traits); + String[] srcs = src.split("[\r\n]+"); for (int i = 0; i < srcs.length; i++) { String ss = srcs[i]; s.append("\"");