Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 351996 - JSP validator shows false errors for EL conditional operator
Summary: JSP validator shows false errors for EL conditional operator
Status: RESOLVED FIXED
Alias: None
Product: WTP Source Editing
Classification: WebTools
Component: jst.jsp (show other bugs)
Version: 3.3   Edit
Hardware: PC Linux
: P3 major (vote)
Target Milestone: 3.3.2   Edit
Assignee: Nick Sandonato CLA
QA Contact: Nick Sandonato CLA
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-07-13 11:46 EDT by Andrew CLA
Modified: 2011-11-08 17:51 EST (History)
2 users (show)

See Also:


Attachments
patch (1.52 KB, patch)
2011-11-08 17:49 EST, Nick Sandonato CLA
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Andrew CLA 2011-07-13 11:46:12 EDT
JSP validator do not understand "expr ? value1 : value2" EL operator. This fragment generates false error message:

<c:set var="customer" 
    value="${(empty PurchaserName) ? tx : fn:substring(PurchaserName, 0, 100) }"/>

The function tx:fn is undefined	sale.jsp 

-- Configuration Details --
Product: Eclipse 1.4.0.20110609-1120 (org.eclipse.epp.package.jee.product)
Installed Features:
 org.eclipse.jdt 3.7.0.v20110520-0800-7z8gFchFMTdFYKuLqBLqRja9B15B
Comment 1 Nitin Dahyabhai CLA 2011-07-13 19:44:25 EDT
Lowering severity as this doesn't meet the criteria for a "blocker." 

https://bugs.eclipse.org/bugs/page.cgi?id=fields.html#importance
Comment 2 Nick Sandonato CLA 2011-11-08 17:49:12 EST
Created attachment 206631 [details]
patch

The parser was turning the conditional expression and turning the two identifiers into a method invocation. Updated the el specification to look far enough ahead to make sure something is a method invocation.
Comment 3 Nick Sandonato CLA 2011-11-08 17:51:06 EST
Code checked in.