hadoop-common-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Sebb (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (HADOOP-13147) Constructors must not call overrideable methods
Date Sat, 14 May 2016 12:01:12 GMT

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

Sebb commented on HADOOP-13147:
-------------------------------

BTW, why is the following final?

final public void update(int b)

None of the other methods are.

> Constructors must not call overrideable methods
> -----------------------------------------------
>
>                 Key: HADOOP-13147
>                 URL: https://issues.apache.org/jira/browse/HADOOP-13147
>             Project: Hadoop Common
>          Issue Type: Bug
>         Environment: http://svn.apache.org/repos/asf/hadoop/common/trunk/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/util/PureJavaCrc32C.java
>            Reporter: Sebb
>
> Constructors must not call overrideable methods.
> An object is not guaranteed fully constructed until the constructor exits, so the subclass
override may not see the fully created parent object.
> This applies to:
> PureJavaCrc32



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

---------------------------------------------------------------------
To unsubscribe, e-mail: common-issues-unsubscribe@hadoop.apache.org
For additional commands, e-mail: common-issues-help@hadoop.apache.org


Mime
View raw message