RFR: JDK-8167648: java.io.PrintWriter should have PrintWriter((String|File), Charset) constructors (original) (raw)

Patrick Reinhart patrick at reini.net
Wed Nov 23 13:45:59 UTC 2016


On 2016-11-23 14:35, Jonathan Bluett-Duncan wrote:

Hi Patrick,

Have you considered making withAutoFlush() return the PrintWriter itself, allowing fluent code snippets like the following? _ _PrintWriter writer = new PrintWriter(new File("path/to/file.txt"),_ _StandardCharsets.UTF8).withAutoFlush();_ _

Good point. I taught about it, but it somehow got lost on the way of re-wiring the constructors... :-)

Just updated the webrev

-Patrick



More information about the core-libs-dev mailing list