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
The put(key, value) calls the superclass, which then calls createEntry() to create an entry. The entry should be of the subclass ReferenceEntry which should handle the references in the constructor. Stephen - Original Message - From: "Noel J. Bergman" <[EMAIL PROTECTED]> > I only spent a

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

2004-03-23 Thread Noel J. Bergman
Stephen, I only spent a minute or two looking, but: public Object put(Object key, Object value) { if (key == null) { throw new NullPointerException("null keys not allowed"); } if (value == null) { throw new NullPointerException("null values not