You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by bu...@apache.org on 2014/06/18 18:40:44 UTC
[Bug 56638] New: EL defineFunction does not support empty function
names
https://issues.apache.org/bugzilla/show_bug.cgi?id=56638
Bug ID: 56638
Summary: EL defineFunction does not support empty function
names
Product: Tomcat 8
Version: trunk
Hardware: PC
Status: NEW
Severity: normal
Priority: P2
Component: EL
Assignee: dev@tomcat.apache.org
Reporter: artfiedler@gmail.com
Per the javadoc at
http://docs.oracle.com/javaee/7/api/javax/el/ELProcessor.html it specifies that
defineFunction(String prefix, String function, String className, String method)
should use the method name as function name when the function argument is empty
("")
The current code stores function names as ":" so it cannot locate custom
functions like the following ${length(obj)} which would be queried for as
":length"
Replace code:
if (method.getName().equals(sig.getName())) {
if (sig.getParamTypeNames() == null) {
With:
if (method.getName().equals(sig.getName())) {
if (function.length() == 0)
function = method.getName();
if (sig.getParamTypeNames() == null) {
The two new lines of code ensure that when function is blank it the method name
will be used as the function name
--
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org
[Bug 56638] EL defineFunction does not support empty function names
Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=56638
Mark Thomas <ma...@apache.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |RESOLVED
Resolution|--- |FIXED
OS| |All
--- Comment #1 from Mark Thomas <ma...@apache.org> ---
Thanks for the report. This has been fixed in 8.0.x for 8.0.9 onwards.
--
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org