Commons JXPath
  1. Commons JXPath
  2. JXPATH-49

JXPathContextReferenceImpl not thread safe

    Details

    • Type: Bug Bug
    • Status: Resolved
    • Priority: Blocker Blocker
    • Resolution: Fixed
    • Affects Version/s: 1.1 Final
    • Fix Version/s: None
    • Labels:
      None
    • Environment:

      Operating System: All
      Platform: All

      Description

      The cache used to store compiled xpaths in JXPathContextReferenceImpl is not
      thread-safe. Here's the exception that showsup as a result in stress tests.

      Exception Stack Trace: java.util.ConcurrentModificationException
      at java.util.HashMap$HashIterator.nextEntry(HashMap.java:762)
      at java.util.HashMap$EntryIterator.next(HashMap.java:804)
      at
      org.apache.commons.jxpath.ri.JXPathContextReferenceImpl.cleanupCache(JXPathContextReferenceImpl.java:270)

      at
      org.apache.commons.jxpath.ri.JXPathContextReferenceImpl.compileExpression(JXPathContextReferenceImpl.java:252)

      at
      org.apache.commons.jxpath.ri.JXPathContextReferenceImpl.iteratePointers(JXPathContextReferenceImpl.java:493)

        Activity

        Henri Yandell made changes -
        Affects Version/s 1.1 Final [ 12311793 ]
        Henri Yandell made changes -
        Component/s JXPath [ 12311120 ]
        Assignee Jakarta Commons Developers Mailing List [ commons-dev@jakarta.apache.org ]
        Project Commons [ 12310458 ] Commons JXPath [ 12310480 ]
        Affects Version/s 1.1 Final [ 12311652 ]
        Key COM-735 JXPATH-49
        Henri Yandell made changes -
        Field Original Value New Value
        issue.field.bugzillaimportkey 22116 12340886
        Prasad Chodavarapu created issue -

          People

          • Assignee:
            Unassigned
            Reporter:
            Prasad Chodavarapu
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development