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

JXPathContextReferenceImpl not thread safe

    Details

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

      Operating System: All
      Platform: All

    • Bugzilla Id:
      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

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

              Dates

              • Created:
                Updated:
                Resolved: