Uploaded image for project: 'Shale'
  1. Shale
  2. SHALE-494

WebResourceProcessor getResourceURL throws and catches NPE

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Open
    • Minor
    • Resolution: Unresolved
    • 1.0.4
    • None
    • Remoting
    • None
    • WinXP, glassfish v2ur1

    Description

      In the try catch block where the resource ID is converted to a URL using reflection, the code looks to see if debug logging is enabled in order to log the conversion. However, log is null at this point, causing an NPE which is caught in the surrounding try/catch (there for reflection exceptions). It is then logged as a resource exception, and null is returned. This seconds set of logging uses the log() private method which assigns to the variable log.

      if (log.isDebugEnabled())

      { log.debug("getResource(" + resourceId + ") --> " + url); }

      should be

      if (log().isDebugEnabled())

      { log().debug("getResource(" + resourceId + ") --> " + url); }

      Attachments

        Activity

          People

            Unassigned Unassigned
            dingotush David Cooke
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated: