You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@commons.apache.org by db...@apache.org on 2011/10/28 06:00:29 UTC
svn commit: r1190148 -
/commons/proper/jxpath/trunk/src/java/org/apache/commons/jxpath/servlet/ServletContextHandler.java
Author: dbrosius
Date: Fri Oct 28 04:00:29 2011
New Revision: 1190148
URL: http://svn.apache.org/viewvc?rev=1190148&view=rev
Log:
fix unit test, by checking for bean being a HttpSessionAndServletContext, rather than a ServletContext
Modified:
commons/proper/jxpath/trunk/src/java/org/apache/commons/jxpath/servlet/ServletContextHandler.java
Modified: commons/proper/jxpath/trunk/src/java/org/apache/commons/jxpath/servlet/ServletContextHandler.java
URL: http://svn.apache.org/viewvc/commons/proper/jxpath/trunk/src/java/org/apache/commons/jxpath/servlet/ServletContextHandler.java?rev=1190148&r1=1190147&r2=1190148&view=diff
==============================================================================
--- commons/proper/jxpath/trunk/src/java/org/apache/commons/jxpath/servlet/ServletContextHandler.java (original)
+++ commons/proper/jxpath/trunk/src/java/org/apache/commons/jxpath/servlet/ServletContextHandler.java Fri Oct 28 04:00:29 2011
@@ -47,6 +47,9 @@ public class ServletContextHandler imple
* @param bean to read
*/
protected void collectPropertyNames(Set set, Object bean) {
+ if (bean instanceof HttpSessionAndServletContext) {
+ bean = ((HttpSessionAndServletContext) bean).getServletContext();
+ }
Enumeration e = ((ServletContext) bean).getAttributeNames();
while (e.hasMoreElements()) {
set.add(e.nextElement());