From 7ac182f4e427e0d5a986b8ca67a56fc22828b1a0 Mon Sep 17 00:00:00 2001 From: David Pursehouse Date: Mon, 16 Jan 2017 14:39:32 +0900 Subject: Enable and fix 'Should be tagged with @Override' warning Set missingOverrideAnnotation=warning in Eclipse compiler preferences which enables the warning: The method of 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 --- .../src/org/eclipse/jgit/lib/CLIRepositoryTestCase.java | 1 + org.eclipse.jgit.pgm.test/src/org/eclipse/jgit/pgm/CLIGitCommand.java | 1 + 2 files changed, 2 insertions(+) (limited to 'org.eclipse.jgit.pgm.test/src/org') diff --git a/org.eclipse.jgit.pgm.test/src/org/eclipse/jgit/lib/CLIRepositoryTestCase.java b/org.eclipse.jgit.pgm.test/src/org/eclipse/jgit/lib/CLIRepositoryTestCase.java index b675d3c31d..0bc2a3f8db 100644 --- a/org.eclipse.jgit.pgm.test/src/org/eclipse/jgit/lib/CLIRepositoryTestCase.java +++ b/org.eclipse.jgit.pgm.test/src/org/eclipse/jgit/lib/CLIRepositoryTestCase.java @@ -127,6 +127,7 @@ public class CLIRepositoryTestCase extends LocalDiskRepositoryTestCase { return JGitTestUtil.writeTrashFile(db, name, data); } + @Override protected String read(final File file) throws IOException { return JGitTestUtil.read(file); } diff --git a/org.eclipse.jgit.pgm.test/src/org/eclipse/jgit/pgm/CLIGitCommand.java b/org.eclipse.jgit.pgm.test/src/org/eclipse/jgit/pgm/CLIGitCommand.java index b08bc8afe7..2d0c8974eb 100644 --- a/org.eclipse.jgit.pgm.test/src/org/eclipse/jgit/pgm/CLIGitCommand.java +++ b/org.eclipse.jgit.pgm.test/src/org/eclipse/jgit/pgm/CLIGitCommand.java @@ -156,6 +156,7 @@ public class CLIGitCommand extends Main { return new PrintWriter(result.err); } + @Override void init(final TextBuiltin cmd) throws IOException { cmd.outs = result.out; cmd.errs = result.err; -- cgit v1.2.3