Path: csiph.com!x330-a1.tempe.blueboxinc.net!usenet.pasdenom.info!news.albasani.net!.POSTED!not-for-mail From: Lew Newsgroups: comp.lang.java.programmer Subject: Re: calling own methods from constructor Date: Thu, 07 Apr 2011 21:24:05 -0400 Organization: albasani.net Lines: 15 Message-ID: References: <41ac2ca5-83e8-4b80-92af-9704b373ec37@q36g2000yqn.googlegroups.com> <304a8aef-3852-4817-b5a7-5468fcdf11a1@x18g2000yqe.googlegroups.com> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Trace: news.albasani.net bOeeZfL45lmgSiTqcPqnoj+iaez1UCL3TlEPZoVuJS3WlckuxBk915me/louIICw+jzLeOwxFZUYWOyHphjGiQ== NNTP-Posting-Date: Fri, 8 Apr 2011 01:23:54 +0000 (UTC) Injection-Info: news.albasani.net; logging-data="arkOsuVHFokerarWCdcsV5oI5C5w/w8A9GccdJIM98DPse11DAVvOKzHwc6o8sz+LfvLzw5EPrquuePZEWrdOCHprZ/SqGpM6UCTHGEoM7Agqf2GEz68jp9xfyi9jaf4"; mail-complaints-to="abuse@albasani.net" User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.14) Gecko/20110223 Thunderbird/3.1.8 In-Reply-To: Cancel-Lock: sha1:K1LfUsMn2Mc3oEhqITvKmQqPMjY= Xref: x330-a1.tempe.blueboxinc.net comp.lang.java.programmer:2966 Tom Anderson wrote: >> It presents the same kind of behavior as non-final overridable methods for >> the purposes of this discussion. > > It really doesn't. The problem with calling overridable methods from > constructors is that they can be overridden with code which assumes a > constructed object, and gets into trouble when run in the context of one which > isn't. getClass() can't get into that kind of trouble. Fair enough. Good points. -- Lew Honi soit qui mal y pense. http://upload.wikimedia.org/wikipedia/commons/c/cf/Friz.jpg