karaf-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Andreas Pieber (Work started) (JIRA)" <j...@apache.org>
Subject [jira] [Work started] (KARAF-1065) TextDumpProvider.createDump(DumpDestination) does not flush OutputStreamWriter
Date Wed, 30 Nov 2011 14:57:41 GMT

     [ https://issues.apache.org/jira/browse/KARAF-1065?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Work on KARAF-1065 started by Andreas Pieber.

> 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

        

Mime
View raw message