Project: AspectJ
Bug 155238 Trace should use System.identityHashCode, not hashCode
Reported: 2006-08-25 11:46:46 | Status: resolved fixed

The tracing module uses obj.hashCode() to identify untrusted objects when formatting. I think it would be a little safer and more accurate to use System.identityHashCode(obj). This way the tracing code wouldn't call any application-defined code, and would give a value that can't change if the loader state changes.

Files changed in fix:
loadtime/src/org/aspectj/weaver/loadtime/DefaultWeavingContext.java weaver/src/org/aspectj/weaver/tools/AbstractTrace.java