The code is in portuguese, i'm sorry about that.
I read in another question here at SO that the exception was being thrown because I was using progSelecionada.remove(), so I changed toi iterator.remove() but the error remains.
Can someone explain to me what I may be doing wrong?
final List<Programacao> programacoesASeremRemovidas = new ArrayList<Programacao>(
this.programacoesDaEscala.size());
programacoesASeremRemovidas.addAll(this.programacoesDaEscala);
final List<Programacao> programacoesEmpresas = Cache.getInstance().getProgramacoes(
this.empresasSelecionadas);
for (final Iterator<Programacao> iterator = programacoesEmpresas.iterator(); iterator.hasNext();)
{
final Programacao progSelecionada = iterator.next();
for (final Programacao progEmpresa : programacoesEmpresas)
{
if (progSelecionada.getId() == progEmpresa.getId())
{
iterator.remove();
}
}
}