hbase-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Richard Ding (JIRA)" <j...@apache.org>
Subject [jira] [Created] (HBASE-10842) Some logger not declared static final
Date Wed, 26 Mar 2014 17:45:17 GMT
Richard Ding created HBASE-10842:

             Summary: Some logger not declared static final
                 Key: HBASE-10842
                 URL: https://issues.apache.org/jira/browse/HBASE-10842
             Project: HBase
          Issue Type: Improvement
    Affects Versions:, 0.98.1
            Reporter: Richard Ding
            Assignee: Richard Ding
            Priority: Minor

In a few of source files, the logger is defined as 

private final Log LOG = LogFactory.getLog(MyClass.class);

This should be changed to static final.

One question is about the following declaration:

private final Log LOG = LogFactory.getLog(this.getClass());

In this form, the logger can be shared by derived classes. But one will get NPE when logging
in methods that are invoked inside the constructors.

This message was sent by Atlassian JIRA

View raw message