Nils Faupel created COLLECTIONS-803:
---------------------------------------

             Summary: CaseInsensitiveMap prevent duplicate key conversion on put
                 Key: COLLECTIONS-803
                 URL: https://issues.apache.org/jira/browse/COLLECTIONS-803
             Project: Commons Collections
          Issue Type: Improvement
          Components: Map
    Affects Versions: 4.4
            Reporter: Nils Faupel


When adding a new item into a {{CaseInsensitiveMap }} the {{convertKey(key)}} 
method is called twice, once in the {{put(key, value)}} method and second in 
the {{createEntry(next, hashCode, key, value)}} method. The result could be 
re-used resulting in a better performance. Depending on the {{toString()}} 
implementation of the key and the resulting length of the key before the lower 
case conversion the operation can get expensive and should not be called twice.



--
This message was sent by Atlassian Jira
(v8.20.1#820001)

Reply via email to