Merge branch 'stable-2.16' into stable-3.0
* stable-2.16: Fix to not throw NPE while accessing draft refs EqualsLabelPredicate: Fix bug that prevents matching owner votes Change-Id: Ic9ff1d1b7b2829fa95b2a05963ee4e7fd1660f6a
This commit is contained in:
@@ -973,7 +973,7 @@ public class ChangeData {
|
|||||||
}
|
}
|
||||||
|
|
||||||
draftsByUser = new HashMap<>();
|
draftsByUser = new HashMap<>();
|
||||||
for (Ref ref : commentsUtil.getDraftRefs(notes.getChangeId())) {
|
for (Ref ref : commentsUtil.getDraftRefs(notes().getChangeId())) {
|
||||||
Account.Id account = Account.Id.fromRefSuffix(ref.getName());
|
Account.Id account = Account.Id.fromRefSuffix(ref.getName());
|
||||||
if (account != null
|
if (account != null
|
||||||
// Double-check that any drafts exist for this user after
|
// Double-check that any drafts exist for this user after
|
||||||
|
@@ -107,7 +107,15 @@ public class EqualsLabelPredicate extends ChangeIndexPredicate {
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (account != null && !account.equals(approver)) {
|
if (account != null
|
||||||
|
&& !account.equals(approver)
|
||||||
|
&& !account.equals(ChangeQueryBuilder.OWNER_ACCOUNT_ID)) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (account != null
|
||||||
|
&& account.equals(ChangeQueryBuilder.OWNER_ACCOUNT_ID)
|
||||||
|
&& !cd.change().getOwner().equals(approver)) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user