Community
Participate
Working Groups
Shouldn't the inner class WTPResourceFactoryRegistryKey of WTPResourceFactoryRegistry, implement hashCode() and equals() as it is used as the key in the HashMap of descriptors?
Chuck removed the hashCode and equals method implementations in version 1.7 of WTPResourceFactoryRegistryKey. The comment for the change claims bug 175139, as does the commit on the next day. However, the patch attached to the bug only handles the set of changes after this (from version 1.7 to 1.8, where these methods were already removed), and not the changes that removed these methods. I am assigning this to Chuck for investigation, but targeting to future, since I am unsure of the need or impact of adding these methods back- it has been this way since WTP 2.0.0, and I do not know of any ill effects from the lack of these two methods.
OK, thanks. I noticed this while investigating some memory leak issues with an adopter project. I see a default resource factory being registered multiple times (a different issue to resolve). Each instance is added to the HashMap though the keys are really the same, creating/leaving references from the map to each of the separate instances of the factory. Not a major issue, but am curious.