Bug 155238 - Trace should use System.identityHashCode, not hashCode
Summary: Trace should use System.identityHashCode, not hashCode
Status: RESOLVED FIXED
Alias: None
Product: AspectJ
Classification: Tools
Component: LTWeaving (show other bugs)
Version: DEVELOPMENT   Edit
Hardware: PC Windows XP
: P3 enhancement (vote)
Target Milestone: ---   Edit
Assignee: aspectj inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-08-25 11:46 EDT by Ron Bodkin CLA
Modified: 2006-09-05 03:55 EDT (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Ron Bodkin CLA 2006-08-25 11:46:46 EDT
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.
Comment 1 Matthew Webster CLA 2006-08-30 05:44:42 EDT
Good idea. I have changed DefaultWeavingContext too. Changes committed.
Comment 2 Matthew Webster CLA 2006-09-05 03:55:28 EDT
aspectj-DEVELOPMENT-20060904170118.jar