提交 4cfc73b5 编写于 作者: O Oleg Nenashev

FindBugs: Violation of Descriptor newInstance() contract in...

FindBugs: Violation of Descriptor newInstance() contract in hudson.scm.RepositoryBrowsers#createInstance deprecated method
上级 f89cbeb3
......@@ -74,7 +74,10 @@ public class RepositoryBrowsers {
if(value==null || value.equals("auto"))
return null;
return type.cast(list.get(Integer.parseInt(value)).newInstance(req,null/*TODO*/));
// TODO: There was a TODO in the original code, which presumes passing something meaningful to the newInstance() JSON param
// Now we just pass empty JSON in order to make the code compliant with the defined interface
final JSONObject emptyJSON = new JSONObject();
return type.cast(list.get(Integer.parseInt(value)).newInstance(req, emptyJSON));
}
/**
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册