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 2008/08/14 11:11:57 UTC
svn commit: r685826 - in /tomcat:
container/tc5.5.x/catalina/src/share/org/apache/catalina/session/StandardSession.java
container/tc5.5.x/webapps/docs/changelog.xml current/tc5.5.x/STATUS.txt
Author: markt
Date: Thu Aug 14 02:11:55 2008
New Revision: 685826
URL: http://svn.apache.org/viewvc?rev=685826&view=rev
Log:
Fix https://issues.apache.org/bugzilla/show_bug.cgi?id=45195
NPE when calling getAttribute(null). The spec is unclear but this is a regression from 5.0.x
Modified:
tomcat/container/tc5.5.x/catalina/src/share/org/apache/catalina/session/StandardSession.java
tomcat/container/tc5.5.x/webapps/docs/changelog.xml
tomcat/current/tc5.5.x/STATUS.txt
Modified: tomcat/container/tc5.5.x/catalina/src/share/org/apache/catalina/session/StandardSession.java
URL: http://svn.apache.org/viewvc/tomcat/container/tc5.5.x/catalina/src/share/org/apache/catalina/session/StandardSession.java?rev=685826&r1=685825&r2=685826&view=diff
==============================================================================
--- tomcat/container/tc5.5.x/catalina/src/share/org/apache/catalina/session/StandardSession.java (original)
+++ tomcat/container/tc5.5.x/catalina/src/share/org/apache/catalina/session/StandardSession.java Thu Aug 14 02:11:55 2008
@@ -1021,6 +1021,8 @@
throw new IllegalStateException
(sm.getString("standardSession.getAttribute.ise"));
+ if (name == null) return null;
+
return (attributes.get(name));
}
@@ -1165,6 +1167,9 @@
*/
public void removeAttribute(String name) {
+ // Avoid NPE
+ if (name == null) return;
+
removeAttribute(name, true);
}
Modified: tomcat/container/tc5.5.x/webapps/docs/changelog.xml
URL: http://svn.apache.org/viewvc/tomcat/container/tc5.5.x/webapps/docs/changelog.xml?rev=685826&r1=685825&r2=685826&view=diff
==============================================================================
--- tomcat/container/tc5.5.x/webapps/docs/changelog.xml (original)
+++ tomcat/container/tc5.5.x/webapps/docs/changelog.xml Thu Aug 14 02:11:55 2008
@@ -92,6 +92,12 @@
names in server.xml. (markt)
</fix>
<fix>
+ <bug>45195</bug>: Prevent NPE when calling
+ <code>Session.getAttribute(null)</code> and
+ <code>Session.removeAttribute(null)</code>. The spec is unclear but this
+ is a regression from 5.0.x. (markt)
+ </fix>
+ <fix>
<bug>45293</bug>: Update name of commons-logging jar in security policy.
(markt)
</fix>
Modified: tomcat/current/tc5.5.x/STATUS.txt
URL: http://svn.apache.org/viewvc/tomcat/current/tc5.5.x/STATUS.txt?rev=685826&r1=685825&r2=685826&view=diff
==============================================================================
--- tomcat/current/tc5.5.x/STATUS.txt (original)
+++ tomcat/current/tc5.5.x/STATUS.txt Thu Aug 14 02:11:55 2008
@@ -49,14 +49,6 @@
+1: markt, yoavs, fhanik
-1:
-* Fix https://issues.apache.org/bugzilla/show_bug.cgi?id=45195
- NPE when calling getAttribute(null). The spec is unclear but this
- is a regression from 5.0.x Also avoid NPE on remove
- http://svn.apache.org/viewvc?rev=667604&view=rev
- http://svn.apache.org/viewvc?rev=668854&view=rev
- +1: markt, yoavs, fhanik
- -1:
-
* Remove the JDK 1.3 references from SSL How To
http://people.apache.org/~markt/patches/2008-06-21-SSL-docs.patch
+1: markt, yoavs
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org