Karaf
  1. Karaf
  2. KARAF-1065

TextDumpProvider.createDump(DumpDestination) does not flush OutputStreamWriter

    Details

      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();
          }
      

        Activity

          People

          • Assignee:
            Andreas Pieber
            Reporter:
            Enrico Pizzorno
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development