Reformat DirectCandidateGenerator's equals method

We'd like to have checkstyle complain about if statements without braces
for all non-single-line if statements.
This commit is contained in:
Nik Everett 2016-04-12 16:43:09 -04:00
parent fe4d1297df
commit ba9b72c297
1 changed files with 7 additions and 10 deletions

View File

@ -254,18 +254,15 @@ final class DirectCandidateGenerator extends CandidateGenerator {
@Override
public boolean equals(Object obj) {
if (this == obj)
return true;
if (obj == null)
return false;
if (getClass() != obj.getClass())
return false;
if (this == obj) return true;
if (obj == null) return false;
if (getClass() != obj.getClass()) return false;
Candidate other = (Candidate) obj;
if (term == null) {
if (other.term != null)
return false;
} else if (!term.equals(other.term))
return false;
if (other.term != null) return false;
} else {
if (!term.equals(other.term)) return false;
}
return true;
}