Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorCarsten Hammer2019-08-26 15:13:31 -0400
committerCarsten Hammer2019-09-13 13:23:15 -0400
commit839d8194dbfdeeadd58082a9db643a751cfc461f (patch)
tree491f70623f542bce8940e3737351f0c5850e8611
parent475518e35dc1ba083174fc6387e19479ead28638 (diff)
downloadeclipse.platform.text-I20190914-1800.tar.gz
eclipse.platform.text-I20190914-1800.tar.xz
eclipse.platform.text-I20190914-1800.zip
Hashcode used on arrayI20190914-1800
hashCode for array instances is inherited from java.lang.Object, and it is based on the array's reference rather than on array's contents. In order to obtain a more reasonable hashCode, which reflects contained objects or values, use Arrays.hashCodeor Arrays.deepHashCode() Change-Id: I66956e7d4242f751d6fc28d4636caa9b65f4141d Signed-off-by: Carsten Hammer <carsten.hammer@t-online.de>
-rw-r--r--org.eclipse.jface.text/src/org/eclipse/jface/text/link/ProposalPosition.java2
1 files changed, 1 insertions, 1 deletions
diff --git a/org.eclipse.jface.text/src/org/eclipse/jface/text/link/ProposalPosition.java b/org.eclipse.jface.text/src/org/eclipse/jface/text/link/ProposalPosition.java
index 2b157ea1c..7686a8441 100644
--- a/org.eclipse.jface.text/src/org/eclipse/jface/text/link/ProposalPosition.java
+++ b/org.eclipse.jface.text/src/org/eclipse/jface/text/link/ProposalPosition.java
@@ -95,6 +95,6 @@ public class ProposalPosition extends LinkedPosition {
@Override
public int hashCode() {
- return super.hashCode() | (fProposals == null ? 0 : fProposals.hashCode());
+ return super.hashCode() | (fProposals == null ? 0 : Arrays.hashCode(fProposals));
}
}

Back to the top