RFR: 8276994: java/nio/channels/Channels/TransferTo.java leaves multi-GB files in /tmp

Lance Andersen lancea at openjdk.java.net
Sun Nov 14 14:58:30 UTC 2021


On Sun, 14 Nov 2021 14:43:50 GMT, Markus KARG <duke at openjdk.java.net> wrote:

>> If you change from an interface to a particular implementation you give the reader the impression that the code will only work with this particular implementation, and you give the impression that the code will only work in a particular sequence when using List or LinkedList, which both is not true. The Collection interface was chosen deliberately to clearly tell the reader that both is completely irrelevant and may be changed at any time if needed. If I do what you want, others will fear to break something. So i would like to stay with the code as-is.
>
> What *actual* benefit will you reach in this *particular* source code by using array list instead of linked list?

There is really no need to use a LinkedList so the use of a List is just simpler.

-------------

PR: https://git.openjdk.java.net/jdk/pull/6379


More information about the nio-dev mailing list