package org.apache.el;
+import java.util.HashMap;
+import java.util.Map;
+
import javax.el.ELContext;
import javax.el.ExpressionFactory;
import javax.el.ValueExpression;
String result2 = (String) ve2.getValue(context);
assertEquals("fooAPPLEbar", result2);
}
+
+ public void testBug51177ObjectMap() {
+ ExpressionFactory factory = ExpressionFactory.newInstance();
+ ELContext context = new ELContextImpl();
+
+ Object o1 = "String value";
+ Object o2 = new Integer(32);
+
+ Map<Object,Object> map = new HashMap<Object,Object>();
+ map.put("key1", o1);
+ map.put("key2", o2);
+
+ ValueExpression var =
+ factory.createValueExpression(map, Map.class);
+ context.getVariableMapper().setVariable("map", var);
+
+ ValueExpression ve1 = factory.createValueExpression(
+ context, "${map.key1}", Object.class);
+ ve1.setValue(context, o2);
+ assertEquals(o2, ve1.getValue(context));
+
+ ValueExpression ve2 = factory.createValueExpression(
+ context, "${map.key2}", Object.class);
+ ve2.setValue(context, o1);
+ assertEquals(o1, ve2.getValue(context));
+ }
}
Ensure session cookie paths end in <code>/</code> so that session
cookies created for a context with a path of <code>/foo</code> do not
get returned with requests mapped to a context with a path of
- <code>/foobar</code>. (markt)
+ <code>/foobar</code>. (markt)
+ </fix>
+ </changelog>
+ </subsection>
+ <subsection name="Jasper">
+ <changelog>
+ <fix>
+ <bug>51177</bug>: Ensure Tomcat's MapElResolver always returns
+ <code>Object.class</code> for <code>getType()</code> as required by the
+ EL specification. (markt)
</fix>
</changelog>
</subsection>