Memory Leak on FilterModel

Description

There is probably a Memory Leak on the field ServerModel.filterModels (a collection of FilterModel).
As a FilterModel reference the service/bundle of a filter, when a bundle is refreshed/updated, the classloader can't be garbage collected.

The methode ServerModel.removeFilterModel checks only the filterClass on the filterModel. If the filterClass is not set, then the FilterModel is not found and not removed.

However, when a Filter is registered throught the whiteboard extender, it doesn't fill the filterClass field :

  • FilterWebElement.register() call webContainer.registerFilter(<filter>) without the class

  • HttpServiceStarted.registerFilter call the constructor FilterModel() without a filterClass

Environment

None

Status

Assignee

Jean-Baptiste Onofre

Reporter

Jérémie Brébec

Labels

None

Components

Fix versions

Affects versions

Priority

Critical
Configure