提交 33c98f5d 编写于 作者: O Oleg Nenashev

FindBugs: Handle the non-realistic case of null Staplerrequest in...

FindBugs: Handle the non-realistic case of null Staplerrequest in HudsonPrivateSecurityRealm#newInstance()
上级 4cfc73b5
......@@ -570,6 +570,10 @@ public class HudsonPrivateSecurityRealm extends AbstractPasswordBasedSecurityRea
@Override
public Details newInstance(StaplerRequest req, JSONObject formData) throws FormException {
if (req == null) {
// Should never happen, see newInstance() Javadoc
throw new FormException("Stapler request is missing in the call", "staplerRequest");
}
String pwd = Util.fixEmpty(req.getParameter("user.password"));
String pwd2= Util.fixEmpty(req.getParameter("user.password2"));
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册