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.2.7-core
Reporter: Scott O'Bryan
Assignee: Scott O'Bryan
Fix For: 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.