]> source.dussan.org Git - gitblit.git/commitdiff
Do not pass null email address to PersonIdent
authorJames Moger <james.moger@gitblit.com>
Sat, 22 Dec 2012 05:27:04 +0000 (00:27 -0500)
committerJames Moger <james.moger@gitblit.com>
Sat, 22 Dec 2012 05:27:04 +0000 (00:27 -0500)
src/com/gitblit/wicket/pages/ForksPage.java
src/com/gitblit/wicket/pages/UserPage.java
src/com/gitblit/wicket/panels/RegistrantPermissionsPanel.java

index 6155f3edc6875cce5ec50c02d0eaf976b41913b0..cc48387845ae8ff9009b66221c0abaf6a62b3a23 100644 (file)
@@ -58,7 +58,7 @@ public class ForksPage extends RepositoryPage {
                                \r
                                if (repository.isPersonalRepository()) {\r
                                        UserModel user = GitBlit.self().getUserModel(repository.projectPath.substring(1));\r
-                                       PersonIdent ident = new PersonIdent(user.getDisplayName(), user.emailAddress);\r
+                                       PersonIdent ident = new PersonIdent(user.getDisplayName(), user.emailAddress == null ? user.getDisplayName() : user.emailAddress);\r
                                        item.add(new GravatarImage("anAvatar", ident, 20));\r
                                        if (pageRepository.equals(repository)) {\r
                                                // do not link to self\r
index d3e93c616fa690705c2e907fe0308b6304dd811a..f4331dd10dabd0b3cb1859736894f31f55096d80 100644 (file)
@@ -97,7 +97,7 @@ public class UserPage extends RootPage {
                email.setRenderBodyOnly(true);\r
                add(email.setVisible(GitBlit.getBoolean(Keys.web.showEmailAddresses, true) && !StringUtils.isEmpty(user.emailAddress)));\r
                \r
-               PersonIdent person = new PersonIdent(user.getDisplayName(), user.emailAddress);\r
+               PersonIdent person = new PersonIdent(user.getDisplayName(), user.emailAddress == null ? user.getDisplayName() : user.emailAddress);\r
                add(new GravatarImage("gravatar", person, 210));\r
                \r
                UserModel sessionUser = GitBlitWebSession.get().getUser();\r
index 689ee571a4097d7ecb76a818e9708849d9a8addf..4156cd190bad11c8a7599fcefa8669039e6d4ad6 100644 (file)
@@ -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);