You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by ma...@apache.org on 2019/07/08 12:06:45 UTC

[tomcat] 01/03: Add NPE clarifications from 4.0 spec

This is an automated email from the ASF dual-hosted git repository.

markt pushed a commit to branch 8.5.x
in repository https://gitbox.apache.org/repos/asf/tomcat.git

commit 1128724c40b66437e9364993715282b74142e393
Author: Mark Thomas <ma...@apache.org>
AuthorDate: Mon Jul 8 10:31:05 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 8f96e66..91b4f34 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-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org