提交 e5f049d0 编写于 作者: C christ66

When userId is null then return anonymous, otherwise try to obtain the

display name.
上级 125dbfd1
......@@ -368,8 +368,7 @@ public abstract class Cause {
@Exported(visibility = 3)
public String getUserName() {
User userName = User.get(userId);
return (userName == null) ? "anonymous" : userName.getDisplayName();
return userId == null ? "anonymous" : User.get(userId).getDisplayName();
}
@Override
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册