This rule flags any primitive wrapper class constructors. Primitive wrapper class constructors were deprecated in Java SE 16. Also, any synchronization on primitive wrapper objects is discouraged. Remove the usage of the following constructors within your application:
java.lang.Bytejava.lang.Shortjava.lang.Integerjava.lang.Longjava.lang.Floatjava.lang.Doublejava.lang.Booleanjava.lang.Character
You should also avoid synchronizing on these value-based classes. For runtime warnings about synchronizing
on value-based classes you can use the -XX:DiagnoseSyncOnValueBasedClasses command-line option.
Instead, synchronize on a small custom object.
For more information on these jdk changes, see What's New in JDK 16.
For more information on the feature change, see Warnings for Value-Based Classes.