Two "hash" classes, ``++Hashtable++``, and ``++ConcurrentHashMap++`` offer ``++contains++`` methods. One might naively assume that the ``++contains++`` method searches both keys and values for its argument. And one would be wrong. Because these legacy methods search only values, they are likely to mislead maintainers even if the original coder understood precisely what's going on.
According to following statement [~ann.campbell.2] "they are likely to mislead maintainers even if the original coder understood precisely what's going on", this sounds to be more a Critical or Blocker Code Smells than a Bug.
=== on 15 Jul 2016, 14:21:25 Ann Campbell wrote:
I disagree [~freddy.mallet]. That statement gives the original coder the benefit of the doubt, but with a significant eye-roll. "_even if_ the original coder understood..."