Affects Version/s: 2.1.8, 2.1.19
Fix Version/s: 2.2.5
Tested with 2.1.8 but AFAI can tell no changes have been made in this regard in 2.1.19
The static descriptors cache in javax.faces.component.UIComponentBase can cause classloader / PermGen memory leaks if embedded in container.
Somebody tried to consider that:
- <p><strong>IMPLEMENTATION NOTE</strong> - This is implemented as a
- <code>WeakHashMap</code> so that, even if this class is embedded in a
- container's class loader that is a parent to webapp class loaders,
- references to the classes will eventually expire.</p>
However, with a WeakHashMap only the key is weak referenced, the value still has a strong reference. In this case the value is a Map<String, PropertyDescriptor> and in that PropertyDescriptor there is a java.util.Hashtable table with a key "type" whose value may be a Class loaded within the web applications classloader, and the strong reference chain to that class will prevent the classloader from being garbage collected upon redeploy.