-
Type:
Bug
-
Resolution: Unresolved
-
Priority:
P4
-
Affects Version/s: 27
-
Component/s: client-libs
-
None
java.beans.beancontext.BeanContextSupport.add(Object targetChild)
synchronizes on its argument.
This can be anything, including a type which is a Valhalla value type (eg Integer) and you can't synchronize on a value type.
import java.beans.beancontext.BeanContextSupport;
public class BCT {
public static void main(String[] argv) {
BeanContextSupport bcs = new BeanContextSupport();
bcs.add(Integer.valueOf(1));
}
}
% java --enable-preview BCT
Exception in thread "main" java.lang.IdentityException: Cannot synchronize on an instance of value class java.lang.Integer
at java.desktop/java.beans.beancontext.BeanContextSupport.add(BeanContextSupport.java:425)
at BCT.main(BCT.java:7)
synchronizes on its argument.
This can be anything, including a type which is a Valhalla value type (eg Integer) and you can't synchronize on a value type.
import java.beans.beancontext.BeanContextSupport;
public class BCT {
public static void main(String[] argv) {
BeanContextSupport bcs = new BeanContextSupport();
bcs.add(Integer.valueOf(1));
}
}
% java --enable-preview BCT
Exception in thread "main" java.lang.IdentityException: Cannot synchronize on an instance of value class java.lang.Integer
at java.desktop/java.beans.beancontext.BeanContextSupport.add(BeanContextSupport.java:425)
at BCT.main(BCT.java:7)
- relates to
-
JDK-8321428 Deprecate for removal the package java.beans.beancontext
-
- Resolved
-
- links to
-
Review(master)
openjdk/jdk/30008