diff options
author | James Moger <james.moger@gitblit.com> | 2012-12-22 00:27:04 -0500 |
---|---|---|
committer | James Moger <james.moger@gitblit.com> | 2012-12-22 00:27:04 -0500 |
commit | b461a45f420471f931029898d97464ecc5039f49 (patch) | |
tree | cc7b30d3e2d1c6c80fbd4c85a17d2c93c4c21078 /src | |
parent | d9c567a622447461a6b5e934544882d1746de870 (diff) | |
download | gitblit-b461a45f420471f931029898d97464ecc5039f49.tar.gz gitblit-b461a45f420471f931029898d97464ecc5039f49.zip |
Do not pass null email address to PersonIdent
Diffstat (limited to 'src')
-rw-r--r-- | src/com/gitblit/wicket/pages/ForksPage.java | 2 | ||||
-rw-r--r-- | src/com/gitblit/wicket/pages/UserPage.java | 2 | ||||
-rw-r--r-- | src/com/gitblit/wicket/panels/RegistrantPermissionsPanel.java | 4 |
3 files changed, 4 insertions, 4 deletions
diff --git a/src/com/gitblit/wicket/pages/ForksPage.java b/src/com/gitblit/wicket/pages/ForksPage.java index 6155f3ed..cc483878 100644 --- a/src/com/gitblit/wicket/pages/ForksPage.java +++ b/src/com/gitblit/wicket/pages/ForksPage.java @@ -58,7 +58,7 @@ public class ForksPage extends RepositoryPage { if (repository.isPersonalRepository()) {
UserModel user = GitBlit.self().getUserModel(repository.projectPath.substring(1));
- PersonIdent ident = new PersonIdent(user.getDisplayName(), user.emailAddress);
+ PersonIdent ident = new PersonIdent(user.getDisplayName(), user.emailAddress == null ? user.getDisplayName() : user.emailAddress);
item.add(new GravatarImage("anAvatar", ident, 20));
if (pageRepository.equals(repository)) {
// do not link to self
diff --git a/src/com/gitblit/wicket/pages/UserPage.java b/src/com/gitblit/wicket/pages/UserPage.java index d3e93c61..f4331dd1 100644 --- a/src/com/gitblit/wicket/pages/UserPage.java +++ b/src/com/gitblit/wicket/pages/UserPage.java @@ -97,7 +97,7 @@ public class UserPage extends RootPage { email.setRenderBodyOnly(true);
add(email.setVisible(GitBlit.getBoolean(Keys.web.showEmailAddresses, true) && !StringUtils.isEmpty(user.emailAddress)));
- PersonIdent person = new PersonIdent(user.getDisplayName(), user.emailAddress);
+ PersonIdent person = new PersonIdent(user.getDisplayName(), user.emailAddress == null ? user.getDisplayName() : user.emailAddress);
add(new GravatarImage("gravatar", person, 210));
UserModel sessionUser = GitBlitWebSession.get().getUser();
diff --git a/src/com/gitblit/wicket/panels/RegistrantPermissionsPanel.java b/src/com/gitblit/wicket/panels/RegistrantPermissionsPanel.java index 689ee571..4156cd19 100644 --- a/src/com/gitblit/wicket/panels/RegistrantPermissionsPanel.java +++ b/src/com/gitblit/wicket/panels/RegistrantPermissionsPanel.java @@ -138,10 +138,10 @@ public class RegistrantPermissionsPanel extends BasePanel { } } else if (RegistrantType.USER.equals(entry.registrantType)) { // user - PersonIdent ident = new PersonIdent(entry.registrant, null); + PersonIdent ident = new PersonIdent(entry.registrant, ""); UserModel user = GitBlit.self().getUserModel(entry.registrant); if (user != null) { - ident = new PersonIdent(user.getDisplayName(), user.emailAddress); + ident = new PersonIdent(user.getDisplayName(), user.emailAddress == null ? user.getDisplayName() : user.emailAddress); } Fragment userFragment = new Fragment("registrant", "userRegistrant", RegistrantPermissionsPanel.this); |