Merge "AccountManager: Update display name only if it is not null." into stable-2.11

This commit is contained in:
David Pursehouse
2015-11-12 19:03:12 +00:00
committed by Gerrit Code Review

View File

@@ -14,6 +14,7 @@
package com.google.gerrit.server.account;
import com.google.common.base.Strings;
import com.google.gerrit.audit.AuditService;
import com.google.gerrit.common.TimeUtil;
import com.google.gerrit.common.data.AccessSection;
@@ -158,6 +159,7 @@ public class AccountManager {
}
if (!realm.allowsEdit(Account.FieldName.FULL_NAME)
&& !Strings.isNullOrEmpty(who.getDisplayName())
&& !eq(user.getAccount().getFullName(), who.getDisplayName())) {
toUpdate = load(toUpdate, user.getAccountId(), db);
toUpdate.setFullName(who.getDisplayName());