Commit Graph

1 Commits

Author SHA1 Message Date
Theodore Abshire c1e817d1a9 fix(util): Made |MultiMap.remove| clear empty keys
According to the output documentation, |MultiMap.get| is supposed
to return null "if no such key exists".
However, in the case that an object is added to the map and then
removed, |MultiMap.get| will return an empty array instead of null.
This inconsistency could be relevant for code that tests based on
the truthiness of the output, so this CL changes the remove method
to delete the array for a given key if it becomes empty.

This also adds unit tests for MultiMap.

Change-Id: I049fece920883e1cb10c319a3f00156be4ee011b
2021-04-13 16:09:33 -07:00