upvote
You are communicating with future readers of the code. The presence of ConcurrentHashMap will lead future engineers into believing the code is threadsafe. This isn't true, and believing it is dangerous.
reply
No, they'll believe that that specific map is thread safe.
reply
That's really not much better. No function is an island, as wise man almost once said.
reply
It’s actually a lot better. That’s literally the whole point of interfaces and polymorphism: to make it so the outside does not care about the implementation.
reply