On Mon, 19 Sep 2022 06:55:50 GMT, Andrey Turbanov <[email protected]> wrote:

> Field PropertyEditorSupport.listeners is accessed only under 
> `synchronized(this)`.
> It means extra synchronization by Vector is not needed.

src/java.desktop/share/classes/java/beans/PropertyEditorSupport.java line 301:

> 299:     @SuppressWarnings("unchecked")
> 300:     private <T> ArrayList<T> unsafeClone(ArrayList<T> v) {
> 301:         return (ArrayList<T>)v.clone();

I think this can be simplified by using the new list in place of "unsafeClone".

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

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

Reply via email to