提交 fe5c2cfe 编写于 作者: S stephenconnolly

save more casts

git-svn-id: https://hudson.dev.java.net/svn/hudson/trunk/hudson/main@10347 71c3de6d-444a-0410-be80-ed276b4c234a
上级 0467330c
......@@ -576,10 +576,10 @@ public final class Hudson extends View implements ItemGroup<TopLevelItem>, Node,
*
* @return The plugin instances.
*/
public List<Plugin> getPlugins(Class<? extends Plugin> clazz) {
List<Plugin> result = new ArrayList<Plugin>();
public <P extends Plugin> List<P> getPlugins(Class<P> clazz) {
List<P> result = new ArrayList<P>();
for (PluginWrapper w: pluginManager.getPlugins(clazz)) {
result.add(w.getPlugin());
result.add((P)w.getPlugin());
}
return Collections.unmodifiableList(result);
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册