Download Reference Manual
The Developer's Library for D
About Wiki Forums Source Search Contact

Ticket #1433 (closed defect: fixed)

Opened 11 years ago

Last modified 11 years ago

tango.io.stream.FormatOutput.flush doesn't flush an overridden stream

Reported by: Deewiant Assigned to: kris
Priority: major Milestone: 0.99.8
Component: IO Version: trunk
Keywords: Cc:

Description

FormatOutput doesn't override OutputFilter.flush. Flushing it works by default because OutputFilter.sink is set to FormatOutput.output in FormatOutput's constructor. But if FormatOutput.stream(OutputStream) is used to change FormatOutput.output, it is the original, OutputFilter.sink which is flushed, and not the new FormatOutput.output.

The issue can be worked around by calling FormatOutput.stream.flush instead of FormatOutput.flush directly.

I haven't looked at the other streams in tango.io.stream, it's entirely possible that this issue is shared by all of them which allow setting of the output stream.

Change History

01/10/09 22:10:20 changed by kris

  • status changed from new to assigned.

01/18/09 03:56:31 changed by kris

  • status changed from assigned to closed.
  • resolution set to fixed.

(In [4260]) fixes #1433 :: tango.io.stream.FormatOutput?.flush doesn't flush an overridden stream. Also fixes 1441, by adding a check for Eof

Kudos to Deewiant (and mandel)