On Mon, 2 Mar 2026 22:20:41 GMT, Phil Race <[email protected]> wrote:

> java.beans.beancontext.BeanContextSupport has add() and remove() methods 
> which synchronize on their arguments.
> 
> 1) This won't work with value types such as Integer, Byte, Short, etc ..
> 2) It seems unnecessary. The sychronization is already wrapped in       
>  synchronized(BeanContext.globalHierarchyLock) {
> ..
> }
> 
> The diff looks big but that's because it has to ex-dent a bunch of lines. It 
> is really just a 4 line change.

This pull request has now been integrated.

Changeset: 784dd56c
Author:    Phil Race <[email protected]>
URL:       
https://git.openjdk.org/jdk/commit/784dd56ce2fbbbf4d94740e1ce0438907e59f575
Stats:     96 lines in 1 file changed: 27 ins; 34 del; 35 mod

8378999: BeanContextSupport.add(Object) synchronizes on its argument

Reviewed-by: aivanov, serb

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

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

Reply via email to