in src/main/java/com/gerritforge/gerrit/plugins/account/DeleteAccountCommand.java [51:70]
protected void run() throws UnloggedFailure, Failure, Exception {
try {
AccountResource account = accountFactory.create(accountId);
DeleteAccount.Input input = new DeleteAccount.Input();
input.accountName = accountName;
DeleteAccountResponse resp =
(DeleteAccountResponse) deleteAccount.apply(account, input).value();
@SuppressWarnings("resource")
PrintWriter out = resp.deleted ? stdout : stderr;
out.println("Account " + (resp.deleted ? "" : "NOT") + " deleted");
} catch (Exception e) {
stderr.printf("FAILED (%s): %s\n", e.getClass().getName(), e.getMessage());
stderr.flush();
log.error("Unable to remove account %d", accountId, e);
die(e);
}
}