diff options
author | Shawn Pearce <spearce@spearce.org> | 2010-10-28 11:46:41 -0400 |
---|---|---|
committer | Code Review <codereview-daemon@eclipse.org> | 2010-10-28 11:46:41 -0400 |
commit | 2f7e2f82de6cecc3ed50accb8010f043fce1e1a5 (patch) | |
tree | 88717c57a2fe2c0130df5549c2ae7d977201f55d | |
parent | 258f516abe545667f50dc74760672fafd94a7533 (diff) | |
parent | db35d91fa6ca6339f58149cf45cb02555987123b (diff) | |
download | jgit-2f7e2f82de6cecc3ed50accb8010f043fce1e1a5.tar.gz jgit-2f7e2f82de6cecc3ed50accb8010f043fce1e1a5.zip |
Merge "Fix oddness check in MyersDiff for negative numbers"
-rw-r--r-- | org.eclipse.jgit/src/org/eclipse/jgit/diff/MyersDiff.java | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/diff/MyersDiff.java b/org.eclipse.jgit/src/org/eclipse/jgit/diff/MyersDiff.java index 3459109b6e..9d309d5076 100644 --- a/org.eclipse.jgit/src/org/eclipse/jgit/diff/MyersDiff.java +++ b/org.eclipse.jgit/src/org/eclipse/jgit/diff/MyersDiff.java @@ -300,7 +300,7 @@ public class MyersDiff<S extends Sequence> { final int getIndex(int d, int k) { // TODO: remove -if (((d + k - middleK) % 2) == 1) +if (((d + k - middleK) % 2) != 0) throw new RuntimeException(MessageFormat.format(JGitText.get().unexpectedOddResult, d, k, middleK)); return (d + k - middleK) / 2; } @@ -472,7 +472,7 @@ if (k < beginK || k > endK) if (k < backward.beginK || k > backward.endK) return false; // TODO: move out of loop - if (((d - 1 + k - backward.middleK) % 2) == 1) + if (((d - 1 + k - backward.middleK) % 2) != 0) return false; if (x < backward.getX(d - 1, k)) return false; @@ -514,7 +514,7 @@ if (k < beginK || k > endK) if (k < forward.beginK || k > forward.endK) return false; // TODO: move out of loop - if (((d + k - forward.middleK) % 2) == 1) + if (((d + k - forward.middleK) % 2) != 0) return false; if (x > forward.getX(d, k)) return false; |