accumulo-notifications mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Bill Havanki (JIRA)" <j...@apache.org>
Subject [jira] [Created] (ACCUMULO-1972) Range constructors call overridable method
Date Fri, 06 Dec 2013 16:08:35 GMT
Bill Havanki created ACCUMULO-1972:
--------------------------------------

             Summary: Range constructors call overridable method
                 Key: ACCUMULO-1972
                 URL: https://issues.apache.org/jira/browse/ACCUMULO-1972
             Project: Accumulo
          Issue Type: Bug
    Affects Versions: 1.5.0, 1.4.4
            Reporter: Bill Havanki
            Priority: Minor


Several {{Range}} constructors call {{Range.beforeStartKey()}}, which is not final. This is
dangerous:

bq. The superclass constructor runs before the subclass constructor, so the overriding method
in the subclass will get invoked before the subclass constructor has run. If the overriding
method depends on any initialization performed by the subclass constructor, the method will
not behave as expected.  ??Item 17, Effective Java Vol. 2, Bloch??

If {{beforeStartKey()}} cannot be made final, the code should be refactored to make the constructors
safe.



--
This message was sent by Atlassian JIRA
(v6.1#6144)

Mime
View raw message