tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Mark Thomas <ma...@apache.org>
Subject Re: svn commit: r498053 - in /tomcat/container/tc5.5.x/catalina: build.xml src/share/org/apache/catalina/core/StandardWrapper.java
Date Tue, 23 Jan 2007 01:15:19 GMT
Tim Funk wrote:
> Does this introduces a new dependency on the jsp-api - which could be a
> regression for people who embed tomcat without using jsp's.

Yes, it does add an additional dependency. I didn't consider the
embedded use case.

> Also the checking is not that aggressive any more in the case of nested
> exceptions. This may leave the root cause still unexposed.

My bad. I missed the recursion part of the patch.

> This patch seems better:
> http://svn.apache.org/viewvc/tomcat/container/tc5.5.x/catalina/src/share/org/apache/catalina/valves/ErrorReportValve.java?r1=466608&r2=496117&diff_format=h

This issue that the OP raised with this patch is the unintended
consequences of using introspection. To summarise:
- the root cause could be a custom exception
- this custom exception may have a getRootCause() method
- since this method is not defined anywhere, it could do anything
- therefore, calling getRootCause() on a random exception is dangerous

The ErrorReportValve also only uses getRootCause() and ignores
possibilities offered by getCause()

I'll take another look at this with the following intentions:
- removing the jsp-api dependency (probably a slightly ugly hack)
- add the recursion part of the patch
- continue to avoid using introspection to call getRootCause()

Thoughts?

Mark

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


Mime
View raw message