Integrated: 8303690: Prefer ArrayList to LinkedList in com.sun.jmx.mbeanserver.Introspector
Andrey Turbanov
aturbanov at openjdk.org
Wed Mar 8 07:23:22 UTC 2023
The message from this sender included one or more files
which could not be scanned for virus detection; do not
open these files unless you are certain of the sender's intent.
----------------------------------------------------------------------
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
This pull request has now been integrated.
Changeset: 1d071d08
Author: Andrey Turbanov <aturbanov at openjdk.org>
URL: https://git.openjdk.org/jdk/commit/1d071d0817714ee2f1bd2af5f9556f7d268dd0fa
Stats: 8 lines in 1 file changed: 1 ins; 3 del; 4 mod
8303690: Prefer ArrayList to LinkedList in com.sun.jmx.mbeanserver.Introspector
Reviewed-by: stsypanov, kevinw, cjplummer, sspitsyn
-------------
PR: https://git.openjdk.org/jdk/pull/12839
More information about the serviceability-dev
mailing list