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 7ec467459..4bf8ff906 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 @@ -50,6 +50,8 @@ import java.util.logging.Logger; */ public class ScriptPack extends AS3ClassTreeItem { + private static final Logger logger = Logger.getLogger(ScriptPack.class.getName()); + public final ABC abc; public final int scriptIndex; @@ -174,12 +176,12 @@ public class ScriptPack extends AS3ClassTreeItem { }, timeout, TimeUnit.SECONDS); } catch (TimeoutException ex) { writer.continueMeasure(); - Logger.getLogger(ScriptPack.class.getName()).log(Level.SEVERE, "Decompilation error", ex); + logger.log(Level.SEVERE, "Decompilation error", ex); Helper.appendTimeoutComment(writer, timeout); return; } catch (ExecutionException ex) { writer.continueMeasure(); - Logger.getLogger(ScriptPack.class.getName()).log(Level.SEVERE, "Decompilation error", ex); + logger.log(Level.SEVERE, "Decompilation error", ex); Helper.appendErrorComment(writer, ex); return; } @@ -205,10 +207,10 @@ public class ScriptPack extends AS3ClassTreeItem { FileTextWriter writer2 = exportSettings.singleFile ? exportSettings.singleFileWriter : writer; toSource(writer2, abc.script_info.get(scriptIndex).traits.traits, exportSettings.mode, parallel); } catch (InterruptedException ex) { - Logger.getLogger(ScriptPack.class.getName()).log(Level.SEVERE, null, ex); + logger.log(Level.SEVERE, null, ex); } } catch (FileNotFoundException ex) { - Logger.getLogger(ScriptPack.class.getName()).log(Level.SEVERE, "The file path is probably too long", ex); + logger.log(Level.SEVERE, "The file path is probably too long", ex); } return file; 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 d453841d5..e01a14714 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 @@ -50,6 +50,8 @@ import java.util.logging.Logger; public final class MethodBody implements Cloneable { + private static final Logger logger = Logger.getLogger(MethodBody.class.getName()); + @Internal public boolean deleted; @@ -113,7 +115,7 @@ public final class MethodBody implements Cloneable { avm2Code = new AVM2Code(ais); } catch (UnknownInstructionCode | IOException ex) { avm2Code = new AVM2Code(); - Logger.getLogger(MethodBody.class.getName()).log(Level.SEVERE, null, ex); + logger.log(Level.SEVERE, null, ex); } avm2Code.compact(); code = avm2Code; @@ -224,9 +226,9 @@ public final class MethodBody implements Cloneable { throw ex; } catch (Exception | OutOfMemoryError | StackOverflowError ex) { if (ex instanceof TimeoutException) { - Logger.getLogger(MethodBody.class.getName()).log(Level.SEVERE, "Decompilation timeout in " + path, ex); + logger.log(Level.SEVERE, "Decompilation timeout in " + path, ex); } else { - Logger.getLogger(MethodBody.class.getName()).log(Level.SEVERE, "Decompilation error in " + path, ex); + logger.log(Level.SEVERE, "Decompilation error in " + path, ex); } convertException = ex; Throwable cause = ex.getCause(); @@ -278,7 +280,7 @@ public final class MethodBody implements Cloneable { try { deobfuscated.removeTraps(constants, trait, method_info.get(this.method_info), b, abc, scriptIndex, classIndex, isStatic, path); } catch (StackOverflowError ex) { - Logger.getLogger(MethodBody.class.getName()).log(Level.SEVERE, "Error during remove traps in " + path, ex); + logger.log(Level.SEVERE, "Error during remove traps in " + path, ex); } } //deobfuscated.restoreControlFlow(constants, b); diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/parser/pcode/ASMParser.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/parser/pcode/ASMParser.java index c0cd69e43..94cde5bb0 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/parser/pcode/ASMParser.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/parser/pcode/ASMParser.java @@ -138,6 +138,8 @@ import java.util.logging.Logger; public class ASMParser { + private static final Logger logger = Logger.getLogger(ASMParser.class.getName()); + public static ActionList parse(boolean ignoreNops, List