4 ms·
Even superstar hackers introduce the occasional bug. Mr. Bloch is listed as the author of java.util.EnumMap. The clone() method doesn't reset the entrySet memb
by fleaflicker 18y ago
Even superstar hackers introduce the occasional bug.
Mr. Bloch is listed as the author of java.util.EnumMap. The clone() method doesn't reset the entrySet member. So changes to the original will seemingly affect the clone.
(Source code of java.util.EnumMap http://www.jdocs.com/page/AjaxSourceCode?oid=57699 http://www.jdocs.com/page/AjaxSourceCode?oid=57699 )
I filed a bug report on this long ago but no luck. This bug has been present in every JDK release since 1.5.
- nradov 18y agoIt's open source now, so you can go ahead and submit a patch to the core-libs-dev@openjdk.java.net mailing list.