Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTobias Schwarz2014-02-18 04:33:45 -0500
committerTobias Schwarz2014-02-18 04:33:45 -0500
commit1bc0b83855f533013842c9cee912ce01124dd5c1 (patch)
tree69014ffe4ddb50c39aaf08ab1aa8948a2067b4a1
parent416e511da5550c7e29a5f4154004394b8db66f99 (diff)
downloadorg.eclipse.tcf-1bc0b83855f533013842c9cee912ce01124dd5c1.tar.gz
org.eclipse.tcf-1bc0b83855f533013842c9cee912ce01124dd5c1.tar.xz
org.eclipse.tcf-1bc0b83855f533013842c9cee912ce01124dd5c1.zip
Target Explorer: fix equal
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.runtime.services/src/org/eclipse/tcf/te/runtime/services/filetransfer/FileTransferItem.java7
1 files changed, 4 insertions, 3 deletions
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.runtime.services/src/org/eclipse/tcf/te/runtime/services/filetransfer/FileTransferItem.java b/target_explorer/plugins/org.eclipse.tcf.te.runtime.services/src/org/eclipse/tcf/te/runtime/services/filetransfer/FileTransferItem.java
index 87c957537..d458c7411 100644
--- a/target_explorer/plugins/org.eclipse.tcf.te.runtime.services/src/org/eclipse/tcf/te/runtime/services/filetransfer/FileTransferItem.java
+++ b/target_explorer/plugins/org.eclipse.tcf.te.runtime.services/src/org/eclipse/tcf/te/runtime/services/filetransfer/FileTransferItem.java
@@ -102,9 +102,10 @@ public class FileTransferItem extends PropertiesContainer implements IFileTransf
public boolean equals(Object obj) {
boolean equals = super.equals(obj);
if (!equals && obj instanceof IFileTransferItem) {
- return getHostPath() != null ? getHostPath().equals(((IFileTransferItem)obj).getHostPath()) : ((IFileTransferItem)obj).getHostPath() == null
- && getTargetPath() != null ? getTargetPath().equals(((IFileTransferItem)obj).getTargetPath()) : ((IFileTransferItem)obj).getTargetPath() == null
- && getDirection() == ((IFileTransferItem)obj).getDirection();
+ boolean hostPathEqual = getHostPath() != null ? getHostPath().equals(((IFileTransferItem)obj).getHostPath()) : ((IFileTransferItem)obj).getHostPath() == null;
+ boolean targetPathEqual = getTargetPath() != null ? getTargetPath().equals(((IFileTransferItem)obj).getTargetPath()) : ((IFileTransferItem)obj).getTargetPath() == null;
+ boolean directionEqual = getDirection() == ((IFileTransferItem)obj).getDirection();
+ return hostPathEqual && targetPathEqual && directionEqual;
}
return equals;
}

Back to the top