RFR: 8298449: Unnecessary Vector usage in MetaData.ProxyPersistenceDelegate
SWinxy
duke at openjdk.org
Fri Dec 9 06:56:44 UTC 2022
On Fri, 11 Nov 2022 07:00:52 GMT, Andrey Turbanov <aturbanov at openjdk.org> wrote:
> `Vector<Object> args` is used only in single method and then it converted to `Object[]`.
> So we can avoid usage of legacy synchronized `Vector` here and use `ArrayList` instead.
src/java.desktop/share/classes/java/beans/MetaData.java line 159:
> 157: java.lang.reflect.InvocationHandler ih = java.lang.reflect.Proxy.getInvocationHandler(p);
> 158: if (ih instanceof EventHandler eh) {
> 159: ArrayList<Object> args = new ArrayList<>();
Suggestion:
List<Object> args = new ArrayList<>();
-------------
PR: https://git.openjdk.org/jdk/pull/11103
More information about the client-libs-dev
mailing list