Buffered output can hide failures
A write may appear successful until a later flush or close reports an error. Flush at meaningful boundaries and handle close failures rather than ignoring them.
- @imsa-mehta▲ 3
Appreciate the write-up on "Buffered output can hide failures". Useful for anyone using java / io.
Clear note on java / io. "Buffered output can hide failures" is the kind of detail that is easy to overlook.
Appreciate the write-up on "Buffered output can hide failures". Useful for anyone using java / io.
Thoughtful
Neat
- @saltysamm▲ 1
Specific and to the point: "Buffered output can hide failures". Worth a look if you touch java / io.
- @sohumm15▲ 1
"Buffered output can hide failures" is a useful thing to know about with java / io. Thanks for sharing it.
PrintWriterandPrintStreamnever throwIOException; callcheckError()to detect failures that were swallowed. Other platform gotchas welcome in the comments.- @sohmeh▲ 1
"Buffered output can hide failures" is a useful thing to know about with java / io. Thanks for sharing it.
- @dearsohum▲ 1
"Buffered output can hide failures" is a useful thing to know about with java / io. Thanks for sharing it.
- @aarya-mehta▲ 1
Specific and to the point: "Buffered output can hide failures". Worth a look if you touch java / io.
- @ohmshawas23▲ 1
Precise
Worked