tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Leffingwell, Jonathan R CTR FRCSE, JAX 7.2.2" <jonathan.leffingwell....@navy.mil>
Subject getAttribute(null)?
Date Thu, 12 Jun 2008 14:44:06 GMT
I have the following code that worked in Tomcat 5.0, but doesn't work in
Tomcat 5.5.26:

String formName = mapping.getAttribute();   // mapping is a variable of
type ActionMapping. In this scenario, formName is null.

if (null != session.getAttribute(formName)) {
	session.removeAttribute(formName);
}


formName is null.  In Tomcat 5.0.x, no exception was thrown and
processing continued (as if passing a null argument to getAttribute
simply returned NULL).  In Tomcat 5.5.26, a ServletException is thrown
(with a NullPointerException).

I know how to code a work-around (and have done so), but is this
considered a bug in Tomcat?


Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message