Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 313394 - [JSF2.0] False warnings when EL validation is disabled
Summary: [JSF2.0] False warnings when EL validation is disabled
Status: RESOLVED FIXED
Alias: None
Product: Java Server Faces
Classification: WebTools
Component: JSF Tools (show other bugs)
Version: unspecified   Edit
Hardware: PC Windows XP
: P3 normal (vote)
Target Milestone: 3.2 RC3   Edit
Assignee: Cameron Bateman CLA
QA Contact:
URL:
Whiteboard: PMC_approved
Keywords:
Depends on:
Blocks:
 
Reported: 2010-05-18 12:39 EDT by Xiaonan Jiang CLA
Modified: 2010-05-27 16:21 EDT (History)
4 users (show)

See Also:
david_williams: pmc_approved+
raghunathan.srinivasan: pmc_approved? (naci.dai)
deboer: pmc_approved+
raghunathan.srinivasan: pmc_approved? (neil.hauge)
raghunathan.srinivasan: pmc_approved? (kaloyan)
raghunathan.srinivasan: review+


Attachments
Tentative fix (1020 bytes, patch)
2010-05-18 15:00 EDT, Xiaonan Jiang CLA
raghunathan.srinivasan: iplog+
Details | Diff
Change the return to an assignment so that the flow of control works as intended (1023 bytes, patch)
2010-05-24 13:56 EDT, Cameron Bateman CLA
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Xiaonan Jiang CLA 2010-05-18 12:39:31 EDT
Build Identifier: wtp 3.2

1. Import the project "ajax-component" from Sun's JSF 2.0.2 implementation examples.
2. Copy the jsf-api.jar and jsf-impl.jar into the WEB-INF/lib folder.
3. Add the project facet "JavaServer Faces" "2.0"
4. Validate the project.
5. Go the validator preference page and unselect the checkbox "Validate EL on Build/Run Validation".
6. Validate the project again.

Noticed the following two types of warnings appear:
1) "MethodBinding attribute values must be EL expressions."
2) "The action value does not match a navigation case outcome."

Reproducible: Always
Comment 1 Xiaonan Jiang CLA 2010-05-18 12:55:00 EDT
For the first false warning ("MethodBinding attribute values must be EL expressions"), at least the method AttributeValidatingStrategy.checkIfELAndValidate() is wrong - it returns false for an EL expression when the EL validation is disabled.
Comment 2 Xiaonan Jiang CLA 2010-05-18 15:00:29 EDT
Created attachment 168995 [details]
Tentative fix
Comment 3 Cameron Bateman CLA 2010-05-24 13:56:36 EDT
Created attachment 169705 [details]
Change the return to an assignment so that the flow of control works as intended
Comment 4 Raghunathan Srinivasan CLA 2010-05-24 19:07:25 EDT
* Explain why you believe this is a stop-ship defect. Or, if it is a "hotbug"
(requested by an adopter) please document it as such. 
This is a stop-ship bug. The tool reports validation warnings in an EL even when such a validation is turned off in the preference page.
* Is there a work-around? If so, why do you believe the work-around is
insufficient? 
No workaround.
* How has the fix been tested? Is there a test case attached to the bugzilla
record? Has a JUnit Test been added? 
Manual
* Give a brief technical overview. Who has reviewed this fix? 
See  comment 1 and 3.
* What is the risk associated with this fix?
low
Comment 5 Cameron Bateman CLA 2010-05-25 14:44:12 EDT
Patch committed to HEAD (3.2M3).