Candidate: use "Objects.equals" instead of "=="
Errorprone raises the following warning: "[ReferenceEquality] Comparison using reference equality instead of value equality". Change-Id: Iacb207ef0625bb987a08406d4e7461e48fade97f
This commit is contained in:
parent
4562e79e23
commit
334852c52f
|
@ -12,6 +12,7 @@
|
||||||
|
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
import java.util.Objects;
|
||||||
|
|
||||||
import org.eclipse.jgit.blame.ReverseWalk.ReverseCommit;
|
import org.eclipse.jgit.blame.ReverseWalk.ReverseCommit;
|
||||||
import org.eclipse.jgit.diff.Edit;
|
import org.eclipse.jgit.diff.Edit;
|
||||||
|
@ -269,7 +270,7 @@ private Region clearRegionList() {
|
||||||
}
|
}
|
||||||
|
|
||||||
boolean canMergeRegions(Candidate other) {
|
boolean canMergeRegions(Candidate other) {
|
||||||
return sourceCommit == other.sourceCommit
|
return Objects.equals(sourceCommit, other.sourceCommit)
|
||||||
&& sourcePath.getPath().equals(other.sourcePath.getPath());
|
&& sourcePath.getPath().equals(other.sourcePath.getPath());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue