Community
Participate
Working Groups
Build ID: M20060921-0945 The current implementation of hashCode() for org.eclipse.swt.graphics.Point returns the bitwise XOR of the two coordinates. For typical applications, this yields a small distribution of hash values relative to the universe of likely Point instances. For example, suppose that most Point instances have coordinates in the range of -2000 to 2000. There are approximately 16 million such points, yet there are only have 4096 possible hash values for these points. A simple function such as: point.x + {large_prime_number}*point.y would have better distributional properties. I doubt anything more elaborate is required. A similar observation applies to org.eclipse.swt.graphics.Rectangle as well.
Created attachment 66529 [details] Path for problem
This bug hasn't had any activity in quite some time. Maybe the problem got resolved, was a duplicate of something else, or became less pressing for some reason - or maybe it's still relevant but just hasn't been looked at yet. If you have further information on the current state of the bug, please add it. The information can be, for example, that the problem still occurs, that you still want the feature, that more information is needed, or that the bug is (for whatever reason) no longer relevant.