-
Bug
-
Resolution: Won't Fix
-
P4
-
None
-
None
The method java.beans.beancontext.BeanContextSupport.add(Object targetChild) performs a synchronization on an object received in argument which is an unsafe practice. This code will fail with primitive objects (JEP 401).
The issue has been detected by running test api/java_beans/beancontext/BeanContextSupport/Simple.html
with the VM flag -XX:DiagnoseSyncOnValueBasedClasses=1
which produces the following result:
fatal error: Synchronizing on object 0x0000100006057008 of klass java.lang.Integer at java.beans.beancontext.BeanContextSupport.add(BeanContextSupport.java:406)
The issue has been detected by running test api/java_beans/beancontext/BeanContextSupport/Simple.html
with the VM flag -XX:DiagnoseSyncOnValueBasedClasses=1
which produces the following result:
fatal error: Synchronizing on object 0x0000100006057008 of klass java.lang.Integer at java.beans.beancontext.BeanContextSupport.add(BeanContextSupport.java:406)