SetPreferences/GetPreferences: Remove unused exception declarations
Change-Id: I1dbe334dc015fc7596f9dd505b740be581b5e780
This commit is contained in:
committed by
David Ostrovsky
parent
e6eb52771b
commit
499246e683
@@ -16,19 +16,13 @@ package com.google.gerrit.server.account;
|
||||
|
||||
import com.google.gerrit.extensions.client.GeneralPreferencesInfo;
|
||||
import com.google.gerrit.extensions.restapi.AuthException;
|
||||
import com.google.gerrit.extensions.restapi.ResourceNotFoundException;
|
||||
import com.google.gerrit.extensions.restapi.RestReadView;
|
||||
import com.google.gerrit.reviewdb.client.Account;
|
||||
import com.google.gerrit.server.CurrentUser;
|
||||
import com.google.gwtorm.server.OrmException;
|
||||
import com.google.inject.Inject;
|
||||
import com.google.inject.Provider;
|
||||
import com.google.inject.Singleton;
|
||||
|
||||
import org.eclipse.jgit.errors.ConfigInvalidException;
|
||||
|
||||
import java.io.IOException;
|
||||
|
||||
@Singleton
|
||||
public class GetPreferences implements RestReadView<AccountResource> {
|
||||
private final Provider<CurrentUser> self;
|
||||
@@ -43,8 +37,7 @@ public class GetPreferences implements RestReadView<AccountResource> {
|
||||
|
||||
@Override
|
||||
public GeneralPreferencesInfo apply(AccountResource rsrc)
|
||||
throws AuthException, ResourceNotFoundException, OrmException,
|
||||
IOException, ConfigInvalidException {
|
||||
throws AuthException {
|
||||
if (self.get() != rsrc.getUser()
|
||||
&& !self.get().getCapabilities().canModifyAccount()) {
|
||||
throw new AuthException("requires Modify Account capability");
|
||||
|
||||
@@ -29,14 +29,12 @@ import com.google.gerrit.extensions.config.DownloadScheme;
|
||||
import com.google.gerrit.extensions.registration.DynamicMap;
|
||||
import com.google.gerrit.extensions.restapi.AuthException;
|
||||
import com.google.gerrit.extensions.restapi.BadRequestException;
|
||||
import com.google.gerrit.extensions.restapi.ResourceNotFoundException;
|
||||
import com.google.gerrit.extensions.restapi.RestModifyView;
|
||||
import com.google.gerrit.reviewdb.client.Account;
|
||||
import com.google.gerrit.server.CurrentUser;
|
||||
import com.google.gerrit.server.config.AllUsersName;
|
||||
import com.google.gerrit.server.git.MetaDataUpdate;
|
||||
import com.google.gerrit.server.git.UserConfigSections;
|
||||
import com.google.gwtorm.server.OrmException;
|
||||
import com.google.inject.Inject;
|
||||
import com.google.inject.Provider;
|
||||
import com.google.inject.Singleton;
|
||||
@@ -78,8 +76,8 @@ public class SetPreferences implements
|
||||
@Override
|
||||
public GeneralPreferencesInfo apply(AccountResource rsrc,
|
||||
GeneralPreferencesInfo i)
|
||||
throws AuthException, ResourceNotFoundException, BadRequestException,
|
||||
OrmException, IOException, ConfigInvalidException {
|
||||
throws AuthException, BadRequestException, IOException,
|
||||
ConfigInvalidException {
|
||||
if (self.get() != rsrc.getUser()
|
||||
&& !self.get().getCapabilities().canModifyAccount()) {
|
||||
throw new AuthException("requires Modify Account capability");
|
||||
|
||||
Reference in New Issue
Block a user