You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@calcite.apache.org by "Siyuan Liu (JIRA)" <ji...@apache.org> on 2018/09/04 07:41:19 UTC

[jira] [Created] (CALCITE-2525) ConcurrentModificationException may be triggered in ElasticsearchProject

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)