diff --git a/jode/src/net/sf/jode/decompiler/ClassAnalyzer.java b/jode/src/net/sf/jode/decompiler/ClassAnalyzer.java index 462d2da..7651f6b 100644 --- a/jode/src/net/sf/jode/decompiler/ClassAnalyzer.java +++ b/jode/src/net/sf/jode/decompiler/ClassAnalyzer.java @@ -670,7 +670,7 @@ public class ClassAnalyzer dumpSource(writer, pl, 0.8, 0.2); if (pl != null) pl.updateProgress(1.0, name); - writer.close(); + writer.flush(); } public boolean isScopeOf(Object obj, int scopeType) { diff --git a/jode/src/net/sf/jode/decompiler/TabbedPrintWriter.java b/jode/src/net/sf/jode/decompiler/TabbedPrintWriter.java index 89cd974..00d6464 100644 --- a/jode/src/net/sf/jode/decompiler/TabbedPrintWriter.java +++ b/jode/src/net/sf/jode/decompiler/TabbedPrintWriter.java @@ -851,8 +851,13 @@ class NlRemover extends Writer { } public void flush() throws IOException { - if (out != null) + if (out != null) { + while (pendingNL > 0) { + out.write('\n'); + pendingNL--; + } out.flush(); + } } public void write(int x) throws IOException {