[error prone] fix ReferenceEquality warning in RevWalk#isMergedInto

Change-Id: Ibef75e2bc76e90f6e29c4cb3ba1c1f6e67009b10
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
This commit is contained in:
Matthias Sohn 2019-08-09 01:06:13 +02:00
parent 722deaa671
commit 70258a9cb2
1 changed files with 5 additions and 2 deletions

View File

@ -72,6 +72,7 @@
import org.eclipse.jgit.lib.Repository;
import org.eclipse.jgit.revwalk.filter.RevFilter;
import org.eclipse.jgit.treewalk.filter.TreeFilter;
import org.eclipse.jgit.util.References;
/**
* Walks a commit graph and produces the matching commits in order.
@ -433,9 +434,11 @@ public boolean isMergedInto(RevCommit base, RevCommit tip)
markStart(tip);
markStart(base);
RevCommit mergeBase;
while ((mergeBase = next()) != null)
if (mergeBase == base)
while ((mergeBase = next()) != null) {
if (References.isSameObject(mergeBase, base)) {
return true;
}
}
return false;
} finally {
filter = oldRF;