jsr369-experts@servlet-spec.java.net

[jsr369-experts] [SERVLET_SPEC-83] ServletContext getInitParameter(), getAttribute() and null values

From: Edward Burns <edward.burns_at_oracle.com>
Date: Wed, 12 Aug 2015 14:13:52 -0700

Hello Volunteers,

Shing-wai had filed this issue a while ago and I needed to make an API
change to test out some CSS for the javadoc. This seemed like a good
way to do two things at once.

From the issue:

8<--------------------

In the javadoc of ServletContext#getInitParameter, we have

Returns a String containing the value of the named context-wide
initialization parameter, or null if the parameter does not exist.

What happens when the name parameter is null? Should we throw NPE?

Similar issue for #getAttribute? We would like to have a more
consistence answer for these?

8<--------------------

I propose we return the literal string "null" without the quotes in both
cases.

Comments?

Thanks,

Ed

-- 
| edward.burns_at_oracle.com | office: +1 407 458 0017
| 59 Business days til JavaOne 2015
| 74 Business days til DOAG 2015