This is an automated email from the ASF dual-hosted git repository. markt pushed a commit to branch 7.0.x in repository https://gitbox.apache.org/repos/asf/tomcat.git
commit 83c20cd258361f7a2a52996b2bde91341281c064 Author: Mark Thomas <ma...@apache.org> AuthorDate: Mon Jul 8 10:31:23 2019 +0100 Add NPE clarifications from 4.0 spec --- java/javax/servlet/ServletContext.java | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/java/javax/servlet/ServletContext.java b/java/javax/servlet/ServletContext.java index c22bcb0..f707ed5 100644 --- a/java/javax/servlet/ServletContext.java +++ b/java/javax/servlet/ServletContext.java @@ -437,6 +437,8 @@ public interface ServletContext { * whose value is requested * @return a <code>String</code> containing the value of the initialization * parameter + * @throws NullPointerException If the provided parameter name is + * <code>null</code> * @see ServletConfig#getInitParameter */ public String getInitParameter(String name); @@ -469,6 +471,8 @@ public interface ServletContext { * {@link javax.servlet.annotation.WebListener}. For example, a * {@link ServletContextListener} defined in a TLD would not be able to * use this method. + * @throws NullPointerException If the provided parameter name is + * <code>null</code> * @since Servlet 3.0 */ public boolean setInitParameter(String name, String value); @@ -490,6 +494,8 @@ public interface ServletContext { * a <code>String</code> specifying the name of the attribute * @return an <code>Object</code> containing the value of the attribute, or * <code>null</code> if no attribute exists matching the given name + * @throws NullPointerException If the provided attribute name is + * <code>null</code> * @see ServletContext#getAttributeNames */ public Object getAttribute(String name); @@ -523,6 +529,8 @@ public interface ServletContext { * a <code>String</code> specifying the name of the attribute * @param object * an <code>Object</code> representing the attribute to be bound + * @throws NullPointerException If the provided attribute name is + * <code>null</code> */ public void setAttribute(String name, Object object); --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org