Collections.sort(evolveList, new VersionComparator());
// check for duplicate version numbers
for (int i=0; i<(evolveList.size()-1); i++) {
if (evolveList.get(i).getVersion() == evolveList.get(i+1).getVersion()) {
// we have a duplicate version... exit
throw new InvalidImplementationException(
"Duplicate version number ["+evolveList.get(i).getVersion() +
"] detected on evolve script for "+evolveList.get(i).getClass().getName() +
" and " + evolveList.get(i+1).getClass().getName());
}
}