From 66cb2d9db48836afac346e421034a418620e6aab Mon Sep 17 00:00:00 2001 From: Matthias Sohn Date: Fri, 9 Aug 2019 01:13:54 +0200 Subject: [PATCH] [error prone] fix ReferenceEquality warning in CommitGraphPane#authorFor Change-Id: I4d620ca65f7cd85863fe8b7182b01d262fbe3504 Signed-off-by: Matthias Sohn --- .../src/org/eclipse/jgit/awtui/CommitGraphPane.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/org.eclipse.jgit.ui/src/org/eclipse/jgit/awtui/CommitGraphPane.java b/org.eclipse.jgit.ui/src/org/eclipse/jgit/awtui/CommitGraphPane.java index 943a3256f..b898cafca 100644 --- a/org.eclipse.jgit.ui/src/org/eclipse/jgit/awtui/CommitGraphPane.java +++ b/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.revplot.PlotCommit; import org.eclipse.jgit.revplot.PlotCommitList; +import org.eclipse.jgit.util.References; /** * Draws a commit graph in a JTable. @@ -176,7 +177,7 @@ public class CommitGraphPane extends JTable { } PersonIdent authorFor(PlotCommit c) { - if (c != lastCommit) { + if (!References.isSameObject(c, lastCommit)) { lastCommit = c; lastAuthor = c.getAuthorIdent(); }