SoftHashMap

SoftHashMap is a HashMap that uses soft references. Soft references will be nulled their targets garbage collected under some circumstances by JVMs as they seek memory.

Prior to uPortal 2.4.3 / 2.5.1 / 2.6.0, SoftHashMap usages in uPortal were not properly synchronized such that it was possible for concurrent modification to a SoftHashMap to leave the object in a bad state. Worst case resultant scenario included threads looping forever. UP-1145.

One solution, the solution committed to CVS for the versions referenced above, is to brute force synchronize usages of this map with a Collections.synchronizedMap() .

Another solution is to change the SoftHashMap implementation to be backed by the inherently threadsafe ConcurrentHashMap available in backport-util.