RFR: 8263561: Re-examine uses of LinkedList

Thiago Henrique Hüpner github.com+13357965+thihup at openjdk.java.net
Fri May 21 14:55:16 UTC 2021


On Fri, 26 Feb 2021 10:48:33 GMT, Сергей Цыпанов <github.com+10835776+stsypanov at openjdk.org> wrote:

> The usage of `LinkedList` is senseless and can be replaced with either `ArrayList` or `ArrayDeque` which are both more compact and effective.
> 
> jdk:tier1 and jdk:tier2 are both ok

src/java.base/share/classes/jdk/internal/util/jar/JarIndex.java line 154:

> 152:      * @param fileName the key of the mapping
> 153:      */
> 154:     public List<String> get(String fileName) {

IcedTea-Web seems to be using this method reflectively:
https://github.com/AdoptOpenJDK/IcedTea-Web/blob/master/common/src/main/java/net/adoptopenjdk/icedteaweb/jdk89access/JarIndexAccess.java#L80

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

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


More information about the core-libs-dev mailing list