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
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
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
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.
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
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
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
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
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)