提交 bdff4254 编写于 作者: K kohsuke

added error check for null.


git-svn-id: https://hudson.dev.java.net/svn/hudson/trunk/hudson/main@5321 71c3de6d-444a-0410-be80-ed276b4c234a
上级 58ddeb1f
......@@ -78,7 +78,10 @@ public abstract class Actionable extends AbstractModelObject {
public Object getDynamic(String token, StaplerRequest req, StaplerResponse rsp) {
for (Action a : getActions()) {
if(a.getUrlName().equals(token))
String urlName = a.getUrlName();
if(urlName==null)
throw new AssertionError("Action "+a+" returned null from the getUrlName() method");
if(urlName.equals(token))
return a;
}
return null;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册