tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bugzi...@apache.org
Subject DO NOT REPLY [Bug 14195] New: - NPE from dispatch() when no errCode
Date Sat, 02 Nov 2002 22:28:37 GMT
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://nagoya.apache.org/bugzilla/show_bug.cgi?id=14195>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

http://nagoya.apache.org/bugzilla/show_bug.cgi?id=14195

NPE from dispatch() when no errCode

           Summary: NPE from dispatch() when no errCode
           Product: Tomcat 4
           Version: 4.1.14
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: Normal
          Priority: Other
         Component: Jasper 2
        AssignedTo: tomcat-dev@jakarta.apache.org
        ReportedBy: hans@gefionsoftware.com


The dispatch(Mark where, String errCode, Object[] args, Exception e) method in
the o.a.jasper.compiler.ErrorDispatcher throws an NPE when it's called from the
jspError(Exception e) method in the same class, since the errCode parameter is
null in this case.

A simple fix is to test for a null errCode and set a default message in this case:

	// Localize
	String errMsg = "Unknown error message";
	if (errCode != null) {
	    errMsg = getString(errCode, args);
	}

--
To unsubscribe, e-mail:   <mailto:tomcat-dev-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:tomcat-dev-help@jakarta.apache.org>


Mime
View raw message