Uploaded image for project: 'Commons OGNL (Dormant)'
  1. Commons OGNL (Dormant)
  2. OGNL-52

setAccessible(false) threading bug

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • 2.6.9
    • 2.7
    • Core Runtime
    • None
    • Patch

    Description

      We were sporadically seeing the exception:

      Class ognl.OgnlRuntime can not access a member of class java.util.Collections$UnmodifiableList with modifiers "public"

      In our production code trying to call "get" against an unmodifiable list. We've fixed it by commenting out OgnlRuntime:534.

      It seems that 2 threads would enter invokeMethod. Both would call setAccessible(true). The first thread would call the method, then setAccessible(false). Then the second thread would try to call the method but, alas, no more accessibility.

      Commenting out the line might be cheating, but, at least for our app, there seemed to be very little reason to set the accessibility back to false.

      Attachments

        Activity

          People

            jkuhnert Jesse Kuhnert
            stephenh Stephen Haberman
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: