Qpid
  1. Qpid
  2. QPID-2668

PlainPasswordPrincipalDatabase - code improvement

    Details

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

      Description

      This snippet:
      try
      {
      try
      {
      _userUpdate.lock();
      char[] orig = user.getPassword();
      user.setPassword(password);

      try

      { savePasswordFile(); }

      catch (IOException e)

      { _logger.error("Unable to save password file, password change for user '" + principal + "' discarded"); //revert the password change user.setPassword(orig); return false; }

      return true;
      }
      finally
      {
      if (_userUpdate.isHeldByCurrentThread())

      { _userUpdate.unlock(); }

      }
      }
      catch (Exception e)

      { return false; }

      is flagged by our Sonar server. This patch will streamline the code.

        Activity

        Sorin Suciu created issue -
        Hide
        Sorin Suciu added a comment -

        Please apply on the trunk

        Show
        Sorin Suciu added a comment - Please apply on the trunk
        Sorin Suciu made changes -
        Field Original Value New Value
        Attachment qpid-2668.patch [ 12447016 ]
        Marnie McCormack made changes -
        Fix Version/s 0.6 [ 12313728 ]
        Hide
        Andrew Kennedy added a comment -

        Applied patch and committed

        Show
        Andrew Kennedy added a comment - Applied patch and committed
        Hide
        Robbie Gemmell added a comment -

        Resolving issue for Andrew (as he still hasnt got his JIRA rights)

        Show
        Robbie Gemmell added a comment - Resolving issue for Andrew (as he still hasnt got his JIRA rights)
        Robbie Gemmell made changes -
        Status Open [ 1 ] Resolved [ 5 ]
        Assignee Robbie Gemmell [ gemmellr ]
        Resolution Fixed [ 1 ]
        Sorin Suciu made changes -
        Status Resolved [ 5 ] Closed [ 6 ]

          People

          • Assignee:
            Robbie Gemmell
            Reporter:
            Sorin Suciu
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development