Request for Review and Sponsor needed: JDK-8167648: java.io.PrintWriter should have PrintWriter((String|File), Charset) constructors
jason_mehrens at hotmail.com
Tue Dec 27 15:14:23 UTC 2016
You should add a subclass test to prove that it works in practice. If the subclasses are required to override the method then shouldn't the 'withAutoFlush' method check that getClass() == PrintWriter.class otherwise throw something like UnsupportedOperationException?
From: Patrick Reinhart <patrick at reini.net>
Sent: Tuesday, December 27, 2016 8:46 AM
To: Jason Mehrens
Subject: Re: Request for Review and Sponsor needed: JDK-8167648: java.io.PrintWriter should have PrintWriter((String|File), Charset) constructors
At the moment, a subclass would need to overwrite this method with the
same behaviour. The other solution would be to make the internal state
auto-flush to no longer be final.
On 2016-12-21 22:40, Jason Mehrens wrote:
> How is 'withAutoFlush' expected to behave for subclasses of
More information about the core-libs-dev