]> source.dussan.org Git - aspectj.git/commitdiff
Bug 155238 "Trace should use System.identityHashCode, not hashCode"
authormwebster <mwebster>
Wed, 30 Aug 2006 09:46:37 +0000 (09:46 +0000)
committermwebster <mwebster>
Wed, 30 Aug 2006 09:46:37 +0000 (09:46 +0000)
loadtime/src/org/aspectj/weaver/loadtime/DefaultWeavingContext.java
weaver/src/org/aspectj/weaver/tools/AbstractTrace.java

index 403a3576fb0843b8c21fc5af3651b53060c0a4c0..02c8a091e2c3efc528b7643c2aeb4bb9888ae64c 100644 (file)
@@ -53,7 +53,7 @@ public class DefaultWeavingContext implements IWeavingContext {
         * @return classname@hashcode
         */
        public String getClassLoaderName() {
-       return ((loader!=null)?loader.getClass().getName()+"@"+Integer.toHexString(loader.hashCode()):"null");
+       return ((loader!=null)?loader.getClass().getName()+"@"+Integer.toHexString(System.identityHashCode(loader)):"null");
        }
 
        /**
index 28755dfd2b17b1140b0813a42c81f0d77bcdbfac..6034a1f0515ba68a320660c53e615f6a4ae6373c 100644 (file)
@@ -139,7 +139,7 @@ public abstract class AbstractTrace implements Trace {
                        }
                        
                        /* Use classname@hashcode */
-                       else return obj.getClass().getName() + "@" + Integer.toHexString(obj.hashCode());
+                       else return obj.getClass().getName() + "@" + Integer.toHexString(System.identityHashCode(obj));
                
                /* Object.hashCode() can be override and may thow an exception */       
                } catch (Exception ex) {