TextDumpProvider.createDump(DumpDestination) does not flush OutputStreamWriter
------------------------------------------------------------------------------
Key: KARAF-1065
URL: https://issues.apache.org/jira/browse/KARAF-1065
Project: Karaf
Issue Type: Bug
Components: karaf-admin
Affects Versions: 2.2.4
Reporter: Enrico Pizzorno
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:
{noformat}
public final void createDump(DumpDestination destination) throws Exception {
OutputStream outputStream = destination.add(name);
OutputStreamWriter writer = new OutputStreamWriter(outputStream);
writeDump(writer);
writer.close();
outputStream.close();
}
{noformat}
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators:
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira