Commit e285ca89 authored by Nico Mack's avatar Nico Mack

Minor fix in compareTo method making sure the method distinguishes

positionable of different classes
parent 3622935d
......@@ -225,7 +225,7 @@ public abstract class Marker implements Positionable {
@Override
public int compareTo(Positionable o) {
int comparison = 1;
if (o != null) {
if ((o != null) && (o instanceof Marker)) {
comparison = this.getHandleId().compareTo(o.getHandleId());
}
return comparison;
......
......@@ -609,7 +609,7 @@ public class BaseWidget implements Positionable, Touchable {
@Override
public int compareTo(Positionable o) {
int comparison = 1;
if (o != null) {
if ((o != null) && (o instanceof BaseWidget)) {
comparison = this.getHandleId().compareTo(o.getHandleId());
}
return comparison;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment