### Eclipse Workspace Patch 1.0 #P org.eclipse.swt Index: Eclipse SWT/common/org/eclipse/swt/graphics/Rectangle.java =================================================================== RCS file: /cvsroot/eclipse/org.eclipse.swt/Eclipse SWT/common/org/eclipse/swt/graphics/Rectangle.java,v retrieving revision 1.21 diff -u -r1.21 Rectangle.java --- Eclipse SWT/common/org/eclipse/swt/graphics/Rectangle.java 23 Jun 2005 14:51:56 -0000 1.21 +++ Eclipse SWT/common/org/eclipse/swt/graphics/Rectangle.java 9 May 2007 18:43:13 -0000 @@ -62,6 +62,8 @@ */ public int height; + static final int PRIME = 37; + static final long serialVersionUID = 3256439218279428914L; /** @@ -167,7 +169,11 @@ * @see #equals(Object) */ public int hashCode () { - return x ^ y ^ width ^ height; + int result = x; + result = result * PRIME + y; + result = result * PRIME + width; + result = result * PRIME + height; + return result; } /** Index: Eclipse SWT/common/org/eclipse/swt/graphics/Point.java =================================================================== RCS file: /cvsroot/eclipse/org.eclipse.swt/Eclipse SWT/common/org/eclipse/swt/graphics/Point.java,v retrieving revision 1.15 diff -u -r1.15 Point.java --- Eclipse SWT/common/org/eclipse/swt/graphics/Point.java 23 Jun 2005 14:51:56 -0000 1.15 +++ Eclipse SWT/common/org/eclipse/swt/graphics/Point.java 9 May 2007 18:43:13 -0000 @@ -49,6 +49,8 @@ */ public int y; + static final int PRIME = 37; + static final long serialVersionUID = 3257002163938146354L; /** @@ -90,7 +92,7 @@ * @see #equals(Object) */ public int hashCode () { - return x ^ y; + return x * PRIME + y; } /**