String oldFilter = this.filter;
this.filter = filter;
if (!EqualsUtil.isEqual(this.filter, oldFilter)) {
clearSelectedFeatures(); // these features may not comply with the current filter
cache.clear(); // need to clear this cache as this contains data for another filter
handlerManager.fireEvent(new LayerFilteredEvent(this));
}
}