summaryrefslogtreecommitdiffstats
path: root/org.eclipse.jgit.ui
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.ui
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.ui')
-rw-r--r--org.eclipse.jgit.ui/.settings/org.eclipse.jdt.core.prefs2
-rw-r--r--org.eclipse.jgit.ui/src/org/eclipse/jgit/awtui/CommitGraphPane.java6
2 files changed, 7 insertions, 1 deletions
diff --git a/org.eclipse.jgit.ui/.settings/org.eclipse.jdt.core.prefs b/org.eclipse.jgit.ui/.settings/org.eclipse.jdt.core.prefs
index 808ec3a2c6..2db1c4f21b 100644
--- a/org.eclipse.jgit.ui/.settings/org.eclipse.jdt.core.prefs
+++ b/org.eclipse.jgit.ui/.settings/org.eclipse.jdt.core.prefs
@@ -56,7 +56,7 @@ org.eclipse.jdt.core.compiler.problem.missingJavadocTags=error
org.eclipse.jdt.core.compiler.problem.missingJavadocTagsMethodTypeParameters=disabled
org.eclipse.jdt.core.compiler.problem.missingJavadocTagsOverriding=disabled
org.eclipse.jdt.core.compiler.problem.missingJavadocTagsVisibility=private
-org.eclipse.jdt.core.compiler.problem.missingOverrideAnnotation=ignore
+org.eclipse.jdt.core.compiler.problem.missingOverrideAnnotation=warning
org.eclipse.jdt.core.compiler.problem.missingOverrideAnnotationForInterfaceMethodImplementation=enabled
org.eclipse.jdt.core.compiler.problem.missingSerialVersion=warning
org.eclipse.jdt.core.compiler.problem.missingSynchronizedOnInheritedMethod=ignore
diff --git a/org.eclipse.jgit.ui/src/org/eclipse/jgit/awtui/CommitGraphPane.java b/org.eclipse.jgit.ui/src/org/eclipse/jgit/awtui/CommitGraphPane.java
index 4d32235e6d..4c8cf53ee9 100644
--- a/org.eclipse.jgit.ui/src/org/eclipse/jgit/awtui/CommitGraphPane.java
+++ b/org.eclipse.jgit.ui/src/org/eclipse/jgit/awtui/CommitGraphPane.java
@@ -146,14 +146,17 @@ public class CommitGraphPane extends JTable {
PersonIdent lastAuthor;
+ @Override
public int getColumnCount() {
return 3;
}
+ @Override
public int getRowCount() {
return allCommits != null ? allCommits.size() : 0;
}
+ @Override
public Object getValueAt(final int rowIndex, final int columnIndex) {
final PlotCommit<SwingLane> c = allCommits.get(rowIndex);
switch (columnIndex) {
@@ -180,6 +183,7 @@ public class CommitGraphPane extends JTable {
static class NameCellRender extends DefaultTableCellRenderer {
private static final long serialVersionUID = 1L;
+ @Override
public Component getTableCellRendererComponent(final JTable table,
final Object value, final boolean isSelected,
final boolean hasFocus, final int row, final int column) {
@@ -201,6 +205,7 @@ public class CommitGraphPane extends JTable {
private final DateFormat fmt = new SimpleDateFormat(
"yyyy-MM-dd HH:mm:ss"); //$NON-NLS-1$
+ @Override
public Component getTableCellRendererComponent(final JTable table,
final Object value, final boolean isSelected,
final boolean hasFocus, final int row, final int column) {
@@ -223,6 +228,7 @@ public class CommitGraphPane extends JTable {
PlotCommit<SwingLane> commit;
+ @Override
@SuppressWarnings("unchecked")
public Component getTableCellRendererComponent(final JTable table,
final Object value, final boolean isSelected,