Browse Source

[error prone] fix ReferenceEquality warning in RefUpdate#updateImpl

Change-Id: I6687e1eec6b6ecfe319a598ef8aec1976cee354b
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
stable-5.4
Matthias Sohn 5 years ago
parent
commit
722deaa671
  1. 4
      org.eclipse.jgit/src/org/eclipse/jgit/lib/RefUpdate.java

4
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.RevObject;
import org.eclipse.jgit.revwalk.RevWalk; import org.eclipse.jgit.revwalk.RevWalk;
import org.eclipse.jgit.transport.PushCertificate; import org.eclipse.jgit.transport.PushCertificate;
import org.eclipse.jgit.util.References;
/** /**
* Creates, updates or deletes any reference. * Creates, updates or deletes any reference.
@ -768,7 +769,8 @@ public abstract class RefUpdate {
} }
oldObj = safeParseOld(walk, oldValue); oldObj = safeParseOld(walk, oldValue);
if (newObj == oldObj && !detachingSymbolicRef) { if (References.isSameObject(newObj, oldObj)
&& !detachingSymbolicRef) {
return store.execute(Result.NO_CHANGE); return store.execute(Result.NO_CHANGE);
} }

Loading…
Cancel
Save