mirror of
https://github.com/jenkinsci/jenkins.git
synced 2026-11-10 10:36:21 +00:00
added error check for null.
git-svn-id: https://hudson.dev.java.net/svn/hudson/trunk/hudson/main@5321 71c3de6d-444a-0410-be80-ed276b4c234a
This commit is contained in:
1 parent
58ddeb1fb4
commit
bdff42544c
1 file changed
+4
-1
@@ -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;
|
||||
|
||||
Reference in new issue
Block a user