shale-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "David Cooke (JIRA)" <j...@apache.org>
Subject [jira] Created: (SHALE-494) WebResourceProcessor getResourceURL throws and catches NPE
Date Fri, 06 Jun 2008 14:44:06 GMT
WebResourceProcessor getResourceURL throws and catches NPE
----------------------------------------------------------

                 Key: SHALE-494
                 URL: https://issues.apache.org/struts/browse/SHALE-494
             Project: Shale
          Issue Type: Bug
          Components: Remoting
    Affects Versions: 1.0.4
         Environment: WinXP, glassfish v2ur1
            Reporter: David Cooke
            Priority: Minor


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

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


Mime
View raw message