You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@myfaces.apache.org by "Maulin Shah (JIRA)" <de...@myfaces.apache.org> on 2005/11/27 03:40:55 UTC
[jira] Created: (MYFACES-879) _SelectItemsUtil will not handle NULL value.
_SelectItemsUtil will not handle NULL value.
--------------------------------------------
Key: MYFACES-879
URL: http://issues.apache.org/jira/browse/MYFACES-879
Project: MyFaces
Type: Bug
Components: Implementation
Versions: 1.1.1
Environment: irrelevant
Reporter: Maulin Shah
If a SelectItem has a converter that returns a null value in getAsObject when used with a SelectMany, then the matchValue method fails in _SelectITemsUtil.
Current code (beginning line 63):
Object itemValue = item.getValue();
if(converter != null && itemValue instanceof String)
{
itemValue = converter.getConvertedValue(context, (String)itemValue);
}
if (value.equals(itemValue))
{
return true;
}
should change line 68 to:
if (value == itemValue || value.equals(itemValue))
or something that can handle a null "value"
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira
[jira] Closed: (MYFACES-879) _SelectItemsUtil will not handle NULL value.
Posted by "Martin Marinschek (JIRA)" <de...@myfaces.apache.org>.
[ http://issues.apache.org/jira/browse/MYFACES-879?page=all ]
Martin Marinschek closed MYFACES-879:
-------------------------------------
Fix Version: Nightly
Resolution: Fixed
Assign To: Martin Marinschek
Thanks to Maulin Sha.
> _SelectItemsUtil will not handle NULL value.
> --------------------------------------------
>
> Key: MYFACES-879
> URL: http://issues.apache.org/jira/browse/MYFACES-879
> Project: MyFaces
> Type: Bug
> Components: Implementation
> Versions: 1.1.1
> Environment: irrelevant
> Reporter: Maulin Shah
> Assignee: Martin Marinschek
> Fix For: Nightly
>
> If a SelectItem has a converter that returns a null value in getAsObject when used with a SelectMany, then the matchValue method fails in _SelectITemsUtil.
> Current code (beginning line 63):
> Object itemValue = item.getValue();
> if(converter != null && itemValue instanceof String)
> {
> itemValue = converter.getConvertedValue(context, (String)itemValue);
> }
> if (value.equals(itemValue))
> {
> return true;
> }
> should change line 68 to:
> if (value == itemValue || value.equals(itemValue))
> or something that can handle a null "value"
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira