Return-Path: X-Original-To: apmail-hbase-issues-archive@www.apache.org Delivered-To: apmail-hbase-issues-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 799569960 for ; Thu, 5 Apr 2012 16:00:48 +0000 (UTC) Received: (qmail 62255 invoked by uid 500); 5 Apr 2012 16:00:48 -0000 Delivered-To: apmail-hbase-issues-archive@hbase.apache.org Received: (qmail 62209 invoked by uid 500); 5 Apr 2012 16:00:48 -0000 Mailing-List: contact issues-help@hbase.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Delivered-To: mailing list issues@hbase.apache.org Received: (qmail 62200 invoked by uid 99); 5 Apr 2012 16:00:48 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 05 Apr 2012 16:00:48 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=5.0 tests=ALL_TRUSTED,T_RP_MATCHES_RCVD X-Spam-Check-By: apache.org Received: from [140.211.11.116] (HELO hel.zones.apache.org) (140.211.11.116) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 05 Apr 2012 16:00:45 +0000 Received: from hel.zones.apache.org (hel.zones.apache.org [140.211.11.116]) by hel.zones.apache.org (Postfix) with ESMTP id A116A35ADBF for ; Thu, 5 Apr 2012 16:00:24 +0000 (UTC) Date: Thu, 5 Apr 2012 16:00:24 +0000 (UTC) From: "Jonathan Hsieh (Commented) (JIRA)" To: issues@hbase.apache.org Message-ID: <118771506.17534.1333641624661.JavaMail.tomcat@hel.zones.apache.org> In-Reply-To: <2083035259.23294.1332856831669.JavaMail.tomcat@hel.zones.apache.org> Subject: [jira] [Commented] (HBASE-5644) [findbugs] Fix null pointer warnings. MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/HBASE-5644?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13247318#comment-13247318 ] Jonathan Hsieh commented on HBASE-5644: --------------------------------------- Code portion looks good to me. On the spread sheet, one suggestion: HTable - row 2, 3 - delete -- why is the type bool? Maybre change to ServerCallable? (two cases). Ex: {code} @Override public void delete(final Delete delete) throws IOException { new ServerCallable(connection, tableName, delete.getRow(), operationTimeout) { public Void call() throws IOException { server.delete(location.getRegionInfo().getRegionName(), delete); return null; // FindBugs NP_BOOLEAN_RETURN_NULL } }.withRetries(); } {code} 4,5,6, 7 smells funny but I buy it. Seems like findbugs doesn't handle ?: very well. bq. Used, but not extensively ( only in Hadoop). are you suggesting not to use it here? What I wrote above was unclear. You use Preconditions in some places (Store), and there are places you don't (ShutdownHook). Seems like you could us it in a few more places? Not a big deal, but it makes code easier to read by conveying more intent IMO. Maybe you chose not to use because it wasn't at the top of a method? bq. RSStatusTmplImpl is Autogenerated Jamon code. I wanted to fix it but I am not familiar in Jamon code generation area . Let some one or you can update this change if you are familiar. If not, can I file a separate bug? You can get this one, it is pretty straightforward. The source of the autogen RSStatusTmplImpl data is here. Take a look, just modify there and it will just percolate that code through to the java version. https://github.com/apache/hbase/blob/trunk/src/main/jamon/org/apache/hadoop/hbase/tmpl/regionserver/RSStatusTmpl.jamon#L48 > [findbugs] Fix null pointer warnings. > ------------------------------------- > > Key: HBASE-5644 > URL: https://issues.apache.org/jira/browse/HBASE-5644 > Project: HBase > Issue Type: Sub-task > Components: scripts > Reporter: Jonathan Hsieh > Assignee: Uma Maheswara Rao G > Attachments: HBASE-5644.patch, NullPointerFindBugs_Analysis.xlsx > > > See https://builds.apache.org/job/PreCommit-HBASE-Build/1313//artifact/trunk/patchprocess/newPatchFindbugsWarnings.html > Fix the NP category -- 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