Details
-
Type:
Bug
-
Status: Closed
-
Priority:
Major
-
Resolution: Fixed
-
Affects Version/s: 2.2.4, 3.0.0
-
Component/s: karaf
-
Labels:
Description
I think there's a problem at class org.apache.karaf.diagnostic.core.common.TextDumpProvider from version 2.2.4 (and trunk). The code at method public final void createDump(DumpDestination destination) creates a new OutputStreamWriter for the OutputStream returned by the dump destination but after calling writeDump does not enforce an OutputStreamWriter's flush.
Changing the method to something like this solves the problem:
public final void createDump(DumpDestination destination) throws Exception {
OutputStream outputStream = destination.add(name);
OutputStreamWriter writer = new OutputStreamWriter(outputStream);
writeDump(writer);
writer.close();
outputStream.close();
}