public int compareTo(Object o) {
int search = ((AlbumModel)o).getSearchResult();
if (search-this.searchResult==0) {
return ((AlbumModel)o).dateModified-this.dateModified;
} else {
return search-this.searchResult;
}
}
I use this code on JDK6 and it works perfectly. But when I try to use the code on JDK 7(++), it throws an Illegal argument exception.