RFR 4358774: Add null InputStream and OutputStream

Brian Burkhalter brian.burkhalter at oracle.com
Thu Dec 7 22:55:19 UTC 2017


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/.

Thanks,

Brian

On Dec 7, 2017, at 2:04 PM, Roger Riggs <Roger.Riggs at Oracle.com> wrote:


> For checking indices, I think you should leverage the work done for java.util.Objects.checkFromIndexSize(...)
> as optimized for this purpose in 8135248.  That was extensively designed and reviewed for optimal performance.
> 
> Regards, Roger
> 
> [1] https://bugs.openjdk.java.net/browse/JDK-8135248



More information about the core-libs-dev mailing list