jsr369-experts@servlet-spec.java.net

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

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

>>>>> On Wed, 12 Aug 2015 14:37:24 -0700, Edward Burns <edward.burns_at_oracle.com> said:

>>>>> On Wed, 12 Aug 2015 14:13:52 -0700, Edward Burns <edward.burns_at_oracle.com> said:
EB> [...]

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

EB> You can see the result of the color coded changebars at

EB> https://maven.java.net/service/local/repositories/snapshots/archive/javax/servlet/javax.servlet-api/4.0.0-m01-SNAPSHOT/javax.servlet-api-4.0.0-m01-20150812.213236-2-javadoc.jar/!/javax/servlet/ServletContext.html#getAttribute-java.lang.String-

EB> https://maven.java.net/service/local/repositories/snapshots/archive/javax/servlet/javax.servlet-api/4.0.0-m01-SNAPSHOT/javax.servlet-api-4.0.0-m01-20150812.213236-2-javadoc.jar/!/javax/servlet/ServletContext.html#getInitParameter-java.lang.String-

My colleague and MVC and JSF co-spec lead Manfred Riem suggested we
return the result of calling Optional.empty() instead of the literal
string "null" without the quotes.

Perhaps this is a better idea. Thoughts?

Ed

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