Avoid using synchronization on any value-based classes

This rule flags any synchronization on instances of value-based classes. Synchronization on the following classes within your application is discouraged:

Also, synchronization should be avoided on the interface java.lang.ProcessHandle, its implementation classes, and the implementation classes of the collection factories in java.util: List.of, List.copyOf, Set.of, Set.copyOf, Map.of, Map.copyOf, Map.ofEntries, and Map.entry.

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.