tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Fedd Kraft <>
Subject Why AstValue (part of EL) coerces set value to the target type
Date Sat, 07 May 2011 18:08:19 GMT

I think I have problems in my software because the implementation of EL 
works so that the set value is coerced to the target type.

I am talking about lines 153-157 of the class org.apache.el.parser 
I guess it makes sence all the time except if the 'base' is the Map. I 
seem that once I put a String into the Map, I lose the ability to put, 
say, an array or a Collection there through the setValue method of the 

The ValueExpressioni s a property of the Map, like this ${map.key}. If 
this expression is String, I can't setValue a Collection there, my 
collection becomes a String through toString method, because the 
resolver.getType method returns the Class of what is currently kept 
under this key.

Please tell me whether this is an intended/unavoidable behaviour, or a bug?


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