Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 311626

Summary: Avoid reporting false-positive warnings when validating value expression for type compatibility
Product: [WebTools] Java Server Faces Reporter: Gerry Kessler <gerry.kessler>
Component: JSF ToolsAssignee: Gerry Kessler <gerry.kessler>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: P3 CC: raghunathan.srinivasan, xiaonan_jiang, yurykats
Version: 3.2Flags: raghunathan.srinivasan: pmc_approved? (david_williams)
raghunathan.srinivasan: pmc_approved? (naci.dai)
deboer: pmc_approved+
raghunathan.srinivasan: pmc_approved? (neil.hauge)
raghunathan.srinivasan: pmc_approved? (kaloyan)
raghunathan.srinivasan: review+
Target Milestone: 3.2 RC1   
Hardware: PC   
OS: Windows XP   
Whiteboard: PMC_approved
Attachments:
Description Flags
Patch none

Description Gerry Kessler CLA 2010-05-04 16:29:57 EDT
It is very difficult to get type compatibilty validation correct in JSF at designtime.  Converters can be applied to tag values using child tags, and the faces configurations can be customized to add converters for classes.   There are already several bugs in the system about false positives on type compare validations.

In an attempt to alleviate this problem, the default severity for type compatability validations will be lowered from Warning to Ignore.  A user may change this preference in the JSF Validations preference page.   

In addition, the current logic that attempts to provide converter applied validations will be disabled by default.   A system/env property will be made available to re-enable.

Future work will attempt to improve validations of type compatibility.
Comment 1 Gerry Kessler CLA 2010-05-04 16:43:08 EDT
Created attachment 167042 [details]
Patch

This patch:
   - sets default preference for "Value expression type incompatibility" to Ignore. 
   - disables alternative considered types logic.   It may be re-enabled using "jsfCoreEnableConverterValidation" system/env property setting.
Comment 2 Raghunathan Srinivasan CLA 2010-05-04 16:59:08 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. 
Reporting false-positives when validating value expression for type compatibility has been a big source of bugs logged by users and adopters.
* Is there a work-around? If so, why do you believe the work-around is insufficient? 
The workaround is to manually set the preference to ignore the warnings. However, the end user will still incur the cost of constructing the component tree, which can affect performance.
* How has the fix been tested? Is there a test case attached to the bugzilla record? Has a JUnit Test been added? 
Manual testing.
* Give a brief technical overview. Who has reviewed this fix? 
See description
* What is the risk associated with this fix? 
low
Comment 3 Gerry Kessler CLA 2010-05-05 17:19:36 EDT
Checked into HEAD 5/5/10