AccountState#getUserName: Return Optional<String> instead of nullable String
This makes it more explicit that callers must handle the case where the returned username is absent. Change-Id: I01d2e3fd32726db6175c157bc71a551d35b4803f Signed-off-by: Edwin Kempin <ekempin@google.com>
This commit is contained in:
@@ -590,7 +590,7 @@ public class EventFactory {
|
||||
AccountAttribute who = new AccountAttribute();
|
||||
who.name = accountState.getAccount().getFullName();
|
||||
who.email = accountState.getAccount().getPreferredEmail();
|
||||
who.username = accountState.getUserName();
|
||||
who.username = accountState.getUserName().orElse(null);
|
||||
return who;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user