提交 f965fb83 编写于 作者: K kohsuke

fixed NPEs

git-svn-id: https://hudson.dev.java.net/svn/hudson/trunk/hudson/main@15901 71c3de6d-444a-0410-be80-ed276b4c234a
上级 29697efd
......@@ -1062,13 +1062,16 @@ public class Functions {
*/
public Tag findAncestorTag(Map attributes, String nsUri, String local) {
Tag tag = (Tag) attributes.get("ownerTag");
while(tag!=null) {
if(tag==null) return null;
while(true) {
tag = TagSupport.findAncestorWithClass(tag.getParent(), StaplerDynamicTag.class);
if(tag==null)
return null;
StaplerDynamicTag stag = (StaplerDynamicTag)tag;
if(stag.getLocalName().equals(local) && stag.getNsUri().equals(nsUri))
return tag;
}
return null;
}
private static final Pattern SCHEME = Pattern.compile("[a-z]+://.+");
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册