Bug 309692 - JSF EL expression with 'empty' operator generates warning for non-collection operand in Web Page Editor
Summary: JSF EL expression with 'empty' operator generates warning for non-collection ...
Status: NEW
Alias: None
Product: Java Server Faces
Classification: WebTools
Component: JSF Tools (show other bugs)
Version: unspecified   Edit
Hardware: PC Windows XP
: P3 normal with 1 vote (vote)
Target Milestone: Future   Edit
Assignee: jsf inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords: helpwanted
Depends on:
Blocks:
 
Reported: 2010-04-19 11:27 EDT by Jim Tough CLA
Modified: 2010-12-28 18:43 EST (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
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