提交 1d408ae3 编写于 作者: K kohsuke

fixed a NPE.


git-svn-id: https://hudson.dev.java.net/svn/hudson/trunk/hudson/main@1282 71c3de6d-444a-0410-be80-ed276b4c234a
上级 637bebd9
......@@ -45,7 +45,7 @@ import java.util.regex.Pattern;
* @author Kohsuke Kawaguchi
*/
public class Mailer extends Publisher {
private static final Logger LOGGER = Logger.getLogger(Mailer.class.getName());
private static final int MAX_LOG_LINES = 250;
......@@ -258,8 +258,11 @@ public class Mailer extends Publisher {
Set<User> users = new HashSet<User>();
for (Entry change : build.getChangeSet()) {
User a = change.getAuthor();
if(users.add(a))
rcp.add(new InternetAddress(a.getProperty(UserProperty.class).getAddress()));
if(users.add(a)) {
String adrs = a.getProperty(UserProperty.class).getAddress();
if(adrs!=null)
rcp.add(new InternetAddress(adrs));
}
}
}
msg.setRecipients(Message.RecipientType.TO, rcp.toArray(new InternetAddress[rcp.size()]));
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册