Fix compile errors caused by MethodNotAllowedException

Change-Id: I18ae7b5c13a10f13bfce6afbe3094280f6c5c386
This commit is contained in:
Shawn Pearce
2013-03-07 09:04:23 -08:00
parent 4abbb1a8ad
commit 2ba90497bc
10 changed files with 25 additions and 14 deletions

View File

@@ -16,6 +16,7 @@ package com.google.gerrit.sshd.commands;
import com.google.common.base.Objects;
import com.google.common.base.Strings;
import com.google.gerrit.extensions.restapi.MethodNotAllowedException;
import com.google.gerrit.extensions.restapi.ResourceNotFoundException;
import com.google.gerrit.extensions.restapi.Url;
import com.google.gerrit.reviewdb.client.AccountGroup;
@@ -81,7 +82,8 @@ public class ListGroupsCommand extends BaseCommand {
identifiedUser, userFactory, accountGetGroups, json);
}
void display(final PrintWriter out) throws ResourceNotFoundException, OrmException {
void display(final PrintWriter out) throws ResourceNotFoundException,
MethodNotAllowedException, OrmException {
final ColumnFormatter formatter = new ColumnFormatter(out, '\t');
for (final GroupInfo info : get()) {
formatter.addColumn(Objects.firstNonNull(info.name, "n/a"));