I am clueless here...
1: private static class ForeignKeyConstraint implements Comparable {
2: String tableName;
3: String fkFi
Findbugs is happy with:
public int compareTo(ForeignKeyConstraint o) {
if (this.equals(o)) {
return 0;
} else if (this.tableName.equals(o.tableName)) {
// fkFieldName must be different
return this.fkFieldName.compareTo(o.fkFieldName);
} else {
// tableName must be different
return this.tableName.compareTo(o.tableName);
}
}
@Override
public equals() {
...
}
@Override
public int hashCode() {
...
}