Uploaded image for project: 'Lucene - Core'
  1. Lucene - Core
  2. LUCENE-2277

QueryNodeImpl throws ConcurrentModificationException on add(List<QueryNode>)

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Critical
    • Resolution: Fixed
    • Affects Version/s: 3.0
    • Fix Version/s: 2.9.4, 3.0.3, 3.1, 4.0-ALPHA
    • Component/s: modules/other
    • Labels:
      None
    • Environment:

      all

    • Lucene Fields:
      New, Patch Available

      Description

      on adding a List of children to a QueryNodeImplemention a ConcurrentModificationException is thrown.
      This is due to the fact that QueryNodeImpl instead of iteration over the supplied list, iterates over its internal clauses List.

      Patch:
      Index: QueryNodeImpl.java
      ===================================================================
      — QueryNodeImpl.java (revision 911642)
      +++ QueryNodeImpl.java (working copy)
      @@ -74,7 +74,7 @@
      .getLocalizedMessage(QueryParserMessages.NODE_ACTION_NOT_SUPPORTED));
      }

      • for (QueryNode child : getChildren()) {
        + for (QueryNode child : children) { add(child); }

        Attachments

        1. LUCENE-2277.patch
          3 kB
          Robert Muir
        2. addChildren.patch
          0.4 kB
          Frank Wesemann

          Activity

            People

            • Assignee:
              rcmuir Robert Muir
              Reporter:
              wese Frank Wesemann
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: