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:
Shawn Pearce
2013-03-08 16:12:10 -08:00
parent 3f4a022b6b
commit 11c5a835e6
2 changed files with 3 additions and 3 deletions

View File

@@ -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);

View File

@@ -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.
//