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>
This commit is contained in:
Konrad Kügler 2014-04-27 20:35:14 +02:00 committed by Matthias Sohn
parent 8b65a4e6c6
commit e5f7fdcf4f
3 changed files with 0 additions and 18 deletions

View File

@ -83,14 +83,5 @@ protected void recycleLane(final SwingLane lane) {
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();
}
}
}

View File

@ -236,7 +236,6 @@ private void handleBlockedLanes(final int index,
if (newPos == -1)
newPos = positionsAllocated++;
freePositions.add(Integer.valueOf(commit.lane.getPosition()));
activeLanes.remove(commit.lane);
commit.lane.position = newPos;
activeLanes.add(commit.lane);
}

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;
}
}