提交 3607cc3a 编写于 作者: K kohsuke

[FIXED HUDSON-2527] Fixed NPE and instead deal with this gracefully.

Improved doc to call out for this error-prone definition of semantics.

git-svn-id: https://hudson.dev.java.net/svn/hudson/trunk/hudson/main@12850 71c3de6d-444a-0410-be80-ed276b4c234a
上级 342c21f7
......@@ -866,6 +866,7 @@ public class Functions {
*/
public static String getActionUrl(String itUrl,Action action) {
String urlName = action.getUrlName();
if(urlName==null) return null; // to avoid NPE and fail to render the whole page
if(SCHEME.matcher(urlName).matches())
return urlName; // absolute URL
......
......@@ -71,7 +71,8 @@ public interface Action extends ModelObject {
* which is useful for directly connecting to external systems.
*
* @return
* null if this action object doesn't need to be bound to web.
* null if this action object doesn't need to be bound to web
* (when you do that, be sure to also return null from {@link #getIconFileName()}.
*/
String getUrlName();
}
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册