RFR 4358774: Add null InputStream and OutputStream (original) (raw)
Alan Bateman Alan.Bateman at oracle.com
Fri Dec 8 12:39:19 UTC 2017
- Previous message: RFR 4358774: Add null InputStream and OutputStream
- Next message: RFR 4358774: Add null InputStream and OutputStream
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
On 07/12/2017 22:55, Brian Burkhalter wrote:
Hi Roger,
I agree. It does not seem that whatever performance improvement might accrue from not using the Objects methods is offset by the increased code readability in addition to mitigating the risks mentioned in [1]. I have reinstated this approach in http://cr.openjdk.java.net/~bpb/4358774/webrev.02/. I read through the javadoc again and I think it looks good.
On the implementation then Sergey has a point, the requireNonNull isn't needed to check b when b.length is used on the next line. One other nit is that the "overridden for efficiency" comment between @Override and the method declaration is a distraction. I don't think the comment is needed or just put it on the same line or above the @Overview so it doesn't get in the way.
The NullXXX tests can be converted to TestNG unit tests if you have cycles.
-Alan
- Previous message: RFR 4358774: Add null InputStream and OutputStream
- Next message: RFR 4358774: Add null InputStream and OutputStream
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]