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

Summary: MDRCache does not work properly
Product: java Reporter: Petr Hrebejk <phrebejk>
Component: UnsupportedAssignee: issues@java <issues>
Status: VERIFIED FIXED    
Severity: blocker    
Priority: P2    
Version: 3.x   
Hardware: All   
OS: All   
Issue Type: DEFECT Exception Reporter:
Attachments: Patch to fix the 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