summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorRoman Shevchenko <roman.shevchenko@jetbrains.com>2014-07-03 15:21:11 +0200
committerRoman Shevchenko <roman.shevchenko@jetbrains.com>2014-07-03 15:21:11 +0200
commitef85e779c69773001d9d4673993f537e5db11a35 (patch)
tree5686d31adbb6b684d81e2484a97b9ae83088e1aa /src
parent84d16304db72d4cce9fb93f3cabc2d631e45e879 (diff)
downloadfernflower-ef85e779c69773001d9d4673993f537e5db11a35.tar
fernflower-ef85e779c69773001d9d4673993f537e5db11a35.tar.gz
fernflower-ef85e779c69773001d9d4673993f537e5db11a35.tar.lz
fernflower-ef85e779c69773001d9d4673993f537e5db11a35.tar.xz
fernflower-ef85e779c69773001d9d4673993f537e5db11a35.zip
context cleaning
Diffstat (limited to 'src')
-rw-r--r--src/de/fernflower/main/Fernflower.java6
-rw-r--r--src/de/fernflower/main/decompiler/IdeDecompiler.java10
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();
+ }
+ }
+
}