Uploaded image for project: 'Commons JXPath'
  1. Commons JXPath
  2. JXPATH-49

JXPathContextReferenceImpl not thread safe

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Blocker
    • Resolution: Fixed
    • 1.1 Final
    • None
    • None
    • Operating System: All
      Platform: All

    • 22116

    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)

      Attachments

        Activity

          People

            Unassigned Unassigned
            chprasad@hotmail.com Prasad Chodavarapu
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: