mirror of
https://git.huckle.dev/Huckles-Minecraft-Archive/jpexs-decompiler.git
synced 2026-06-15 16:12:14 +00:00
base class for ParseException, avm2.ConstantPool renamed to AVM2ConstantPool
This commit is contained in:
@@ -12,11 +12,12 @@
|
||||
* 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;
|
||||
import com.jpexs.decompiler.flash.action.Action;
|
||||
import com.jpexs.decompiler.flash.action.parser.ActionParseException;
|
||||
import com.jpexs.decompiler.flash.action.parser.pcode.ASMParser;
|
||||
import com.jpexs.decompiler.flash.configuration.Configuration;
|
||||
import com.jpexs.decompiler.flash.exporters.modes.ScriptExportMode;
|
||||
@@ -70,7 +71,7 @@ public class ActionScript2AssemblerTest extends ActionStript2TestBase {
|
||||
|
||||
assertEquals(actualResult.trim(), "ok = false;");
|
||||
assertTrue(decompiled.contains("Push \"ok\" false") || decompiled.contains("Push constant0 false"));
|
||||
assertTrue(decompiled.contains("Push \"ok\" false") || decompiled.contains("Push constant0 false"));
|
||||
} catch (IOException | ActionParseException | InterruptedException ex) {
|
||||
fail();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -17,7 +17,7 @@
|
||||
package com.jpexs.decompiler.flash;
|
||||
|
||||
import com.jpexs.decompiler.flash.action.Action;
|
||||
import com.jpexs.decompiler.flash.action.parser.ParseException;
|
||||
import com.jpexs.decompiler.flash.action.parser.ActionParseException;
|
||||
import com.jpexs.decompiler.flash.action.parser.pcode.ASMParser;
|
||||
import com.jpexs.decompiler.flash.configuration.Configuration;
|
||||
import com.jpexs.decompiler.flash.helpers.CodeFormatting;
|
||||
@@ -85,7 +85,7 @@ public class ActionScript2DeobfuscatorTest extends ActionStript2TestBase {
|
||||
String actualResult = writer.toString();
|
||||
|
||||
assertTrue(actualResult.contains("case \"c\":"));
|
||||
} catch (IOException | ParseException | InterruptedException ex) {
|
||||
} catch (IOException | ActionParseException | InterruptedException ex) {
|
||||
fail();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -12,12 +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;
|
||||
|
||||
import com.jpexs.decompiler.flash.action.Action;
|
||||
import com.jpexs.decompiler.flash.action.ActionList;
|
||||
import com.jpexs.decompiler.flash.action.ActionList;
|
||||
import com.jpexs.decompiler.flash.action.parser.ActionParseException;
|
||||
import com.jpexs.decompiler.flash.action.parser.pcode.ASMParser;
|
||||
import com.jpexs.decompiler.flash.action.swf4.ActionJump;
|
||||
import com.jpexs.decompiler.flash.action.swf5.ActionGetMember;
|
||||
@@ -83,7 +84,7 @@ public class ActionScript2ModificationTest extends ActionStript2TestBase {
|
||||
expectedResult = cleanPCode(expectedResult);
|
||||
|
||||
Assert.assertEquals(actualResult, expectedResult);
|
||||
Assert.assertEquals(actualResult, expectedResult);
|
||||
} catch (IOException | ActionParseException | InterruptedException ex) {
|
||||
fail();
|
||||
}
|
||||
}
|
||||
@@ -104,7 +105,7 @@ public class ActionScript2ModificationTest extends ActionStript2TestBase {
|
||||
expectedResult = cleanPCode(expectedResult);
|
||||
|
||||
Assert.assertEquals(actualResult, expectedResult);
|
||||
Assert.assertEquals(actualResult, expectedResult);
|
||||
} catch (IOException | ActionParseException | InterruptedException ex) {
|
||||
fail();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -12,10 +12,11 @@
|
||||
* 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.parser.ActionParseException;
|
||||
import com.jpexs.decompiler.flash.action.parser.script.ActionScriptParser;
|
||||
import com.jpexs.decompiler.flash.configuration.Configuration;
|
||||
import com.jpexs.decompiler.flash.tags.DoActionTag;
|
||||
|
||||
@@ -20,8 +20,9 @@ import com.jpexs.decompiler.flash.abc.ABC;
|
||||
import com.jpexs.decompiler.flash.abc.ClassPath;
|
||||
import com.jpexs.decompiler.flash.abc.NotSameException;
|
||||
import com.jpexs.decompiler.flash.abc.ScriptPack;
|
||||
import com.jpexs.decompiler.flash.abc.avm2.parser.AVM2ParseException;
|
||||
import com.jpexs.decompiler.flash.action.Action;
|
||||
import com.jpexs.decompiler.flash.action.parser.ParseException;
|
||||
import com.jpexs.decompiler.flash.action.parser.ActionParseException;
|
||||
import com.jpexs.decompiler.flash.action.parser.script.ActionScriptParser;
|
||||
import com.jpexs.decompiler.flash.configuration.Configuration;
|
||||
import com.jpexs.decompiler.flash.exporters.modes.ScriptExportMode;
|
||||
@@ -89,7 +90,7 @@ public class RecompileTest {
|
||||
ActionScriptParser par = new ActionScriptParser(swfVersion);
|
||||
try {
|
||||
asm.setActions(par.actionsFromString(as));
|
||||
} catch (ParseException | CompilationException ex) {
|
||||
} catch (ActionParseException | CompilationException ex) {
|
||||
fail("Unable to parse: " + item.getSwf().getShortFileName() + "/" + item.toString());
|
||||
}
|
||||
writer = new HilightedTextWriter(new CodeFormatting(), false);
|
||||
@@ -98,7 +99,7 @@ public class RecompileTest {
|
||||
as2 = asm.removePrefixAndSuffix(as2);
|
||||
try {
|
||||
asm.setActions(par.actionsFromString(as2));
|
||||
} catch (ParseException | CompilationException ex) {
|
||||
} catch (ActionParseException | CompilationException ex) {
|
||||
fail("Unable to parse: " + item.getSwf().getShortFileName() + "/" + item.toString());
|
||||
}
|
||||
writer = new HilightedTextWriter(new CodeFormatting(), false);
|
||||
@@ -118,7 +119,7 @@ public class RecompileTest {
|
||||
}
|
||||
|
||||
@Test(dataProvider = "provideFiles")
|
||||
public void testDirectEditing(String filename) throws IOException, InterruptedException, com.jpexs.decompiler.flash.abc.avm2.parser.ParseException, CompilationException {
|
||||
public void testDirectEditing(String filename) throws IOException, InterruptedException, AVM2ParseException, CompilationException {
|
||||
Configuration.autoDeobfuscate.set(false);
|
||||
try {
|
||||
SWF swf = new SWF(new BufferedInputStream(new FileInputStream(TESTDATADIR + File.separator + filename)), false);
|
||||
|
||||
Reference in New Issue
Block a user