[jsr369-experts] Re: [servlet-spec users] [SERVLET_SPEC-83] ServletContext getInitParameter(), getAttribute() and null values

From: Edward Burns <edward.burns_at_oracle.com>
Date: Thu, 13 Aug 2015 15:14:13 -0700

>>>>> On Thu, 13 Aug 2015 08:51:07 +0100, Mark Thomas <markt_at_apache.org> said:

MT> For the above case I would say that the parameter value was the empty
MT> string.

Yes, I agree. I had a testing error. GlassFist returns the empty string
in that case as well.

> I agree that we should throw NPE if the argument is null.

MT> For clarity, you are saying:

MT> ServletContext.getInitParameter(null) should throw NPE
MT> ServletContext.getAttribute(null) should throw NPE

MT> right? If so, I agree.

MT> While we are at it we should add:

MT> ServletContext.setInitParameter(null, <anything>) should throw NPE
MT> ServletContext.setAttribute(null, <anything>) should throw NPE

Ok, this is what I've done.

Marking this closed.


| edward.burns_at_oracle.com | office: +1 407 458 0017
| 58 Business days til JavaOne 2015
| 73 Business days til DOAG 2015