From 0526241d2fef8c97553fbf328b0bb24142db52e7 Mon Sep 17 00:00:00 2001 From: asal Date: Wed, 3 Jan 2007 14:38:15 +0000 Subject: [PATCH] bugfix 1626107 git-svn-id: https://svn.code.sf.net/p/jode/code/trunk@1404 379699f6-c40d-0410-875b-85095c16579e --- jode/src/net/sf/jode/decompiler/ClassAnalyzer.java | 2 +- jode/src/net/sf/jode/decompiler/TabbedPrintWriter.java | 7 ++++++- 2 files changed, 7 insertions(+), 2 deletions(-) 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 {