Uploaded image for project: 'Qpid'
  1. Qpid
  2. QPID-2668

PlainPasswordPrincipalDatabase - code improvement

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Minor
    • Resolution: Fixed
    • 0.6, 0.7
    • 0.7
    • Broker-J
    • 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.

      Attachments

        1. qpid-2668.patch
          2 kB
          Sorin Suciu

        Activity

          People

            robbie Robbie Gemmell
            sorins Sorin Suciu
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: