hbase-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Uma Maheswara Rao G (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (HBASE-5652) [findbugs] Fix lock release on all paths
Date Sat, 21 Apr 2012 06:54:37 GMT

    [ https://issues.apache.org/jira/browse/HBASE-5652?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13258791#comment-13258791
] 

Uma Maheswara Rao G commented on HBASE-5652:
--------------------------------------------

Agreed with Ram, variable assignment in finally block before unlocking would not cause any
exception here. But the standard pattern for read/write locks I have seen is, after acquiring
the lock, every line should be in try and in finally block we will release the lock. That
might be the findbugs worry here. But in this case, there is no way of throwing exception
from variable assignments. So, we can just skip I feel. Let's see Jon opinion on this.

Here try/finally almost no use.
{code}
try {
+        this.logRollRunning = false;
+      } finally {
+        this.cacheFlushLock.unlock();
+      }
{code}

Other problem I see in adding into exclude list is, we are not able to pin point exact lication
of the code. We may give just package/class/method/feilds..and bug pattern,type ...etc. Unfortunately
if same bug introduces but this is valid to fix in the same area of code, then it may get
skipped due to other exclude entry presents in the file which is almost matching to the same.
So, we have to reduce exclude filter entries also as less as possible.
                
> [findbugs] Fix lock release on all paths 
> -----------------------------------------
>
>                 Key: HBASE-5652
>                 URL: https://issues.apache.org/jira/browse/HBASE-5652
>             Project: HBase
>          Issue Type: Sub-task
>          Components: scripts
>            Reporter: Jonathan Hsieh
>            Assignee: Gregory Chanan
>         Attachments: HBASE-5652-v0.patch
>
>
> See https://builds.apache.org/job/PreCommit-HBASE-Build/1313//artifact/trunk/patchprocess/newPatchFindbugsWarnings.html#Warnings_MT_CORRECTNESS
> Category UL

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Mime
View raw message