qpid-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Sorin Suciu (JIRA)" <qpid-...@incubator.apache.org>
Subject [jira] Closed: (QPID-2668) PlainPasswordPrincipalDatabase - code improvement
Date Tue, 28 Sep 2010 09:41:36 GMT

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

Sorin Suciu closed QPID-2668.
-----------------------------


> 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
>            Assignee: Robbie Gemmell
>            Priority: Minor
>             Fix For: 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


Mime
View raw message