提交 23c7b05f 编写于 作者: K kohsuke

simplified.

git-svn-id: https://hudson.dev.java.net/svn/hudson/trunk/hudson/main@30332 71c3de6d-444a-0410-be80-ed276b4c234a
上级 4af6899f
......@@ -192,12 +192,7 @@ public abstract class Descriptor<T extends Describable<T>> implements Saveable {
* Returns {@link Descriptor} whose 'clazz' is the same as {@link #getItemType() the item type}.
*/
public Descriptor getItemTypeDescriptor() {
Class itemType = getItemType();
for( Descriptor d : Hudson.getInstance().getExtensionList(Descriptor.class) )
if(d.clazz==itemType)
return d;
return null;
return Hudson.getInstance().getDescriptor(getItemType());
}
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册