DaveAKing / guava-libraries

Automatically exported from code.google.com/p/guava-libraries
Apache License 2.0
0 stars 0 forks source link

LocalCache.Values should not be a Set #1636

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
As Cache is basically a map, it can contain same values for different keys. 
Using Set for Cache.asMap().values() is always wrong: it will either discard 
duplicate values or break semantics of Set.

My now not-working use (it should remove all values, now removes only one):
[cache].asMap().values().removeAll(ImmutableList.of([value]));

It worked up to r13. Offending changeset: 
60b819dc1291788a3dce17cd95d8f4a7d0a8b9bf.

Original issue reported on code.google.com by me...@rewor.cz on 17 Jan 2014 at 9:02

GoogleCodeExporter commented 9 years ago

Original comment by cgdecker@google.com on 17 Jan 2014 at 5:47

GoogleCodeExporter commented 9 years ago
Fixed internally; fix will be mirrored out shortly.

Original comment by lowas...@google.com on 17 Jan 2014 at 7:33

GoogleCodeExporter commented 9 years ago
https://code.google.com/p/guava-libraries/source/detail?r=39a4f96687c910b5194007
a0bb499a9ccb41f0ce

Original comment by cgdecker@google.com on 17 Jan 2014 at 8:03

GoogleCodeExporter commented 9 years ago

Original comment by cgdecker@google.com on 17 Jan 2014 at 9:55

GoogleCodeExporter commented 9 years ago
This issue has been migrated to GitHub.

It can be found at https://github.com/google/guava/issues/<issue id>

Original comment by cgdecker@google.com on 1 Nov 2014 at 4:10

GoogleCodeExporter commented 9 years ago

Original comment by cgdecker@google.com on 3 Nov 2014 at 9:07