Commons Pool
  1. Commons Pool
  2. POOL-221

PooledObject.state does not need to be volatile

    Details

    • Type: Bug Bug
    • Status: Resolved
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 2.0
    • Labels:
      None

      Description

      The field PooledObject.state is volatile, but is also always accessed in a synchronised method except in toString().

      The volatile modifier is not cost free; it might be better to remove it and add a small synch. block in toString().

        Activity

          People

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

            Dates

            • Created:
              Updated:
              Resolved:

              Development