Fix FindBugs and Eclipse warnings in org.eclipse.jgit.ui

Change-Id: Ie6b3ff7d470cc9b7044fd6288cbf86dcc58220eb
This commit is contained in:
Robin Stocker 2010-10-28 16:37:49 +02:00
parent 79ca8a2d19
commit 258f516abe
4 changed files with 13 additions and 3 deletions

View File

@ -1,4 +1,5 @@
source.. = src/
source.. = src/,\
resources/
output.. = bin/
bin.includes = META-INF/,\
.,\

View File

@ -49,6 +49,7 @@
import java.awt.Graphics;
import java.awt.Graphics2D;
import java.awt.Polygon;
import java.io.Serializable;
import org.eclipse.jgit.awtui.CommitGraphPane.GraphCellRender;
import org.eclipse.jgit.awtui.SwingCommitList.SwingLane;
@ -57,11 +58,13 @@
import org.eclipse.jgit.revplot.AbstractPlotRenderer;
import org.eclipse.jgit.revplot.PlotCommit;
final class AWTPlotRenderer extends AbstractPlotRenderer<SwingLane, Color> {
final class AWTPlotRenderer extends AbstractPlotRenderer<SwingLane, Color>
implements Serializable {
private static final long serialVersionUID = 1L;
final GraphCellRender cell;
Graphics2D g;
transient Graphics2D g;
AWTPlotRenderer(final GraphCellRender c) {
cell = c;

View File

@ -222,6 +222,7 @@ static class GraphCellRender extends DefaultTableCellRenderer {
PlotCommit<SwingLane> commit;
@SuppressWarnings("unchecked")
public Component getTableCellRendererComponent(final JTable table,
final Object value, final boolean isSelected,
final boolean hasFocus, final int row, final int column) {

View File

@ -87,5 +87,10 @@ static class SwingLane extends PlotLane {
public boolean equals(Object o) {
return super.equals(o) && color.equals(((SwingLane)o).color);
}
@Override
public int hashCode() {
return super.hashCode() ^ color.hashCode();
}
}
}