Qpid
  1. Qpid
  2. QPID-4609

Incorrect lock in the synchronize statement in org.apache.qpid.server.model.adapter.BrokerAdapter

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Minor Minor
    • Resolution: Fixed
    • Affects Version/s: 0.21
    • Fix Version/s: 0.21
    • Component/s: Java Broker
    • Labels:
      None

      Description

      The getTrustStores() and getKeyStores() methods of the BrokerAdapter class seem use both the _trustStores object as a lock for the sychronize statement:

      @Override
      public Collection<KeyStore> getKeyStores()
      {
      synchronized(_trustStores)

      { return Collections.unmodifiableCollection(_keyStores.values()); }

      }

      @Override
      public Collection<TrustStore> getTrustStores()
      {
      synchronized(_trustStores)

      { return Collections.unmodifiableCollection(_trustStores.values()); }

      }

      Is that a bug? I would assume that the getKeyStores method should use the _keyStores object instead of _trustStores.

        Activity

        Transition Time In Source Status Execution Times Last Executer Last Execution Date
        Open Open In Progress In Progress
        4h 1m 1 Alex Rudyy 28/Feb/13 16:13
        In Progress In Progress Reviewable Reviewable
        2m 15s 1 Alex Rudyy 28/Feb/13 16:15
        Reviewable Reviewable Resolved Resolved
        28d 17h 42m 1 Robbie Gemmell 29/Mar/13 09:57
        Resolved Resolved Closed Closed
        684d 10h 8m 1 Rob Godfrey 11/Feb/15 20:06
        Rob Godfrey made changes -
        Status Resolved [ 5 ] Closed [ 6 ]
        Robbie Gemmell made changes -
        Status Ready To Review [ 10006 ] Resolved [ 5 ]
        Fix Version/s 0.21 [ 12323549 ]
        Resolution Fixed [ 1 ]
        Hide
        Robbie Gemmell added a comment -

        Seems good to me.

        Show
        Robbie Gemmell added a comment - Seems good to me.
        Alex Rudyy made changes -
        Assignee Alex Rudyy [ alex.rufous ] Robbie Gemmell [ gemmellr ]
        Hide
        Alex Rudyy added a comment -

        Robbie,
        Could you please review the change?

        Show
        Alex Rudyy added a comment - Robbie, Could you please review the change?
        Alex Rudyy made changes -
        Status In Progress [ 3 ] Ready To Review [ 10006 ]
        Hide
        Alex Rudyy added a comment -

        Hi Jakub,

        You are absolutely right. It is a bug. I committed a fix in revision http://svn.apache.org/r1451243 . Thanks for pointing out the issue.

        Show
        Alex Rudyy added a comment - Hi Jakub, You are absolutely right. It is a bug. I committed a fix in revision http://svn.apache.org/r1451243 . Thanks for pointing out the issue.
        Alex Rudyy made changes -
        Status Open [ 1 ] In Progress [ 3 ]
        Alex Rudyy made changes -
        Field Original Value New Value
        Assignee Alex Rudyy [ alex.rufous ]
        Jakub Scholz created issue -

          People

          • Assignee:
            Robbie Gemmell
            Reporter:
            Jakub Scholz
          • Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development