提交 d487d1f0 编写于 作者: K Kohsuke Kawaguchi

[FIXED JENKINS-21875]

User.current() can return null, so this better check for null
上级 20ea8d10
......@@ -61,6 +61,9 @@ Upcoming changes</a>
<li class=bug>
Fixed a slow down in resource loading caused by fix to JENKINS-18677.
(<a href="https://issues.jenkins-ci.org/browse/JENKINS-21579">issue 21579</a>)
<li class=bug>
Fixed NPE in <tt>UserCause</tt>
(<a href="https://issues.jenkins-ci.org/browse/JENKINS-21875">issue 21875</a>)
</ul>
</div><!--=TRUNK-END=-->
......
......@@ -109,7 +109,7 @@ public abstract class OfflineCause {
public UserCause(User user, String message) {
super(hudson.slaves.Messages._SlaveComputer_DisconnectedBy(
user.getId(),
user!=null ? user.getId() : Jenkins.ANONYMOUS.getName(),
message != null ? " : " + message : ""
));
this.user = user;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册