Re: [collections] ReferenceMap changed for WeakIdentityMap but now broken

2004-03-31 Thread Stephen Colebourne
Thanks Phil, that was the problem. ReferenceMap now extends AbstractHashedMap ;-) Stephen - Original Message - From: "Phil Steitz" <[EMAIL PROTECTED]> > I think the problem may be in the first line below. I don't think you > want to hash the reference. If you change hash(ref) to ref.hash

Re: [collections] ReferenceMap changed for WeakIdentityMap but now broken

2004-03-29 Thread Phil Steitz
I think the problem may be in the first line below. I don't think you want to hash the reference. If you change hash(ref) to ref.hashCode() all tests (including commented out ones) succeed. private void purge(Reference ref) { // The hashCode of the reference is the hashCode of the

Re: [collections] ReferenceMap changed for WeakIdentityMap but now broken

2004-03-28 Thread Phil Steitz
Janek Bogucki wrote: On Wed, 2004-03-24 at 21:57, Janek Bogucki wrote: At the end there is this which you did not mention in your original post so it might be new information [junit] Testcase: testPurgeValues took 4.903 sec [junit] Caused an ERROR [junit] null [junit] java.lang.Out

Re: [collections] ReferenceMap changed for WeakIdentityMap but now broken

2004-03-24 Thread Janek Bogucki
On Tue, 2004-03-23 at 23:01, Stephen Colebourne wrote: > I can't spot the problem, so I'm posting it in case someone else wants to > take a look and tell me my stupid mistake ;-) Sorry this isn't expressed as unit test but just in case this is enough to go on I've posted it. I added a System.out.

Re: [collections] ReferenceMap changed for WeakIdentityMap but now broken

2004-03-24 Thread Janek Bogucki
On Wed, 2004-03-24 at 21:57, Janek Bogucki wrote: > At the end there is this which you did not mention in your original post > so it might be new information > > [junit] Testcase: testPurgeValues took 4.903 sec > [junit] Caused an ERROR > [junit] null > [junit] java.lang.OutOfM

Re: [collections] ReferenceMap changed for WeakIdentityMap but now broken

2004-03-24 Thread Janek Bogucki
On Tue, 2004-03-23 at 23:01, Stephen Colebourne wrote: > I can't spot the problem, so I'm posting it in case someone else wants to > take a look and tell me my stupid mistake ;-) > > Stephen The error message from the batch test was unhelpful. This is what I get with this task added before the b

Re: [collections] ReferenceMap changed for WeakIdentityMap but now broken

2004-03-23 Thread Stephen Colebourne
inal Message- > From: Stephen Colebourne [mailto:[EMAIL PROTECTED] > Sent: Tuesday, March 23, 2004 18:02 > To: Jakarta Commons Developers List > Subject: [collections] ReferenceMap changed for WeakIdentityMap but now > broken > > > I altered ReferenceMap to exten

RE: [collections] ReferenceMap changed for WeakIdentityMap but now broken

2004-03-23 Thread Noel J. Bergman
t: Tuesday, March 23, 2004 18:02 To: Jakarta Commons Developers List Subject: [collections] ReferenceMap changed for WeakIdentityMap but now broken I altered ReferenceMap to extend AbstractHashedMap, which seems to be possible to do in a backwards compatable way (prior to looking at crreating a We

[collections] ReferenceMap changed for WeakIdentityMap but now broken

2004-03-23 Thread Stephen Colebourne
I altered ReferenceMap to extend AbstractHashedMap, which seems to be possible to do in a backwards compatable way (prior to looking at crreating a WeakIdentityMap as per recent requests). The new version is attached. However, the new version doesn't seem to work, as in the 'reference' (weak/soft)