RFR: 8265891: (ch) InputStream returned by Channels.newInputStream should override transferTo [v6]
Markus KARG
github.com+1701815+mkarg at openjdk.java.net
Thu Jul 29 20:00:34 UTC 2021
On Thu, 29 Jul 2021 16:42:35 GMT, Brian Burkhalter <bpb at openjdk.org> wrote:
>> The JavaDocs in `InputStream::transferTo` *cleary* tell the caller that there is **no** guarantee of *any* specific behavior in that particular case:
>>>The behavior for the case where the input and/or output stream is asynchronously closed, or the thread interrupted during the transfer, is highly input and output stream specific, and therefore not specified.
>
> Good point.
:-)
>> This is a question of style and personal likes. Code maintenance is much easier if variables are defined *near* to its first use, not *far away* (as in the Pascal or C language). If the reviewers want me to change it, I will do it.
>
> It's actually a matter of convention but I think it can remain as it is.
Ok for me, otherwise just clearly tell me and I do change it.
-------------
PR: https://git.openjdk.java.net/jdk/pull/4263
More information about the nio-dev
mailing list