...
Holder
is mutable because a new ImmutablePoint
instance can be assigned to it using the setPoint()
method. If one thread updates the value of the ipoint
field, another thread may still see the reference of the old value. This is a violation of CON28-J. Synchronize access to shared fields that refer to immutable dataDo not assume that classes having only immutable objects are immutable.
Compliant Solution (visibility)
...