summaryrefslogtreecommitdiffstats
path: root/gerrit-httpd
diff options
context:
space:
mode:
authorDavid Pursehouse <david.pursehouse@sonymobile.com>2013-04-26 10:59:24 +0900
committerDavid Pursehouse <david.pursehouse@sonymobile.com>2013-04-26 11:09:32 +0900
commitf3619bc4527fe1c3a2753a7cbbef05f41b4e4a48 (patch)
tree2dacfe28d98ed75fb989efc7ba0071863a693a55 /gerrit-httpd
parent6d0c32d0be15fac17ce5aad0469e839c45e5a146 (diff)
Cannot Become Any Account for account whose full name is empty string
If an account's full name is an empty string, it will not be selectable on the development Become Any Account login screen. Fix the account list population to also check if the full name is empty before using it. Thus, an account whose full name is empty will be listed with either the preferred email address or ID. Change-Id: Ica7b42def9c3816c233c03d1e2ca4b6889513fa9
Diffstat (limited to 'gerrit-httpd')
-rw-r--r--gerrit-httpd/src/main/java/com/google/gerrit/httpd/auth/become/BecomeAnyAccountLoginServlet.java2
1 files changed, 1 insertions, 1 deletions
diff --git a/gerrit-httpd/src/main/java/com/google/gerrit/httpd/auth/become/BecomeAnyAccountLoginServlet.java b/gerrit-httpd/src/main/java/com/google/gerrit/httpd/auth/become/BecomeAnyAccountLoginServlet.java
index 932f8f0b4b..28e361cd4d 100644
--- a/gerrit-httpd/src/main/java/com/google/gerrit/httpd/auth/become/BecomeAnyAccountLoginServlet.java
+++ b/gerrit-httpd/src/main/java/com/google/gerrit/httpd/auth/become/BecomeAnyAccountLoginServlet.java
@@ -173,7 +173,7 @@ class BecomeAnyAccountLoginServlet extends HttpServlet {
String displayName;
if (a.getUserName() != null) {
displayName = a.getUserName();
- } else if (a.getFullName() != null) {
+ } else if (a.getFullName() != null && !a.getFullName().isEmpty()) {
displayName = a.getFullName();
} else if (a.getPreferredEmail() != null) {
displayName = a.getPreferredEmail();