mirror of
https://github.com/honeymoose/OpenSearch.git
synced 2025-02-17 10:25:15 +00:00
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
|
@Override
|
||||||
public boolean equals(Object obj) {
|
public boolean equals(Object obj) {
|
||||||
if (this == obj)
|
if (this == obj) return true;
|
||||||
return true;
|
if (obj == null) return false;
|
||||||
if (obj == null)
|
if (getClass() != obj.getClass()) return false;
|
||||||
return false;
|
|
||||||
if (getClass() != obj.getClass())
|
|
||||||
return false;
|
|
||||||
Candidate other = (Candidate) obj;
|
Candidate other = (Candidate) obj;
|
||||||
if (term == null) {
|
if (term == null) {
|
||||||
if (other.term != null)
|
if (other.term != null) return false;
|
||||||
return false;
|
} else {
|
||||||
} else if (!term.equals(other.term))
|
if (!term.equals(other.term)) return false;
|
||||||
return false;
|
}
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user