aboutsummaryrefslogtreecommitdiffstats
path: root/org.eclipse.jgit/src/org/eclipse/jgit/diff/MyersDiff.java
diff options
context:
space:
mode:
authorDavid Pursehouse <david.pursehouse@gmail.com>2017-01-16 14:39:32 +0900
committerDavid Pursehouse <david.pursehouse@gmail.com>2017-02-19 20:05:08 -0400
commit7ac182f4e427e0d5a986b8ca67a56fc22828b1a0 (patch)
tree7a63f64443cd919e361d7de747ef31ffa5bd6279 /org.eclipse.jgit/src/org/eclipse/jgit/diff/MyersDiff.java
parent5e8e2179b218ede7d14b69dc5149b0691b5859cf (diff)
downloadjgit-7ac182f4e427e0d5a986b8ca67a56fc22828b1a0.tar.gz
jgit-7ac182f4e427e0d5a986b8ca67a56fc22828b1a0.zip
Enable and fix 'Should be tagged with @Override' warning
Set missingOverrideAnnotation=warning in Eclipse compiler preferences which enables the warning: The method <method> of type <type> should be tagged with @Override since it actually overrides a superclass method Justification for this warning is described in: http://stackoverflow.com/a/94411/381622 Enabling this causes in excess of 1000 warnings across the entire code-base. They are very easy to fix automatically with Eclipse's "Quick Fix" tool. Fix all of them except 2 which cause compilation failure when the project is built with mvn; add TODO comments on those for further investigation. Change-Id: I5772061041fd361fe93137fd8b0ad356e748a29c Signed-off-by: David Pursehouse <david.pursehouse@gmail.com>
Diffstat (limited to 'org.eclipse.jgit/src/org/eclipse/jgit/diff/MyersDiff.java')
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/diff/MyersDiff.java12
1 files changed, 12 insertions, 0 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 9810a6ab2f..e1bda116bf 100644
--- a/org.eclipse.jgit/src/org/eclipse/jgit/diff/MyersDiff.java
+++ b/org.eclipse.jgit/src/org/eclipse/jgit/diff/MyersDiff.java
@@ -460,6 +460,7 @@ if (k < beginK || k > endK)
}
class ForwardEditPaths extends EditPaths {
+ @Override
final int snake(int k, int x) {
for (; x < endA && k + x < endB; x++)
if (!cmp.equals(a, x, b, k + x))
@@ -467,18 +468,22 @@ if (k < beginK || k > endK)
return x;
}
+ @Override
final int getLeft(final int x) {
return x;
}
+ @Override
final int getRight(final int x) {
return x + 1;
}
+ @Override
final boolean isBetter(final int left, final int right) {
return left > right;
}
+ @Override
final void adjustMinMaxK(final int k, final int x) {
if (x >= endA || k + x >= endB) {
if (k > backward.middleK)
@@ -488,6 +493,7 @@ if (k < beginK || k > endK)
}
}
+ @Override
final boolean meets(int d, int k, int x, long snake) {
if (k < backward.beginK || k > backward.endK)
return false;
@@ -502,6 +508,7 @@ if (k < beginK || k > endK)
}
class BackwardEditPaths extends EditPaths {
+ @Override
final int snake(int k, int x) {
for (; x > beginA && k + x > beginB; x--)
if (!cmp.equals(a, x - 1, b, k + x - 1))
@@ -509,18 +516,22 @@ if (k < beginK || k > endK)
return x;
}
+ @Override
final int getLeft(final int x) {
return x - 1;
}
+ @Override
final int getRight(final int x) {
return x;
}
+ @Override
final boolean isBetter(final int left, final int right) {
return left < right;
}
+ @Override
final void adjustMinMaxK(final int k, final int x) {
if (x <= beginA || k + x <= beginB) {
if (k > forward.middleK)
@@ -530,6 +541,7 @@ if (k < beginK || k > endK)
}
}
+ @Override
final boolean meets(int d, int k, int x, long snake) {
if (k < forward.beginK || k > forward.endK)
return false;