Fix missin throws (ConfigInvalid) Change-Id: I70c2224285e106f38a8fef199aaf91990b0ec057
diff --git a/src/main/java/com/googlesource/gerrit/plugins/serviceuser/PutEmail.java b/src/main/java/com/googlesource/gerrit/plugins/serviceuser/PutEmail.java index 270850b..8a9389e 100644 --- a/src/main/java/com/googlesource/gerrit/plugins/serviceuser/PutEmail.java +++ b/src/main/java/com/googlesource/gerrit/plugins/serviceuser/PutEmail.java
@@ -37,6 +37,8 @@ import com.googlesource.gerrit.plugins.serviceuser.PutEmail.Input; +import org.eclipse.jgit.errors.ConfigInvalidException; + import java.io.IOException; @Singleton @@ -72,7 +74,7 @@ public Response<?> apply(ServiceUserResource rsrc, Input input) throws AuthException, ResourceNotFoundException, ResourceConflictException, MethodNotAllowedException, OrmException, - BadRequestException, EmailException, IOException { + BadRequestException, ConfigInvalidException, EmailException, IOException { Boolean emailAllowed = getConfig.get().apply(new ConfigResource()).allowEmail; if ((emailAllowed == null || !emailAllowed) && !self.get().getCapabilities().canAdministrateServer()) {
diff --git a/src/main/java/com/googlesource/gerrit/plugins/serviceuser/PutHttpPassword.java b/src/main/java/com/googlesource/gerrit/plugins/serviceuser/PutHttpPassword.java index 847e689..d5f2883 100644 --- a/src/main/java/com/googlesource/gerrit/plugins/serviceuser/PutHttpPassword.java +++ b/src/main/java/com/googlesource/gerrit/plugins/serviceuser/PutHttpPassword.java
@@ -30,6 +30,8 @@ import org.apache.commons.codec.binary.Base64; +import org.eclipse.jgit.errors.ConfigInvalidException; + import java.io.IOException; import java.security.NoSuchAlgorithmException; @@ -68,7 +70,7 @@ @Override public Response<String> apply(ServiceUserResource rsrc, Input input) - throws AuthException, ResourceConflictException, + throws AuthException, ResourceConflictException, ConfigInvalidException, ResourceNotFoundException, OrmException, IOException { if (input == null) { input = new Input();