Hi Kevin, On Jul 30, 2007, at 5:45 AM, Kevin Sutter wrote:
I haven't found all of the details on the problem report that made this change, but the abstract indicates "hashmap performance changes". So, ourfindings would be consistent with that. I just wanted to see if anybody thought that this behavior of the HashMap.put() was inconsistent with the java spec or if there was some strong opinion on the use of == for this situation.
The javadoc for the collections framework indicate that it's the "value" of the key that is important. And "everyone knows" that the value of an Integer is not the instance itself but the int it contains.
So it seems that the javadoc would allow an equivalent ("interned") key to be substituted as long as the substitute key had the same value as the proposed key.
On the openjpa side, I think we should use equals instead of == for testing as well as normal usage of the map graph keys.
Craig Craig Russell Architect, Sun Java Enterprise System http://java.sun.com/products/jdo 408 276-5638 mailto:[EMAIL PROTECTED] P.S. A good JDO? O, Gasp!
smime.p7s
Description: S/MIME cryptographic signature
