Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 276620 - [validation] EL Functions with different names from associated Java methods have invalid errors reported on them
Summary: [validation] EL Functions with different names from associated Java methods h...
Status: RESOLVED FIXED
Alias: None
Product: WTP Source Editing
Classification: WebTools
Component: jst.jsp (show other bugs)
Version: 3.1   Edit
Hardware: PC Linux
: P3 minor (vote)
Target Milestone: 3.2 M5   Edit
Assignee: Ian Tewksbury CLA
QA Contact: Nitin Dahyabhai CLA
URL: http://forums.sun.com/thread.jspa?thr...
Whiteboard:
Keywords:
Depends on: 280621
Blocks:
  Show dependency tree
 
Reported: 2009-05-17 10:44 EDT by david CLA
Modified: 2009-12-18 07:53 EST (History)
2 users (show)

See Also:
nsand.dev: review+


Attachments
Fix Patch (4.86 KB, patch)
2009-11-09 16:32 EST, Ian Tewksbury CLA
nsand.dev: iplog+
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description david CLA 2009-05-17 10:44:59 EDT
Build ID: 3.4.2

Steps To Reproduce:
1. Create a valid class with a public static method.
2. Create the associated tld descriptor and put it in WEB-INF/.
3. Put the taglib describtor in your jsp.
4. Call your function from the jsp e.g.
 ${mine:rollIT()}
You should observe the the EL Syntax validator marks the line in red with a syntax error, but the page itself runs fine inside tomcat.

More information:
After finding this problem I Googled and found this guy had the same issue. He provides a more detailed description of the issue.

http://forums.sun.com/thread.jspa?threadID=5379004

He was told to report it here but I can see no evidence that he did.
Comment 1 Ian Tewksbury CLA 2009-06-17 10:43:34 EDT
This will be fixed by Bug 280621
	

Comment 2 Ian Tewksbury CLA 2009-11-05 15:46:57 EST
There are still some issues with this that need to be worked out.  Working on a patch now.
Comment 3 Ian Tewksbury CLA 2009-11-09 16:32:56 EST
Created attachment 151740 [details]
Fix Patch

The additional problem here is that in this user story the function named defined in the TLD is different then that of the Java method signature function name.  Currently the ELGenerator assumes that the el function name is the same as the Java function name, but this does not need to be true.

This patch makes it so the ELGeneratorVisitor will inspect the java method signature provided in the TLD for the java function name associated with the EL function name.

Several other bugs in this space have been found while working on this but I will be reporting/fixing those in separate Bugs.
Comment 4 Nick Sandonato CLA 2009-12-17 17:27:51 EST
Thanks for the patch, Ian. I tweaked how you parse the method name from the function-signature. Instead of using the regular expression, it looks for a word before a ( just by iterating through the string inspecting characters.
Comment 5 Ian Tewksbury CLA 2009-12-18 07:53:52 EST
Isn't iterating the word ourselves move work and less defective then using the regular expression?