[ https://issues.apache.org/jira/browse/COLLECTIONS-250?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
James Carman resolved COLLECTIONS-250. -------------------------------------- Resolution: Invalid Assignee: James Carman I believe we have established that this is the desired functionality. Changing it now would break other code which relies upon the existing behavior. > containsKey on MultiHashMap seems incorrect > ------------------------------------------- > > Key: COLLECTIONS-250 > URL: https://issues.apache.org/jira/browse/COLLECTIONS-250 > Project: Commons Collections > Issue Type: Bug > Components: Map > Affects Versions: 3.1, 3.2 > Reporter: Nikhil G. Daddikar > Assigned To: James Carman > Priority: Critical > > MultiHashMap m = new MultiHashMap(); > m.putAll("key", Collections.EMPTY_LIST); > System.out.println(m.containsKey("key")) > It says false, when it should have printed true. > The problem is that the code in MultiHashMap and even MultiValueMap has in > putAll(): > if (values == null || values.size() == 0) > { > return false; > } > This means that they key is never being entered into the Map. This is causing > a huge problem because the behaviour has changed. -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online. --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]