RFR(XS): 8166604: nio: remove unneeded locals variables and correct NPE
christoph.langer at sap.com
Fri Sep 23 14:21:30 UTC 2016
Thanks, Alan, for reviewing.
If I don't hear otherwise, I'll push this on monday with the dst null check completely removed.
From: Alan Bateman [mailto:Alan.Bateman at oracle.com]
Sent: Freitag, 23. September 2016 16:15
To: Langer, Christoph <christoph.langer at sap.com>; nio-dev at openjdk.java.net
Subject: Re: RFR(XS): 8166604: nio: remove unneeded locals variables and correct NPE
On 23/09/2016 08:18, Langer, Christoph wrote:
please review a small cleanup in nio socket and datagram channel that I have spotted.
I would even suggest to completely remove the null check throwing NPE in DatagramChannelImpl.receive(ByteBuffer dst) as an NPE would implicitly be thrown when dst is null and dst.isReadOnly() is called. The current behavior would not change then.
Checking dst for null is redundant as you observe but what you have in the current patch looks fine.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the nio-dev