It seems UnmappedResourceHandler
is loading composite components xhtml files within the resources folder. The result seems a gradually increasing memory leak.
The leak can be found within FaceletViewHandlingStrategy.metadataCache
.
It relies on a hashmap and when above handler is used UnmappedResources
are used as the key for CompositeComponentBeanInfo
instances.
If the UnmappedResourceHandler
isn't used, the key contains ResourceImpl
. The difference is that UnmappedResource
does not implement equals()
as ResourceImpl
does:
@Override
public boolean equals(Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
ResourceImpl resource = (ResourceImpl) o;
return resourceInfo.equals(resource.resourceInfo);
}
So problem seems that in the first case CompositeComponentBeanInfo
is added again and again to the metadataCache
. In the second everything works as expected.
Anyone else can confirm this issue?