[ 
http://jira.qos.ch/browse/LBCORE-67?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=10817#action_10817
 ] 

Ralph Goers edited comment on LBCORE-67 at 10/28/08 3:03 PM:
-------------------------------------------------------------

In this case I have to agree with Joern. A test case shouldn't be necessary. 
All the code being locked must always be in the try block with the unlock in 
the finally. It is too bad the compiler can' generate an error when it isn't 
done that way. I should have noticed this and commented on it when the code was 
committed. This should be fixed asap.

      was (Author: [EMAIL PROTECTED]):
    In this case I have to agree with Joern. A test case shouldn't be 
necessary. All the code being locked must always be in the try block with the 
unlock in the finally. It is too bad the compiler can' generate an error when 
it isn't done that way. 
  
> Unsecure usage of locks in AppenderAttachableImpl
> -------------------------------------------------
>
>                 Key: LBCORE-67
>                 URL: http://jira.qos.ch/browse/LBCORE-67
>             Project: logback-core
>          Issue Type: Bug
>          Components: Appender
>    Affects Versions: 0.9.10
>            Reporter: Joern Huxhorn
>            Assignee: Logback dev list
>         Attachments: LockPatch.patch
>
>
> The unlock of a lock should, I would even say "must", always be done in
> a finally block. Otherwise really bad things (deadlock) can happen if an 
> exception
> is thrown.
> See 
> http://java.sun.com/j2se/1.5.0/docs/api/java/util/concurrent/locks/Lock.html

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: 
http://jira.qos.ch/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        
_______________________________________________
logback-dev mailing list
[email protected]
http://qos.ch/mailman/listinfo/logback-dev

Reply via email to