View | Details | Raw Unified | Return to bug 174109
Collapse All | Expand All

(-)Eclipse SWT/common/org/eclipse/swt/graphics/Rectangle.java (-1 / +7 lines)
Lines 62-67 Link Here
62
	 */
62
	 */
63
	public int height;
63
	public int height;
64
64
65
	static final int PRIME = 37;
66
65
	static final long serialVersionUID = 3256439218279428914L;
67
	static final long serialVersionUID = 3256439218279428914L;
66
	
68
	
67
/**
69
/**
Lines 167-173 Link Here
167
 * @see #equals(Object)
169
 * @see #equals(Object)
168
 */
170
 */
169
public int hashCode () {
171
public int hashCode () {
170
	return x ^ y ^ width ^ height;
172
	int result = x;
173
	result = result * PRIME + y;
174
	result = result * PRIME + width;
175
	result = result * PRIME + height;
176
	return result;
171
}
177
}
172
178
173
/**
179
/**
(-)Eclipse SWT/common/org/eclipse/swt/graphics/Point.java (-1 / +3 lines)
Lines 49-54 Link Here
49
	 */
49
	 */
50
	public int y;
50
	public int y;
51
	
51
	
52
	static final int PRIME = 37;
53
52
	static final long serialVersionUID = 3257002163938146354L;
54
	static final long serialVersionUID = 3257002163938146354L;
53
	
55
	
54
/**
56
/**
Lines 90-96 Link Here
90
 * @see #equals(Object)
92
 * @see #equals(Object)
91
 */
93
 */
92
public int hashCode () {
94
public int hashCode () {
93
	return x ^ y;
95
	return x * PRIME + y;
94
}
96
}
95
97
96
/**
98
/**

Return to bug 174109