Widen category value to int in a few locations
Some newer code like PermissionRange works with int rather than short. Widen a few more of the locations that work on category values so we can avoid downcasts. Change-Id: I177be3f9cd1b5bbb072097fbac5529531b913909
This commit is contained in:
@@ -527,7 +527,7 @@ public class ChangeJson {
|
||||
return accountLoader.get(psa.getAccountId());
|
||||
}
|
||||
|
||||
private ApprovalInfo approvalInfo(Account.Id id, short value) {
|
||||
private ApprovalInfo approvalInfo(Account.Id id, int value) {
|
||||
ApprovalInfo ai = new ApprovalInfo(id);
|
||||
ai.value = value;
|
||||
accountLoader.put(ai);
|
||||
@@ -892,7 +892,7 @@ public class ChangeJson {
|
||||
}
|
||||
|
||||
static class ApprovalInfo extends AccountInfo {
|
||||
short value;
|
||||
int value;
|
||||
|
||||
ApprovalInfo(Account.Id id) {
|
||||
super(id);
|
||||
|
@@ -265,7 +265,7 @@ public class ChangeControl {
|
||||
return canRemoveReviewer(approval.getAccountId(), approval.getValue());
|
||||
}
|
||||
|
||||
public boolean canRemoveReviewer(Account.Id reviewer, short value) {
|
||||
public boolean canRemoveReviewer(Account.Id reviewer, int value) {
|
||||
if (getChange().getStatus().isOpen()) {
|
||||
// A user can always remove themselves.
|
||||
//
|
||||
|
Reference in New Issue
Block a user