Bug 309692

Summary: JSF EL expression with 'empty' operator generates warning for non-collection operand in Web Page Editor
Product: [WebTools] Java Server Faces Reporter: Jim Tough <jim>
Component: JSF ToolsAssignee: jsf inbox <jsf-inbox>
Status: NEW --- QA Contact:
Severity: normal    
Priority: P3 CC: raghunathan.srinivasan
Version: unspecifiedKeywords: helpwanted
Target Milestone: Future   
Hardware: PC   
OS: Windows XP   
Whiteboard:

Description Jim Tough CLA 2010-04-19 11:27:22 EDT
Build Identifier: 20100218-1602

When using the 'empty' operator in a JSF EL expression, the Web Page Editor will always display the following warning for a non-collection operand: "This empty expression always evaluates to false. Only string, maps, arrays and collection have meaningful values for the empty operator"

The warning is wrong.  The 'empty' operator serves (at least) 3 purposes:
1) To determine if the operand is null
2) To determine if the operand is an empty string
3) To determine if the operand is an empty collection

Since I am using 'empty' to test for null values I should not be getting a warning on each of my JSF EL expressions.

Reproducible: Always

Steps to Reproduce:
1. Create a JSF page that contains a JSF EL expression similar to the following: "#{not empty sessionData.nonCollectionOrStringAttribute}" 
2. The warning described above will be displayed in the Web Page Editor