Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMalgorzata Janczarska2011-10-18 10:15:31 +0000
committerTomasz Zarna2011-10-18 10:15:31 +0000
commit33f3884b44162a4fc6b1236e969d2804dcd07c28 (patch)
tree48a66f21738340afc1009cde08e1210810b2478e /bundles/org.eclipse.team.ui/src/org
parent80a54a39d399d98f5ea5ad12908faf3b80d625a7 (diff)
downloadeclipse.platform.team-33f3884b44162a4fc6b1236e969d2804dcd07c28.tar.gz
eclipse.platform.team-33f3884b44162a4fc6b1236e969d2804dcd07c28.tar.xz
eclipse.platform.team-33f3884b44162a4fc6b1236e969d2804dcd07c28.zip
bug 347557: NPE when saving a file in a compare editor (always)I20111018-0800
Diffstat (limited to 'bundles/org.eclipse.team.ui/src/org')
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/LocalResourceSaveableComparison.java8
1 files changed, 4 insertions, 4 deletions
diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/LocalResourceSaveableComparison.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/LocalResourceSaveableComparison.java
index 0008fa91e..fb839b445 100644
--- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/LocalResourceSaveableComparison.java
+++ b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/LocalResourceSaveableComparison.java
@@ -248,10 +248,10 @@ public abstract class LocalResourceSaveableComparison extends SaveableComparison
*/
public String getName() {
// Return the name of the file element as held in the compare input
- if (fileElement.equals(input.getLeft())) {
+ if (input.getLeft().equals(fileElement)) {
return input.getLeft().getName();
}
- if (fileElement.equals(input.getRight())) {
+ if (input.getRight().equals(fileElement)) {
return input.getRight().getName();
}
// Fallback call returning name of the main non-null element of the input
@@ -289,14 +289,14 @@ public abstract class LocalResourceSaveableComparison extends SaveableComparison
ContentMergeViewer cmv = (ContentMergeViewer) e.getSource();
- if (fileElement.equals(input.getLeft())) {
+ if (input.getLeft().equals(fileElement)) {
if (changed && cmv.internalIsLeftDirty())
setDirty(changed);
else if (!changed && !cmv.internalIsLeftDirty()) {
setDirty(changed);
}
}
- if (fileElement.equals(input.getRight())) {
+ if (input.getRight().equals(fileElement)) {
if (changed && cmv.internalIsRightDirty())
setDirty(changed);
else if (!changed && !cmv.internalIsRightDirty()) {

Back to the top