bug 6886: fixing the npe which occurs when we try to delete a non existant user. We were trying to return user details for an async job desc assuming the user always existed. Changing that logic to ensure when we don't have such details, we log the apt message

status 6886: resolved fixed
This commit is contained in:
abhishek 2010-11-02 11:18:18 -07:00
parent 566521fbf3
commit 85f78d8cb3
1 changed files with 1 additions and 1 deletions

View File

@ -85,7 +85,7 @@ public class DeleteUserCmd extends BaseAsyncCmd {
@Override
public String getEventDescription() {
User user = ApiDBUtils.findUserById(getId());
return "User " + user.getUsername() + " (id: " + user.getId() + ") and accountId = " + user.getAccountId();
return (user != null ? ("User " + user.getUsername() + " (id: " + user.getId() + ") and accountId = " + user.getAccountId()) : "user delete, but this user does not exist in the system");
}
@Override @SuppressWarnings("unchecked")