Commons JCS
  1. Commons JCS
  2. JCS-21

JCS has inconsistent locking of shared data

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: jcs-1.2.7.9.2
    • Fix Version/s: None
    • Component/s: None
    • Labels:
      None

      Description

      I've been looking at the trunk JCS code with findbugs (http://findbugs.sf.net/).

      One of the things it does is warn when data is inconsistently synchronized - ie when it is sometimes referenced inside a synchronized block and sometimes not. This is not threadsafe - one thread may read old or inconsistent data.

      I've patched all the places findbugs complains about by adding appropriate synchronized() blocks.

      I suspect this change may require some discussion

      1. locking.diff
        8 kB
        Michael Stevens

        Activity

        Michael Stevens created issue -
        Michael Stevens made changes -
        Field Original Value New Value
        Attachment locking.diff [ 12353599 ]
        Aaron Smuts made changes -
        Status Open [ 1 ] Resolved [ 5 ]
        Resolution Fixed [ 1 ]
        Aaron Smuts made changes -
        Status Resolved [ 5 ] Closed [ 6 ]

          People

          • Assignee:
            Aaron Smuts
            Reporter:
            Michael Stevens
          • Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development