Re: implementation of equals and hashcode method in AbstractItem ?

2013-09-18 Thread Hugo Arès
glegroups.com [mailto: > jenkin...@googlegroups.com ] *On Behalf Of *Hugo Arès > *Sent:* den 17 september 2013 16:14 > *To:* jenkin...@googlegroups.com > *Subject:* Re: implementation of equals and hashcode method in > AbstractItem ? > > > > > > Your comment about

RE: implementation of equals and hashcode method in AbstractItem ?

2013-09-18 Thread Sandell, Robert
[mailto:jenkinsci-dev@googlegroups.com] On Behalf Of Hugo Arès Sent: den 17 september 2013 16:14 To: jenkinsci-dev@googlegroups.com Subject: Re: implementation of equals and hashcode method in AbstractItem ? Your comment about not storing the abstractProject sounds correct to me. GerritTrigger

Re: implementation of equals and hashcode method in AbstractItem ?

2013-09-17 Thread Hugo Arès
> > > Your comment about not storing the abstractProject sounds correct to me. > > GerritTrigger extend Trigger and Trigger is storing the job also (gerritTrigger have its own reference but do not need to). I am looking at how I could fix this without comparing job, here is more info on the pr

Re: implementation of equals and hashcode method in AbstractItem ?

2013-09-17 Thread Christian Höltje
On Monday, September 16, 2013 3:13:04 PM UTC-4, Jesse Glick wrote: > On Mon, Sep 16, 2013 at 2:30 PM, Hugo Arès > > > wrote: > > I found a bug in the gerrit trigger plugin > > Not sure which bug you are referring to but I suspect that adding > AbstractItem.equals is the wrong fix. > JGlick;

Re: implementation of equals and hashcode method in AbstractItem ?

2013-09-16 Thread Jesse Glick
On Mon, Sep 16, 2013 at 4:08 PM, Hugo Arès wrote: > GerritTrigger class contains an abstractProject Then this is probably the bug; it should not keep such a field (even transient), but keep a final String projectFullName. -- You received this message because you are subscribed to the Google Gro

Re: implementation of equals and hashcode method in AbstractItem ?

2013-09-16 Thread Hugo Arès
I will explain the problem with the equals method but the same apply for the hashcode (actually, the hashcode is the one causing the problem in my case) GerritTrigger class contains an abstractProject, after reloading the configuration from disk, the equals method of GerritTrigger is no longer

implementation of equals and hashcode method in AbstractItem ?

2013-09-16 Thread Hugo Arès
Hi Since the item.getFullName is identifying the item uniquely, is it wrong to think that the equals and hashcode should be implemented and based on the full name? I am asking because I found a bug in the gerrit trigger plugin and it's because after reloading the configurations from disk. ther

Re: implementation of equals and hashcode method in AbstractItem ?

2013-09-16 Thread Jesse Glick
On Mon, Sep 16, 2013 at 2:30 PM, Hugo Arès wrote: > I found a bug in the gerrit trigger plugin Not sure which bug you are referring to but I suspect that adding AbstractItem.equals is the wrong fix. -- You received this message because you are subscribed to the Google Groups "Jenkins Developer