Siyuan Liu created CALCITE-2525:
-----------------------------------

             Summary: ConcurrentModificationException may be triggered in 
ElasticsearchProject
                 Key: CALCITE-2525
                 URL: https://issues.apache.org/jira/browse/CALCITE-2525
             Project: Calcite
          Issue Type: Bug
          Components: elasticsearch-adapter
    Affects Versions: next
            Reporter: Siyuan Liu
            Assignee: Julian Hyde
             Fix For: next


{code:java}
//in ElasticsearchProject
for (String opfield : implementor.list) {
  if (opfield.startsWith("\"_source\"")) {
    implementor.list.remove(opfield);
  }
}
{code}
The ConcurrentModificationException will be trigged when `opField` which are 
iterating on is removed. This code should be replaced with 
list.removeIf(Predicate)



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to