From ef85e779c69773001d9d4673993f537e5db11a35 Mon Sep 17 00:00:00 2001 From: Roman Shevchenko Date: Thu, 3 Jul 2014 15:21:11 +0200 Subject: context cleaning --- src/de/fernflower/main/Fernflower.java | 6 +++++- src/de/fernflower/main/decompiler/IdeDecompiler.java | 10 +++++++--- 2 files changed, 12 insertions(+), 4 deletions(-) diff --git a/src/de/fernflower/main/Fernflower.java b/src/de/fernflower/main/Fernflower.java index a712450..4f84c89 100644 --- a/src/de/fernflower/main/Fernflower.java +++ b/src/de/fernflower/main/Fernflower.java @@ -65,7 +65,11 @@ public class Fernflower implements IDecompiledData { structcontext.saveContext(); } - + + public void clearContext() { + DecompilerContext.setCurrentContext(null); + } + public String getClassEntryName(StructClass cl, String entryname) { ClassNode node = clprocessor.getMapRootClasses().get(cl.qualifiedName); diff --git a/src/de/fernflower/main/decompiler/IdeDecompiler.java b/src/de/fernflower/main/decompiler/IdeDecompiler.java index 4f3b899..d3dc36b 100644 --- a/src/de/fernflower/main/decompiler/IdeDecompiler.java +++ b/src/de/fernflower/main/decompiler/IdeDecompiler.java @@ -44,7 +44,11 @@ public class IdeDecompiler { } public void decompileContext() { - fernflower.decompileContext(); - } - + try { + fernflower.decompileContext(); + } finally { + fernflower.clearContext(); + } + } + } -- cgit v1.2.3