RFR: 8303690: Prefer ArrayList to LinkedList in com.sun.jmx.mbeanserver.Introspector

Chris Plummer cjplummer at openjdk.org
Mon Mar 6 20:37:17 UTC 2023


On Thu, 2 Mar 2023 20:16:35 GMT, Andrey Turbanov <aturbanov at openjdk.org> wrote:

> `LinkedList` is used as value in `com.sun.jmx.mbeanserver.Introspector.SimpleIntrospector#cache`
> 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 collection.
> Also I've done some related code cleaned:
> 1. removed redundand `if` from `SoftReference` value check
> 2. fixed a typo in javadoc

Marked as reviewed by cjplummer (Reviewer).

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

PR: https://git.openjdk.org/jdk/pull/12839


More information about the serviceability-dev mailing list