Skip to content

Commit c922055

Browse files
ptzieglermickaelistria
authored andcommitted
Handle IDiff.NO_CHANGE when comparing two files identical files
When comparing two files while synchronizing with a remote version-control system an exception might be thrown when those happen to be identical. Add an additional case to the switch-statement to handle this situation. The reason it worked previously is because this case has the ID 0, which corresponds to the initial value of the local integer variable. Resolves #1159 Amends d2ed9d5
1 parent ac1e1ac commit c922055

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

team/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/mapping/ResourceDiffCompareInput.java

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*******************************************************************************
2-
* Copyright (c) 2006, 2017 IBM Corporation and others.
2+
* Copyright (c) 2006, 2024 IBM Corporation and others.
33
*
44
* This program and the accompanying materials
55
* are made available under the terms of the Eclipse Public License 2.0
@@ -60,6 +60,9 @@ public static int getCompareKind(IDiff node) {
6060
case IDiff.CHANGE:
6161
compareKind = Differencer.CHANGE;
6262
break;
63+
case IDiff.NO_CHANGE:
64+
compareKind = Differencer.NO_CHANGE;
65+
break;
6366
default:
6467
throw new IllegalArgumentException(Integer.toString(kind));
6568
}

0 commit comments

Comments
 (0)