...
The addressCopy
array holds a copy of the IP addresses and can be safely iterated operated upon outside the synchronized block. This code does not violate CON11-J. Do not synchronize on a collection view if the backing collection is accessible, because while it does synchronize on a collection view (the synchronizedList
), the backing collection is inaccessible, and therefore cannot be modified by any code.
...