]> source.dussan.org Git - jgit.git/commitdiff
[error prone] fix ReferenceEquality warning in CommitGraphPane#authorFor 18/147318/1
authorMatthias Sohn <matthias.sohn@sap.com>
Thu, 8 Aug 2019 23:13:54 +0000 (01:13 +0200)
committerMatthias Sohn <matthias.sohn@sap.com>
Thu, 8 Aug 2019 23:49:59 +0000 (01:49 +0200)
Change-Id: I4d620ca65f7cd85863fe8b7182b01d262fbe3504
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
org.eclipse.jgit.ui/src/org/eclipse/jgit/awtui/CommitGraphPane.java

index 943a3256fbaf3db8ae054a7d58bf008132d42306..b898cafca0036b64a068bd3c2a73c39240862238 100644 (file)
@@ -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<SwingLane> c) {
-                       if (c != lastCommit) {
+                       if (!References.isSameObject(c, lastCommit)) {
                                lastCommit = c;
                                lastAuthor = c.getAuthorIdent();
                        }