summaryrefslogtreecommitdiffstats
path: root/org.eclipse.jgit.ui/src/org
diff options
context:
space:
mode:
authorRobin Stocker <robin@nibor.org>2010-10-28 16:37:49 +0200
committerRobin Stocker <robin@nibor.org>2010-10-28 16:37:49 +0200
commit258f516abe545667f50dc74760672fafd94a7533 (patch)
tree2647c2dcaeefa1baa1e6cff49a68ce57bc01f2cc /org.eclipse.jgit.ui/src/org
parent79ca8a2d19fb536c15219a1856aa23b00e9344ff (diff)
downloadjgit-258f516abe545667f50dc74760672fafd94a7533.tar.gz
jgit-258f516abe545667f50dc74760672fafd94a7533.zip
Fix FindBugs and Eclipse warnings in org.eclipse.jgit.ui
Change-Id: Ie6b3ff7d470cc9b7044fd6288cbf86dcc58220eb
Diffstat (limited to 'org.eclipse.jgit.ui/src/org')
-rw-r--r--org.eclipse.jgit.ui/src/org/eclipse/jgit/awtui/AWTPlotRenderer.java7
-rw-r--r--org.eclipse.jgit.ui/src/org/eclipse/jgit/awtui/CommitGraphPane.java1
-rw-r--r--org.eclipse.jgit.ui/src/org/eclipse/jgit/awtui/SwingCommitList.java5
3 files changed, 11 insertions, 2 deletions
diff --git a/org.eclipse.jgit.ui/src/org/eclipse/jgit/awtui/AWTPlotRenderer.java b/org.eclipse.jgit.ui/src/org/eclipse/jgit/awtui/AWTPlotRenderer.java
index 4a5d4603ca..e699a72cfa 100644
--- a/org.eclipse.jgit.ui/src/org/eclipse/jgit/awtui/AWTPlotRenderer.java
+++ b/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;
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 13d408f19f..9c9d1f4a5c 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
@@ -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) {
diff --git a/org.eclipse.jgit.ui/src/org/eclipse/jgit/awtui/SwingCommitList.java b/org.eclipse.jgit.ui/src/org/eclipse/jgit/awtui/SwingCommitList.java
index b58547a9e1..d8660e5ed6 100644
--- a/org.eclipse.jgit.ui/src/org/eclipse/jgit/awtui/SwingCommitList.java
+++ b/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();
+ }
}
}