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:
@@ -102,7 +102,7 @@ public class EventUtil {
|
||||
AccountInfo accountInfo = new AccountInfo(account.getId().get());
|
||||
accountInfo.email = account.getPreferredEmail();
|
||||
accountInfo.name = account.getFullName();
|
||||
accountInfo.username = accountState.getUserName();
|
||||
accountInfo.username = accountState.getUserName().orElse(null);
|
||||
return accountInfo;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user