You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@qpid.apache.org by "Sorin Suciu (JIRA)" <qp...@incubator.apache.org> on 2010/06/14 13:35:13 UTC

[jira] Updated: (QPID-2668) PlainPasswordPrincipalDatabase - code improvement

     [ https://issues.apache.org/jira/browse/QPID-2668?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Sorin Suciu updated QPID-2668:
------------------------------

    Attachment: qpid-2668.patch

Please apply on the trunk

> PlainPasswordPrincipalDatabase - code improvement 
> --------------------------------------------------
>
>                 Key: QPID-2668
>                 URL: https://issues.apache.org/jira/browse/QPID-2668
>             Project: Qpid
>          Issue Type: Bug
>          Components: Java Broker
>    Affects Versions: 0.6, 0.7
>            Reporter: Sorin Suciu
>            Priority: Minor
>             Fix For: 0.6, 0.7
>
>         Attachments: qpid-2668.patch
>
>
> 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. 

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


---------------------------------------------------------------------
Apache Qpid - AMQP Messaging Implementation
Project:      http://qpid.apache.org
Use/Interact: mailto:dev-subscribe@qpid.apache.org