-
1. Re: ArrayELResolver's handling of primitive arrays
jfclere Apr 16, 2013 3:47 AM (in response to orankelly)The el code of jbossweb comes from the tomcat one there aren't complains (yet) for that. So I would say you miss some.
-
2. Re: ArrayELResolver's handling of primitive arrays
orankelly Apr 19, 2013 6:53 AM (in response to jfclere)Perhaps. But the code as it is cannot work for primitive arrays. So the question becomes: is this by design and is it invalid to attempt to use a primitive array in the first place, or is this simply a bug that no one has encountered because non-primitive arrays is the most common use-case.
-
3. Re: ArrayELResolver's handling of primitive arrays
dwightd May 1, 2013 10:23 PM (in response to orankelly)FWIW, I just ran into this problem running under Tomcat 6.0.32 and 6.0.36, but the same application works fine in Tomcat 6.0.20. So it is likely a change in Tomcat's ArrayElResolver that's causing the problem. Partial stack:
Caused by: java.lang.ClassCastException: Unable to add an object of type [java.lang.Boolean] to an array of objects of type [boolean]
at javax.el.ArrayELResolver.setValue(ArrayELResolver.java:94)
at javax.el.CompositeELResolver.setValue(CompositeELResolver.java:69)
at org.apache.myfaces.el.unified.resolver.FacesCompositeELResolver.setValue(FacesCompositeELResolver.java:237)
at org.apache.el.parser.AstValue.setValue(AstValue.java:158)
There's a similar issue reported on the PrimeFaces forum http://forum.primefaces.org/viewtopic.php?f=3&t=24790 where the stack trace indicates they're running under Tomcat, but no version info was given.
I've changed our code to use Boolean[] instead of boolean[], and now it works. A bit more expensive, but in our case the code isn't exercised that often, so I can live with it.