PDA

View Full Version : [CLOSED] AbstractGridFilters removeAll causes ConcurrentModificationException



britterm
19 Apr 2011, 6:26 AM
Calling "removeAll" on an AbstractGridFilters object will throw a ConcurrentModificationException because the code is looping through a Collection while modifying that Collection. (gxt 2.2.2)



/**
* Removes all filters.
*/
public void removeAll() {
Collection<Filter> temp = filters.values();
for (Filter f : temp) {
removeFilter(f);
}
}

/**
* Removes the given filter.
*
* @param filter the filter to be removed
*/
public void removeFilter(Filter filter) {
filters.remove(filter.getDataIndex());
filter.removeListener(Events.Update, filterListener);
filter.removeListener(Events.Activate, filterListener);
filter.removeListener(Events.Deactivate, filterListener);
}

britterm
26 Apr 2011, 7:42 AM
Any news on this bug?

sven
28 Apr 2011, 11:40 PM
This was already fixed on the 26th of november 2010 in SVN