<i18n dev> RFR: 8263561: Re-examine uses of LinkedList

Alan Bateman alanb at openjdk.java.net
Mon Mar 15 06:59:07 UTC 2021


On Sun, 14 Mar 2021 17:26:07 GMT, Alan Bateman <alanb at openjdk.org> wrote:

>> Looks like it's never specified in JavaDoc which particular implementation of List is used in fields of affected classes, so it's quite odd to me that someone would rely on that when using reflection. But your point about backward compatibility is reasonable, so I'll revert mentioned changes.
>
> Nothing outside of the JDK should be hacking into this private field of a non-exposed class, this should not be a concern here.

> @AlanBateman so is it ok to keep `ArrayLists`?

One thing to look out for is usages of 2-arg add method that inserts at a specific position. This shouldn't be a concern in URLClassPath.closeLoaders (assuming this is this usage where the question arises).

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

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


More information about the i18n-dev mailing list