mirror of
https://github.com/jenkinsci/jenkins.git
synced 2026-11-10 02:26:18 +00:00
fixed NPEs
git-svn-id: https://hudson.dev.java.net/svn/hudson/trunk/hudson/main@15901 71c3de6d-444a-0410-be80-ed276b4c234a
This commit is contained in:
1 parent
29697efdfa
commit
f965fb83cf
1 file changed
+5
-2
@@ -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]+://.+");
|
||||
|
||||
Reference in new issue
Block a user