提交 2a97bf41 编写于 作者: J Jesse Glick 提交者: GitHub

Merge pull request #2766 from jglick/NPE-JENKINS-42367

Noting that ParameterValue.getValue can on occasion return null
......@@ -36,6 +36,7 @@ import java.io.IOException;
import java.io.Serializable;
import java.util.Map;
import java.util.logging.Logger;
import javax.annotation.CheckForNull;
import jenkins.model.Jenkins;
import net.sf.json.JSONObject;
......@@ -302,9 +303,11 @@ public abstract class ParameterValue implements Serializable {
* Returns the most natural Java object that represents the actual value, like
* boolean, string, etc.
*
* If there's nothing that really fits the bill, the callee can return {@code this}.
* @return if there is no natural value for this parameter type, {@code this} may be used;
* {@code null} may be used when the value is normally defined but missing in this case for various reasons
* @since 1.568
*/
@CheckForNull
public Object getValue() {
return null;
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册