...
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. Do not assume that classes having only immutable objects members are immutable.
Compliant Solution (visibility)
...