aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRobin Stocker2010-10-28 10:37:49 (EDT)
committerRobin Stocker2010-10-28 10:37:49 (EDT)
commit258f516abe545667f50dc74760672fafd94a7533 (patch)
tree2647c2dcaeefa1baa1e6cff49a68ce57bc01f2cc
parent79ca8a2d19fb536c15219a1856aa23b00e9344ff (diff)
downloadjgit-258f516abe545667f50dc74760672fafd94a7533.zip
jgit-258f516abe545667f50dc74760672fafd94a7533.tar.gz
jgit-258f516abe545667f50dc74760672fafd94a7533.tar.bz2
Fix FindBugs and Eclipse warnings in org.eclipse.jgit.uirefs/changes/14/1814/1
-rw-r--r--org.eclipse.jgit.ui/build.properties3
-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
4 files changed, 13 insertions, 3 deletions
diff --git a/org.eclipse.jgit.ui/build.properties b/org.eclipse.jgit.ui/build.properties
index aa1a008..84f1c95 100644
--- a/org.eclipse.jgit.ui/build.properties
+++ b/org.eclipse.jgit.ui/build.properties
@@ -1,4 +1,5 @@
-source.. = src/
+source.. = src/,\
+ resources/
output.. = bin/
bin.includes = META-INF/,\
.,\
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 4a5d460..e699a72 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 13d408f..9c9d1f4 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 b58547a..d8660e5 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();
+ }
}
}