martes, octubre 11, 2011

Remove Item from List - Preventing java.util.ConcurrentModificationException

     Long gListTemporal=-1L;
      for( Iterator< GrupoInfVO > it = gList.iterator(); it.hasNext() ; )
          {
              GrupoInfVO str = it.next();
              if(str.getxIdGin().equals(gListTemporal) ){
                  it.remove();
              }
              else{
                  gListTemporal = str.getxIdGin();
           }
      }



Leia Mais…

Entradas populares