You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@karaf.apache.org by "Andreas Pieber (Closed) (JIRA)" <ji...@apache.org> on 2011/12/01 09:39:40 UTC
[jira] [Closed] (KARAF-1065)
TextDumpProvider.createDump(DumpDestination) does not flush
OutputStreamWriter
[ https://issues.apache.org/jira/browse/KARAF-1065?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Andreas Pieber closed KARAF-1065.
---------------------------------
Resolution: Fixed
Thank you very much for the report
Committing to https://svn.apache.org/repos/asf/karaf/trunk ...
M diagnostic/core/src/main/java/org/apache/karaf/diagnostic/core/common/TextDumpProvider.java
Committed r1208996
Committing to https://svn.apache.org/repos/asf/karaf/branches/karaf-2.2.x ...
M diagnostic/core/src/main/java/org/apache/karaf/diagnostic/core/common/TextDumpProvider.java
Committed r1208997
> 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, 3.0.0
> Reporter: Enrico Pizzorno
> Assignee: Andreas Pieber
> Labels: diagnostics
> Fix For: 2.2.5, 3.0.0
>
>
> 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