title: java.util.ConcurrentModificationException android after remove elements from array list
body: <p>I have the folloing code in my android app:</p>
  
  <pre><code>/**
   * callback executed after fetching the data.
   */
  public void OnPointsFetch(ArrayList&lt;Shop&gt; result) {
  
      toggleLoader(false);
  
      this.shops = result;
  
      if(activeFilter == Constants.POINTS_FILTER_AVAILABLE){
          for(Shop s : result){
              if(s.getClientPoints().getPointsAvailable() == 0){
                  this.shops.remove(s);
              }
          }
      }
      else{
          for(Shop s : result){
              if(s.getClientPoints().getPointsSpent() == 0){
                  this.shops.remove(s);
              }   
          }
      }
  
  
      ptsListAdapter.setCollection(this.shops);
      ptsListAdapter.setFilter(this.activeFilter);
  
  }
  </code></pre>
  
  <p>This method is called on the result of an async task. I need to remove some elements of the collection before passing to the list adapter.</p>
  
  <pre><code>    11-23 17:39:59.760: E/AndroidRuntime(19777): java.util.ConcurrentModificationException
  11-23 17:39:59.760: E/AndroidRuntime(19777):    at java.util.ArrayList$ArrayListIterator.next(ArrayList.java:569)
  </code></pre>