Browse Source

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

Change-Id: Ie6b3ff7d470cc9b7044fd6288cbf86dcc58220eb
stable-0.10
Robin Stocker 14 years ago
parent
commit
258f516abe
  1. 3
      org.eclipse.jgit.ui/build.properties
  2. 7
      org.eclipse.jgit.ui/src/org/eclipse/jgit/awtui/AWTPlotRenderer.java
  3. 1
      org.eclipse.jgit.ui/src/org/eclipse/jgit/awtui/CommitGraphPane.java
  4. 5
      org.eclipse.jgit.ui/src/org/eclipse/jgit/awtui/SwingCommitList.java

3
org.eclipse.jgit.ui/build.properties

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

7
org.eclipse.jgit.ui/src/org/eclipse/jgit/awtui/AWTPlotRenderer.java

@ -49,6 +49,7 @@ import java.awt.Color;
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.lib.Ref;
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;

1
org.eclipse.jgit.ui/src/org/eclipse/jgit/awtui/CommitGraphPane.java

@ -222,6 +222,7 @@ public class CommitGraphPane extends JTable {
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) {

5
org.eclipse.jgit.ui/src/org/eclipse/jgit/awtui/SwingCommitList.java

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

Loading…
Cancel
Save