Commit 7852ea8b authored by yannick legoc's avatar yannick legoc
Browse files

corrected bug with SpyPropertyDescriptorComparator

parent e650f3ee
......@@ -110,13 +110,11 @@ public class PropertyDatabase {
Set<SpyPropertyDescriptor> set = new TreeSet<SpyPropertyDescriptor>(new SpyPropertyDescriptorComparator());
spyPropertiesByServant.put(servantId, set);
}
spyPropertiesByServant.get(servantId).add(descriptor);
// if (descriptor.getSetpointID() != 0) {
// System.out.println("spy property for servant " + servantId);
// System.out.println(descriptor);
// }
// System.out.println("spy property for servant " + servantId);
// System.out.println(descriptor);
}
/**
......
......@@ -28,9 +28,9 @@ public class SpyPropertyDescriptorComparator implements Comparator<SpyPropertyDe
// first comparing set point ID before actual ID
if (d1.getSetpointID() == d2.getSetpointID()) {
return Integer.compare(d1.getActualID(), d1.getActualID());
return Integer.compare(d1.getActualID(), d2.getActualID());
}
return Integer.compare(d1.getSetpointID(), d2.getSetpointID());
}
......
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