This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 19936 - MDRCache does not work properly
Summary: MDRCache does not work properly
Status: VERIFIED FIXED
Alias: None
Product: java
Classification: Unclassified
Component: Unsupported (show other bugs)
Version: 3.x
Hardware: All All
: P2 blocker (vote)
Assignee: issues@java
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2002-01-30 12:15 UTC by Petr Hrebejk
Modified: 2005-07-27 08:23 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
Patch to fix the bug (6.14 KB, patch)
2002-01-30 12:17 UTC, Petr Hrebejk
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Petr Hrebejk 2002-01-30 12:15:36 UTC
There seems to be bugs in MDRCache
1) When removing from the cache HasMap the remove method is called with
the value parameter instead of key. This results in not removing the items

2) The get method adds the key into the hardLinks cache even if the key is 
already included in the cache. 20 gets of the same key result in 20 
identical entries in the cache, which is probably not desired

3) I think the base class for the CacheReference should be rather
WeaikReference than SoftReference to be more memory friendly
Comment 1 Petr Hrebejk 2002-01-30 12:17:27 UTC
Created attachment 4491 [details]
Patch to fix the bug
Comment 2 Martin Matula 2002-01-31 06:44:23 UTC
Cool! How did you spot it? Currently I am refactoring the MDR API a
bit (according to the discussion with Yarda on openide-dev) so I am
not able to validate the patch. I will apply it after I will validate
and commit the changes of the APIs.
Comment 3 Martin Matula 2002-02-07 10:01:58 UTC
attached patch applied
Comment 4 Jiri Prox 2005-07-27 08:23:31 UTC
quiet for too long, marking as verified