Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

You mentioned HashSets as another, distinct source of problems; I wanted to highlight that these two are the same thing behind the scenes, as the backing map's key set is doing the heavy lifting. It definitely is an implementation detail, and I can't say that all JDK variants employ the same trick, but a fair few of them do, given that most of them share the same set of java.lang classes.


Just an addendum, sorry for the double post: I checked two additional implementations in the meantime.

Apache Harmony: https://github.com/apache/harmony-classlib/blob/ee663b95e840...

GNU Classpath: https://github.com/ingelabs/classpath/blob/a96698f67357fddbe...




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: