Bug 51852 - BeanELResolver varargs handling is broken in multiple ways
Summary: BeanELResolver varargs handling is broken in multiple ways
Alias: None
Product: Tomcat 7
Classification: Unclassified
Component: Servlet & JSP API (show other bugs)
Version: trunk
Hardware: PC All
: P2 normal (vote)
Target Milestone: ---
Assignee: Tomcat Developers Mailing List
Depends on:
Reported: 2011-09-20 19:16 UTC by Matt Benson
Modified: 2011-09-21 13:41 UTC (History)
1 user (show)

Proposed patch (6.57 KB, patch)
2011-09-20 19:17 UTC, Matt Benson
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Matt Benson 2011-09-20 19:16:07 UTC
The supplied patch (against SVN Revision 1173292) addresses:
 - Incorrectly constructed varargs arguments (resulting in ArrayIndexOutOfBoundsExceptions)
 - Incorrectly detected matching varargs methods

I originally encountered the first issue in my JSF application using the JUEL EL implementation in conjunction with Tomcat's EL API.  However I continue to get the error even when dropping JUEL from the application, so I'm not sure why in some instances the Jasper implementation seems to handle the varargs invocations and in others the BeanELResolver is invoked.  In any event, code that already resides in BeanELResolver should certainly function properly, and mixing a given ExpressionFactory implementation with any conforming API implementation should AFAICT be feasible.

The second issue I encountered while debugging the first issue.
Comment 1 Matt Benson 2011-09-20 19:17:16 UTC
Created attachment 27543 [details]
Proposed patch

I grant the ASF license to incorporate the contents of the submitted patch.
Comment 2 Mark Thomas 2011-09-21 13:41:56 UTC
Many thanks for the patch and especially for including the test case.

The patch has been applied to trunk and 7.0.x and will be included in 7.0.22 onwards.