PutHttpPassword: Squash apply methods

There is no need to have a second apply method that is not called
from anywhere.

Change-Id: I3773af3b5ef236dc5b8546749f23d4987482b503
This commit is contained in:
David Pursehouse
2019-05-10 12:15:45 +09:00
parent d95b1f1d5e
commit 481a6e5bb9

View File

@@ -97,12 +97,8 @@ public class PutHttpPassword implements RestModifyView<AccountResource, Input> {
permissionBackend.user(self).check(GlobalPermission.ADMINISTRATE_SERVER);
newPassword = input.httpPassword;
}
return apply(rsrc.getUser(), newPassword);
}
public Response<String> apply(IdentifiedUser user, String newPassword)
throws ResourceNotFoundException, ResourceConflictException, OrmException, IOException,
ConfigInvalidException {
IdentifiedUser user = rsrc.getUser();
if (user.getUserName() == null) {
throw new ResourceConflictException("username must be set");
}