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:
parent
fe4d1297df
commit
ba9b72c297
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue