fix support for master branch
Change-Id: Iada84ddd8e6effc3208fdb9d121ddfc39748d46d
diff --git a/src/main/java/com/googlesource/gerrit/plugins/avatars/external/ExternalUrlAvatarProvider.java b/src/main/java/com/googlesource/gerrit/plugins/avatars/external/ExternalUrlAvatarProvider.java
index bf7143c..b3c9062 100644
--- a/src/main/java/com/googlesource/gerrit/plugins/avatars/external/ExternalUrlAvatarProvider.java
+++ b/src/main/java/com/googlesource/gerrit/plugins/avatars/external/ExternalUrlAvatarProvider.java
@@ -81,7 +81,7 @@
}
StringBuilder avatarUrl = new StringBuilder();
String userReplacedAvatarURL = replaceInUrl(USER_PLACEHOLDER,
- externalAvatarUrl, forUser.getUserName());
+ externalAvatarUrl, forUser.getUserName().get());
avatarUrl.append(replaceInUrl(EMAIL_PLACEHOLDER, userReplacedAvatarURL,
forUser.getAccount().getPreferredEmail()));
if (imageSize > 0 && sizeParameter != null) {
@@ -99,7 +99,7 @@
@Override
public String getChangeAvatarUrl(IdentifiedUser forUser) {
String userReplacedAvatarChangeURL = replaceInUrl(USER_PLACEHOLDER,
- avatarChangeUrl, forUser.getUserName());
+ avatarChangeUrl, forUser.getUserName().get());
return replaceInUrl(EMAIL_PLACEHOLDER, userReplacedAvatarChangeURL,
forUser.getAccount().getPreferredEmail());
}