Claudenw commented on PR #276: URL: https://github.com/apache/commons-collections/pull/276#issuecomment-1491666974
I think that we can make a change work for AbstractHashedMap. If we simply change line 286 in the `AbstractHashedMap.put()` and inline the `addMapping()` call using the code proposed in this pull request replacing the call to `createEntry()` with an inline creation of the Entry object using the already converted key. This has the advantages of 1. Calling the conversion once. 2. Improving the performance of implementations that do not override the put() method. 3. Does not impact overriding implementations unless the overriding class implements `addMapping()` or `createEntry()` and does not override `put()`. There is a possible implementation using a ThreadLocal variable to store the key and and override createEntry() to check for it. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
