But our code should not be using == instead of equals. The identity of an Integer should never be assumed. Best practice even if not mandated by the VM spec.
Craig On Jul 29, 2007, at 10:35 PM, Marc Prud'hommeaux wrote:
The problem is that the IBM JDK seems to want to create (copy) new Integer objects when used as keys to the HashMap.put(k,v) method. Any other key types are just used as is (no copy). But, Integer types as keys are copiedinto new Integer objects.
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
