summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMatthias Sohn <matthias.sohn@sap.com>2019-08-09 01:04:24 +0200
committerMatthias Sohn <matthias.sohn@sap.com>2019-08-09 01:49:59 +0200
commit722deaa6713fcf66d9c0e0bbc4a902547f4c7e4c (patch)
tree2332bd4f2560b0e0fd3b45db8ca48990d1e1edcd
parentbac0e8fd8d7b8a5b70009346d3ccbd5f2a3a2a5b (diff)
downloadjgit-722deaa6713fcf66d9c0e0bbc4a902547f4c7e4c.tar.gz
jgit-722deaa6713fcf66d9c0e0bbc4a902547f4c7e4c.zip
[error prone] fix ReferenceEquality warning in RefUpdate#updateImpl
Change-Id: I6687e1eec6b6ecfe319a598ef8aec1976cee354b Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/lib/RefUpdate.java4
1 files changed, 3 insertions, 1 deletions
diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/lib/RefUpdate.java b/org.eclipse.jgit/src/org/eclipse/jgit/lib/RefUpdate.java
index 33c7070331..eca15c032a 100644
--- a/org.eclipse.jgit/src/org/eclipse/jgit/lib/RefUpdate.java
+++ b/org.eclipse.jgit/src/org/eclipse/jgit/lib/RefUpdate.java
@@ -53,6 +53,7 @@ import org.eclipse.jgit.revwalk.RevCommit;
import org.eclipse.jgit.revwalk.RevObject;
import org.eclipse.jgit.revwalk.RevWalk;
import org.eclipse.jgit.transport.PushCertificate;
+import org.eclipse.jgit.util.References;
/**
* Creates, updates or deletes any reference.
@@ -768,7 +769,8 @@ public abstract class RefUpdate {
}
oldObj = safeParseOld(walk, oldValue);
- if (newObj == oldObj && !detachingSymbolicRef) {
+ if (References.isSameObject(newObj, oldObj)
+ && !detachingSymbolicRef) {
return store.execute(Result.NO_CHANGE);
}