Uploaded image for project: 'MyFaces Trinidad'
  1. MyFaces Trinidad
  2. TRINIDAD-1044

TreeTableRender does not handle null iconURI

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 1.0.7-core, 1.2.7-core
    • 1.0.8-core, 1.2.8-core
    • Components
    • None

    Description

      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(); }

      }

      Attachments

        Activity

          People

            darkarena Scott O'Bryan
            darkarena Scott O'Bryan
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: