On Fri, 11 Nov 2022 07:00:52 GMT, Andrey Turbanov <aturba...@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

Reply via email to