You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@commons.apache.org by "Claudenw (via GitHub)" <gi...@apache.org> on 2023/03/29 16:53:35 UTC

[GitHub] [commons-collections] Claudenw commented on pull request #276: COLLECTIONS-803: prevent duplicate call to convertKey on put for CaseInsensitiveMap

Claudenw commented on PR #276:
URL: https://github.com/apache/commons-collections/pull/276#issuecomment-1488959770

   @aherbert I am torn here.  I think that the changes proposed for `CaseInsensitiveMap` should be applied to `AbstractHashedMap` as any class that overrides `convertKey` will benefit.  However, this means changes to `addMapping` and `createEntry`
   
   The changes proposed are, within themselves, clean.  However, changing the original implementations would be a breaking change for anyone that has overridden them.  My thought was to modify `AbstractHashedMap.put()` to work as the proposed `CaseInsensitiveMap.put()` works.  But this introduces 2 new methods to  `AbstractHashedMap`.  I don't like the proposed names but I also don't see any standardised names that make sense though  perhaps then names `_addMapping` and `_createEntry`  would work.  We could then mark `addMapping` and `createEntry` for deprecation.
   
   What is your opinion?


-- 
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: issues-unsubscribe@commons.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org