Return-Path: X-Original-To: apmail-commons-dev-archive@www.apache.org Delivered-To: apmail-commons-dev-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id AD85892E7 for ; Thu, 10 May 2012 19:09:31 +0000 (UTC) Received: (qmail 23182 invoked by uid 500); 10 May 2012 19:09:31 -0000 Delivered-To: apmail-commons-dev-archive@commons.apache.org Received: (qmail 23080 invoked by uid 500); 10 May 2012 19:09:31 -0000 Mailing-List: contact dev-help@commons.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: "Commons Developers List" Delivered-To: mailing list dev@commons.apache.org Received: (qmail 23072 invoked by uid 99); 10 May 2012 19:09:31 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 10 May 2012 19:09:31 +0000 X-ASF-Spam-Status: No, hits=3.6 required=5.0 tests=FREEMAIL_FORGED_REPLYTO,NORMAL_HTTP_TO_IP,RCVD_IN_DNSWL_NONE,REPTO_QUOTE_YAHOO,SPF_NEUTRAL X-Spam-Check-By: apache.org Received-SPF: neutral (nike.apache.org: local policy) Received: from [98.139.212.175] (HELO nm16.bullet.mail.bf1.yahoo.com) (98.139.212.175) by apache.org (qpsmtpd/0.29) with SMTP; Thu, 10 May 2012 19:09:22 +0000 Received: from [98.139.212.151] by nm16.bullet.mail.bf1.yahoo.com with NNFMP; 10 May 2012 19:09:01 -0000 Received: from [98.139.212.211] by tm8.bullet.mail.bf1.yahoo.com with NNFMP; 10 May 2012 19:09:01 -0000 Received: from [127.0.0.1] by omp1020.mail.bf1.yahoo.com with NNFMP; 10 May 2012 19:09:01 -0000 X-Yahoo-Newman-Property: ymail-3 X-Yahoo-Newman-Id: 360120.46810.bm@omp1020.mail.bf1.yahoo.com Received: (qmail 97798 invoked by uid 60001); 10 May 2012 19:09:01 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com.br; s=s1024; t=1336676941; bh=mKnu7lO5mWnXChcUfCYvn9CPiC84/wL8Gl2F8BgLcgo=; h=X-YMail-OSG:Received:X-Mailer:References:Message-ID:Date:From:Reply-To:Subject:To:In-Reply-To:MIME-Version:Content-Type:Content-Transfer-Encoding; b=H+ICX+BE0prMyJxaeU1c+tWtYYeJ6Lu9DadPpDvzBGVu2dcNA3H24OPD95CkGzrWuPHQqxi5F7kKZbC94exbqSe99AA1qdl5jZ0uEIFzR13NlWGgPSnFy8FNTRHKjkMEbf8bTk9iXNafxG5KzASb65GqFH2/89aupeG3LIOLJ90= DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=s1024; d=yahoo.com.br; h=X-YMail-OSG:Received:X-Mailer:References:Message-ID:Date:From:Reply-To:Subject:To:In-Reply-To:MIME-Version:Content-Type:Content-Transfer-Encoding; b=IvEx1w4Xg840Og5DUpahsAnBA2WH8X/9PDtb7+lM2sjahBskJGxEahhDyi2cndZ0KTf44G7DNM+iZVaNiOI92+h7Y8wer2biRbJgxlKCsvdLWu2YdaAaQnph6B4YzVzemxS/kxuec+6DmjsXGvSpa6tkOH/BY8LmtbVNJn5ne3Y=; X-YMail-OSG: 6mcUsyYVM1nhANhEdXGcoi0GmT_fyIivGWzSvZ8QiFpeqZm sDg_K6CaNP46zAC.HX50.G8AO9NLs_UPrZmGZBmGfvLEjva5lER39dApwhaQ U8C6HaNKN2AoRaVIGC6q6H4mUdu_Frany_SWNK83.flCSH3qD3SaPk5ZIddv DX13PzfwxqFb1zxJxJzAlInYqX0ZC.InK2fQstQ8QrP5iFQbUxiQFvMyD87E R2bgkkJ28XytTluTsBf.IVR5VDsDQhj7o7NYM9nZSw47tq5hJAw6FSquI0MC b5liDJeDVQ3ghkuZwSYSjgQg5sqMrQDHbyk1XKQdA4.QT.pqj.iPGUqvXODw mD7gp6E0hBhPvCXejxTzBfE.IwrgVVR8T5Xn2PgvIb576i9sI0bc4fXdxGiM D478sgj9H74Kp9KlKXrMm7qx.AGr6OQEcP2WOEIcv22VxUFlcFkmZ1MWiHlf e22aY7.Ri.TgQ_C6TOBsHyjgCKYXR._6almJMQ14P7rhWVGWC4wKNIvydKFa 9eIFYTH34nUn_x9zlLYk5_ROZwTIjw96Y9U8tiFu9v0dv7LErlWnPw5Uxj9i 44XoT_80G6ldNtCf8sZraAdAKT.3Fyi34eVeFJkVaOwA8PKHXHplu0CfpWRH 7qvgnoQHYh2Al8C_thtuFTuFvLyO6g3bTngSeR2e4lGzepyDwOMGjEWhtAN9 qE8_7rNO8m6Z02ApN_6Douuk.nkuuCiOMU5XrVdLtoVvoqVUld61hotqkWWB tVHD2ew-- Received: from [189.120.1.165] by web161205.mail.bf1.yahoo.com via HTTP; Thu, 10 May 2012 12:09:00 PDT X-Mailer: YahooMailWebService/0.8.118.349524 References: <1336674453.81058.YahooMailNeo@web161202.mail.bf1.yahoo.com> Message-ID: <1336676940.74287.YahooMailNeo@web161205.mail.bf1.yahoo.com> Date: Thu, 10 May 2012 12:09:00 -0700 (PDT) From: "Bruno P. Kinoshita" Reply-To: "Bruno P. Kinoshita" Subject: Re: [functor] Remove duplicated equals() methods To: Commons Developers List , "gudnabrsam@gmail.com" In-Reply-To: MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: quoted-printable On 05/10/2012 03:38 PM, Matt Benson wrote:=0A> On Thu, May 10, 2012 at 1:27= PM, Bruno P. Kinoshita=0A> =A0wrote:=0A>> Hi = all,=0A>>=0A>> While I am still trying to find time to work on a proposal f= or enhancements in the generators API in [functor] (https://issues.apache.o= rg/jira/browse/FUNCTOR-14), I'm reviewing other pending issues, including t= he one regarding test coverage.=0A>>=0A>> The comparators API seemed to be = lacking tests for some decision branches. But looking closely at the code, = I realized that there were two equals code in some comparator functors. The= n I set up a Sonar instance to scan the code, and found that it is common i= n many other parts of the code (http://66.228.56.222/sonar/drilldown/violat= ions/org.apache.commons:commons-functor?severity=3DCRITICAL).=0A>>=0A>> Doe= s anybody know if there is some reason for having both equals(Object that) = and equals(SomeFunctor =A0that)? I think we could merge both methods in = only one. The Generators in [functor] have only one equals() method, and co= mpares against this, uses instanceof, etc. I had a quick look on [math3] an= d [lang3], and looks like they both use only one equals() method, compares = against this, uses instaceof, etc.=0A>>=0A>> If there is no objection here,= I could create a patch for this in Jira, merging both equals() methods in = one :-) Then after this I will proceed writing tests to increase the test c= overage (https://issues.apache.org/jira/browse/FUNCTOR-12).=0A>>=0A>=A0=0A>= Bruno,=0A> =A0 =A0As far as I know this pattern was introduced by one of [= functor]'s=0A> original authors and must simply have been his preference. = =A0Personally=0A> I agree that this is not what your average Java developer= probably=0A> expects to see in your average Java codebase, and would suppo= rt=0A> combining these methods. =A0This is documented at [1] and filed at [= 2]=0A> (where your earlier comment is valid, and is also mentioned at [1],= =0A> but doesn't IMHO pertain specifically to this JIRA issue).=0A>=A0=0A> = Regards,=0A> Matt=0A>=A0=0A> [1] http://wiki.apache.org/commons/Sanity%20Ch= eck%20of%20APIs%2C%20etc.=0A> [2] https://issues.apache.org/jira/browse/FUN= CTOR-11=0A>=A0=0A>> Thanks in advance!=0A>>=0A>> Bruno P. Kinoshita=0A>> ht= tp://kinoshita.eti.br=0A>> http://tupilabs.com=0A>>=0A>> ------------------= ---------------------------------------------------=0A>> To unsubscribe, e-= mail: dev-unsubscribe@commons.apache.org=0A>> For additional commands, e-ma= il: dev-help@commons.apache.org=0A>>=0A=0AHi Matt,=0A=0AThanks for your spe= edy reply and for sending me the links.=0A=0AYou are right indeed, there is= already an issue filled for this, and my comment is not pertinent to that = issue :-)=0A=0AThe comment in question refers to the item "- why are equals= , hashCode and toString defined in the Functor interface?" from [1]. Maybe = we should create a separate issue for that, WDYT?=0A=0AI will use FUNCTOR-1= 1 to attach my patch combining the equals() methods.=0A=0ARegarding the San= ity Check Wiki entry, do you think we should add "Remove @author tags" too?= I believe it has been decided in Apache Commons to stop using this tag (I = can't remember if it is only the @author tag, or there are other tags too).= =0A=0ABTW, I filled another issue=A0[2]=A0today with a patch that fixes som= e minor checkstyle errors in [functor].=0A=0AThanks again!=0A=0A--=A0=0ABru= no P. Kinoshita=0Ahttp://www.kinoshita.eti.br=0Ahttp://www.tupilabs.com=0A= =0A[1] http://wiki.apache.org/commons/Sanity%20Check%20of%20APIs%2C%20etc.= =0A[2]=A0https://issues.apache.org/jira/browse/FUNCTOR-16=0A --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org For additional commands, e-mail: dev-help@commons.apache.org