You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@myfaces.apache.org by "Scott O'Bryan (JIRA)" <de...@myfaces.apache.org> on 2008/04/08 19:17:25 UTC
[jira] Resolved: (TRINIDAD-1044) TreeTableRender does not handle
null iconURI
[ https://issues.apache.org/jira/browse/TRINIDAD-1044?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Scott O'Bryan resolved TRINIDAD-1044.
-------------------------------------
Resolution: Fixed
I added the patch proposed above.
> TreeTableRender does not handle null iconURI
> --------------------------------------------
>
> Key: TRINIDAD-1044
> URL: https://issues.apache.org/jira/browse/TRINIDAD-1044
> Project: MyFaces Trinidad
> Issue Type: Bug
> Components: Components
> Affects Versions: 1.0.7-core, 1.2.7-core
> Reporter: Scott O'Bryan
> Assignee: Scott O'Bryan
> Fix For: 1.0.8-core, 1.2.8-core
>
>
> I have a skin that returns a "NullIcon" object. This icon object does not have an iconURI so it returns null. While the TreeRenderer supports a null iconURI, there is erroneous logic when trying to retrieve the uri which causes a null pointer exception.
> The current code reads:
> if (iconURI == null && icon != null)
> {
> iconURI = icon.getImageURI(context, rc).toString();
> }
> This should be changed to:
> if (iconURI == null && icon != null)
> {
> //This can be null so we need to check for it before doing toString
> Object o = icon.getImageURI(context, rc);
> if(o != null)
> {
> iconURI = o.toString();
> }
> }
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.