Browse Source

[error prone] fix ReferenceEquality warning in CommitGraphPane#authorFor

Change-Id: I4d620ca65f7cd85863fe8b7182b01d262fbe3504
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
stable-5.4
Matthias Sohn 5 years ago
parent
commit
66cb2d9db4
  1. 3
      org.eclipse.jgit.ui/src/org/eclipse/jgit/awtui/CommitGraphPane.java

3
org.eclipse.jgit.ui/src/org/eclipse/jgit/awtui/CommitGraphPane.java

@ -64,6 +64,7 @@ import org.eclipse.jgit.awtui.SwingCommitList.SwingLane;
import org.eclipse.jgit.lib.PersonIdent; import org.eclipse.jgit.lib.PersonIdent;
import org.eclipse.jgit.revplot.PlotCommit; import org.eclipse.jgit.revplot.PlotCommit;
import org.eclipse.jgit.revplot.PlotCommitList; import org.eclipse.jgit.revplot.PlotCommitList;
import org.eclipse.jgit.util.References;
/** /**
* Draws a commit graph in a JTable. * Draws a commit graph in a JTable.
@ -176,7 +177,7 @@ public class CommitGraphPane extends JTable {
} }
PersonIdent authorFor(PlotCommit<SwingLane> c) { PersonIdent authorFor(PlotCommit<SwingLane> c) {
if (c != lastCommit) { if (!References.isSameObject(c, lastCommit)) {
lastCommit = c; lastCommit = c;
lastAuthor = c.getAuthorIdent(); lastAuthor = c.getAuthorIdent();
} }

Loading…
Cancel
Save