Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorWilliam Chen2012-02-23 02:14:57 -0500
committerWilliam Chen2012-02-23 02:14:57 -0500
commitcd340d15a8669d3c1b2d92e6053dfa926ebc9c44 (patch)
treed50b333a007aa2973795541a84d4a967cd69d2aa
parentc7af49022bcef0631acbb14c5435fa07873abe86 (diff)
downloadorg.eclipse.tcf-cd340d15a8669d3c1b2d92e6053dfa926ebc9c44.tar.gz
org.eclipse.tcf-cd340d15a8669d3c1b2d92e6053dfa926ebc9c44.tar.xz
org.eclipse.tcf-cd340d15a8669d3c1b2d92e6053dfa926ebc9c44.zip
Target Explorer: Override hashCode in MergeEditorInput so that two
equal objects have same hashCodes.
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/internal/compare/MergeEditorInput.java9
1 files changed, 9 insertions, 0 deletions
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/internal/compare/MergeEditorInput.java b/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/internal/compare/MergeEditorInput.java
index 2caeb109c..f4c35d586 100644
--- a/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/internal/compare/MergeEditorInput.java
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/internal/compare/MergeEditorInput.java
@@ -115,6 +115,15 @@ public class MergeEditorInput extends CompareEditorInput implements
}
/**
+ * Override hashCode to provide identical value when
+ * two MergeEditorInputs are equal to each other.
+ */
+ @Override
+ public int hashCode() {
+ return left.hashCode() + right.hashCode();
+ }
+
+ /**
* Prepare the compare input of this editor input. This method is not
* intended to be overridden of extended by subclasses (but is not final for
* backwards compatibility reasons). The implementation of this method in

Back to the top