public int compare(Object o1, Object o2) {
return compare((ModuleRevisionId) o1, (ModuleRevisionId) o2);
}
public int compare(ModuleRevisionId o1, ModuleRevisionId o2) {
Version v1;
Version v2;
try {
v1 = new Version(o1.getRevision());
v2 = new Version(o2.getRevision());
} catch (ParseException e) {
throw new RuntimeException("Uncomparable versions:" + o1.getRevision() + " and "
+ o2.getRevision() + " (" + e.getMessage() + ")");
}
return v1.compareTo(v2);