hadoop-common-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Hiroshi Ikeda (JIRA)" <j...@apache.org>
Subject [jira] [Created] (HADOOP-10304) Configuration should not expose its instance in constructors
Date Wed, 29 Jan 2014 06:02:14 GMT
Hiroshi Ikeda created HADOOP-10304:
--------------------------------------

             Summary: Configuration should not expose its instance in constructors
                 Key: HADOOP-10304
                 URL: https://issues.apache.org/jira/browse/HADOOP-10304
             Project: Hadoop Common
          Issue Type: Bug
            Reporter: Hiroshi Ikeda
            Priority: Minor


org.apache.hadoop.conf.Configuration exposes a reference of its instance in constructors via
its class variable REGISTRY, which means incomplete instances are accessible. For example
addDefaultResource() may access incomplete instances (especially for subclasses of Configuration).

Actually, static methods in Configuration are not needed to access its instances, and it is
enough that each instance checks modification of class variables. This is also useful to avoid
deadlock between locking instances and locking the class object, which may be happened when
you will resolve race conditions yet existing in Configuration.



--
This message was sent by Atlassian JIRA
(v6.1.5#6160)

Mime
View raw message