Fix concurrent modification

This commit is contained in:
Victor Shcherb 2016-06-03 12:18:06 +03:00
parent 9142ad05ff
commit dbc2ee0f6a
2 changed files with 2 additions and 5 deletions

View file

@ -152,10 +152,6 @@ public class PoiUIFilter implements SearchPoiTypeFilter, Comparable<PoiUIFilter>
return savedFilterByName; return savedFilterByName;
} }
public List<Amenity> getCurrentSearchResult() {
return currentSearchResult;
}
public List<Amenity> searchAgain(double lat, double lon) { public List<Amenity> searchAgain(double lat, double lon) {
List<Amenity> amenityList ; List<Amenity> amenityList ;

View file

@ -47,7 +47,8 @@ public class SearchByNameFilter extends PoiUIFilter {
elimit = true; elimit = true;
} }
if (matcher.publish(object)) { if (matcher.publish(object)) {
currentSearchResult.add(object); // Causes concurrent modification exception (below)
// currentSearchResult.add(object);
return true; return true;
} }
return false; return false;