On Mon, 27 Feb 2023 22:59:42 GMT, Roger Riggs <rri...@openjdk.org> wrote:
>> `LinkedList` is used as a field >> `jdk.tools.jimage.JImageTask.OptionsValues#jimages` >> It's created, filled (with `add`) and then iterated. No removes from the >> head or something like this. `ArrayList` should be preferred as more >> efficient and widely used (more chances for JIT) collection. > > IMHO, there is not enough value in this change to continue the review. It > should be closed without integrating. @RogerRiggs I believe it's [common](https://twitter.com/stuartmarks/status/1241522641707532289) [knowledge](https://mobile.twitter.com/kuksenk0/status/1299412730672304128) that LinkedList is not a best collection nowadays. OpenJDK source code is a reference implementation, and people look at its code. And when people see that OpenJDK guys use LinkedList (As I can see it's still have 234 usages in OpenJDK), it's confusing and creates questions. I believe cleaning OpenJDK repository from outdated usages could speed up LinkedList obsoleteness. ------------- PR: https://git.openjdk.org/jdk/pull/12760