diff options
author | Silenio Quarti <silenio> | 2010-07-28 15:05:04 +0000 |
---|---|---|
committer | Silenio Quarti <silenio> | 2010-07-28 15:05:04 +0000 |
commit | 9b6b9f9ac7f0efbfe03671de5d7ea74a7965abf1 (patch) | |
tree | 58b4fd4d2493650b9c1cdcc3e1c2554dddf6731c /bundles/org.eclipse.swt/Eclipse SWT | |
parent | 1d20a0f3554cc13b0d97b070ceb9b7b1751bc427 (diff) | |
download | eclipse.platform.swt-9b6b9f9ac7f0efbfe03671de5d7ea74a7965abf1.tar.gz eclipse.platform.swt-9b6b9f9ac7f0efbfe03671de5d7ea74a7965abf1.tar.xz eclipse.platform.swt-9b6b9f9ac7f0efbfe03671de5d7ea74a7965abf1.zip |
Bug 320484 - Weak FontData hashCode
Diffstat (limited to 'bundles/org.eclipse.swt/Eclipse SWT')
6 files changed, 7 insertions, 7 deletions
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/carbon/org/eclipse/swt/graphics/FontData.java b/bundles/org.eclipse.swt/Eclipse SWT/carbon/org/eclipse/swt/graphics/FontData.java index 4a485de5e3..51df7001c6 100644 --- a/bundles/org.eclipse.swt/Eclipse SWT/carbon/org/eclipse/swt/graphics/FontData.java +++ b/bundles/org.eclipse.swt/Eclipse SWT/carbon/org/eclipse/swt/graphics/FontData.java @@ -320,7 +320,7 @@ public int getStyle() { * @see #equals */ public int hashCode () { - return name.hashCode() ^ getHeight() ^ style; + return name.hashCode() ^ getHeight() << 8 ^ style; } /** diff --git a/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/graphics/FontData.java b/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/graphics/FontData.java index c25f6369ab..6dcd68b96f 100755 --- a/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/graphics/FontData.java +++ b/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/graphics/FontData.java @@ -320,7 +320,7 @@ public int getStyle() { * @see #equals */ public int hashCode () { - return name.hashCode() ^ getHeight() ^ style; + return name.hashCode() ^ getHeight() << 8 ^ style; } /** diff --git a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/graphics/FontData.java b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/graphics/FontData.java index 39a350c949..204f6f7af8 100644 --- a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/graphics/FontData.java +++ b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/graphics/FontData.java @@ -318,7 +318,7 @@ public int getStyle() { * @see #equals */ public int hashCode () { - return name.hashCode() ^ getHeight() ^ style; + return name.hashCode() ^ getHeight() << 8 ^ style; } /** diff --git a/bundles/org.eclipse.swt/Eclipse SWT/photon/org/eclipse/swt/graphics/FontData.java b/bundles/org.eclipse.swt/Eclipse SWT/photon/org/eclipse/swt/graphics/FontData.java index 134cc77c87..a89bfa406a 100755 --- a/bundles/org.eclipse.swt/Eclipse SWT/photon/org/eclipse/swt/graphics/FontData.java +++ b/bundles/org.eclipse.swt/Eclipse SWT/photon/org/eclipse/swt/graphics/FontData.java @@ -330,7 +330,7 @@ public int getStyle() { * @see #equals */ public int hashCode () { - return name.hashCode() ^ height ^ style; + return name.hashCode() ^ height << 8 ^ style; } /** diff --git a/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/graphics/FontData.java b/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/graphics/FontData.java index c091768a5f..31c12847b7 100755 --- a/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/graphics/FontData.java +++ b/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/graphics/FontData.java @@ -461,8 +461,8 @@ public int getStyle() { * @see #equals */ public int hashCode () { - return data.lfCharSet ^ getHeight() ^ data.lfWidth ^ data.lfEscapement ^ - data.lfOrientation ^ data.lfWeight ^ data.lfItalic ^data.lfUnderline ^ + return data.lfCharSet ^ getHeight() << 8 ^ data.lfWidth ^ data.lfEscapement ^ + data.lfOrientation ^ data.lfWeight ^ data.lfItalic ^ data.lfUnderline ^ data.lfStrikeOut ^ data.lfCharSet ^ data.lfOutPrecision ^ data.lfClipPrecision ^ data.lfQuality ^ data.lfPitchAndFamily ^ getName().hashCode(); diff --git a/bundles/org.eclipse.swt/Eclipse SWT/wpf/org/eclipse/swt/graphics/FontData.java b/bundles/org.eclipse.swt/Eclipse SWT/wpf/org/eclipse/swt/graphics/FontData.java index 7701fe2ab4..e1f1f7727e 100644 --- a/bundles/org.eclipse.swt/Eclipse SWT/wpf/org/eclipse/swt/graphics/FontData.java +++ b/bundles/org.eclipse.swt/Eclipse SWT/wpf/org/eclipse/swt/graphics/FontData.java @@ -375,7 +375,7 @@ public int getStyle() { * @see #equals */ public int hashCode () { - return style ^ weight ^ stretch ^ getName().hashCode(); + return style ^ weight ^ stretch ^ getHeight () << 8 ^ getName().hashCode(); } /** |