Prevent account's full name from being set to empty string
If the full name is an empty string, set it to null instead. Change-Id: Ic1a0685c764e47349d713e21f4f0ff6da784d49b
This commit is contained in:
@@ -169,7 +169,11 @@ public final class Account {
|
|||||||
|
|
||||||
/** Set the full name of the user ("Given-name Surname" style). */
|
/** Set the full name of the user ("Given-name Surname" style). */
|
||||||
public void setFullName(final String name) {
|
public void setFullName(final String name) {
|
||||||
fullName = name != null ? name.trim() : null;
|
if (name != null && !name.trim().isEmpty()) {
|
||||||
|
fullName = name.trim();
|
||||||
|
} else {
|
||||||
|
fullName = null;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/** Email address the user prefers to be contacted through. */
|
/** Email address the user prefers to be contacted through. */
|
||||||
|
Reference in New Issue
Block a user