Submit: use equals instead of != on Account.Ids

This was resulting in some SUBM records getting overwritten with
slightly-newer records in some cases.

Change-Id: I048a54acbb2f406d699cf5d6c92c872acda95930
This commit is contained in:
Dave Borowitz 2015-01-27 18:28:07 -08:00
parent c3ffacf5c3
commit 49d01b9b08

View File

@ -419,7 +419,8 @@ public class Submit implements RestModifyView<RevisionResource, SubmitInput>,
}
PatchSetApproval submit = ApprovalsUtil.getSubmitter(psId, byKey.values());
if (submit == null || submit.getAccountId() != caller.getAccountId()) {
if (submit == null
|| !submit.getAccountId().equals(caller.getAccountId())) {
submit = new PatchSetApproval(
new PatchSetApproval.Key(
rsrc.getPatchSet().getId(),