Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 3 Next »

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.

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.

  • No labels