Browse Source

PlotLane: Use identity hashCode and equals

Using the lane position and other data for equals/hashCode is not
useful.

Change-Id: I7af151d8a84544a77a486474c8ac71dd80090c66
Signed-off-by: Konrad Kügler <swamblumat-eclipsebugs@yahoo.de>
tags/v3.4.0.201405051725-m7
Konrad Kügler 10 years ago
parent
commit
e5f7fdcf4f

+ 0
- 9
org.eclipse.jgit.ui/src/org/eclipse/jgit/awtui/SwingCommitList.java View File

@@ -83,14 +83,5 @@ class SwingCommitList extends PlotCommitList<SwingCommitList.SwingLane> {

static class SwingLane extends PlotLane {
Color color;
@Override
public boolean equals(Object o) {
return super.equals(o) && color.equals(((SwingLane)o).color);
}

@Override
public int hashCode() {
return super.hashCode() ^ color.hashCode();
}
}
}

+ 0
- 1
org.eclipse.jgit/src/org/eclipse/jgit/revplot/PlotCommitList.java View File

@@ -236,7 +236,6 @@ public class PlotCommitList<L extends PlotLane> extends
if (newPos == -1)
newPos = positionsAllocated++;
freePositions.add(Integer.valueOf(commit.lane.getPosition()));
activeLanes.remove(commit.lane);
commit.lane.position = newPos;
activeLanes.add(commit.lane);
}

+ 0
- 8
org.eclipse.jgit/src/org/eclipse/jgit/revplot/PlotLane.java View File

@@ -63,12 +63,4 @@ public class PlotLane implements Serializable {
public int getPosition() {
return position;
}

public int hashCode() {
return position;
}

public boolean equals(final Object o) {
return o == this;
}
}

Loading…
Cancel
Save