Author: markt
Date: Sun Jan 14 11:43:00 2007
New Revision: 496117
URL: http://svn.apache.org/viewvc?view=rev&rev=496117
Log:
Fix bug 39088. prevent infinite loops when an exception is thrown the returns
itself for getRootCause()
Modified:
tomcat/container/tc5.5.x/catalina/src/share/org/apache/catalina/core/StandardWrapper.java
tomcat/container/tc5.5.x/catalina/src/share/org/apache/catalina/valves/ErrorReportValve.java
tomcat/container/tc5.5.x/webapps/docs/changelog.xml
Modified:
tomcat/container/tc5.5.x/catalina/src/share/org/apache/catalina/core/StandardWrapper.java
URL:
http://svn.apache.org/viewvc/tomcat/container/tc5.5.x/catalina/src/share/org/apache/catalina/core/StandardWrapper.java?view=diff&rev=496117&r1=496116&r2=496117
==============================================================================
---
tomcat/container/tc5.5.x/catalina/src/share/org/apache/catalina/core/StandardWrapper.java
(original)
+++
tomcat/container/tc5.5.x/catalina/src/share/org/apache/catalina/core/StandardWrapper.java
Sun Jan 14 11:43:00 2007
@@ -639,7 +639,9 @@
try {
rootCauseCheck = (Throwable)IntrospectionUtils.getProperty
(rootCause, "rootCause");
- if (rootCauseCheck!=null)
+ if (rootCause == rootCauseCheck)
+ rootCauseCheck = null;
+ else if (rootCauseCheck != null)
rootCause = rootCauseCheck;
} catch (ClassCastException ex) {
Modified:
tomcat/container/tc5.5.x/catalina/src/share/org/apache/catalina/valves/ErrorReportValve.java
URL:
http://svn.apache.org/viewvc/tomcat/container/tc5.5.x/catalina/src/share/org/apache/catalina/valves/ErrorReportValve.java?view=diff&rev=496117&r1=496116&r2=496117
==============================================================================
---
tomcat/container/tc5.5.x/catalina/src/share/org/apache/catalina/valves/ErrorReportValve.java
(original)
+++
tomcat/container/tc5.5.x/catalina/src/share/org/apache/catalina/valves/ErrorReportValve.java
Sun Jan 14 11:43:00 2007
@@ -229,6 +229,7 @@
sb.append(RequestUtil.filter(stackTrace));
sb.append("</pre></p>");
+ Throwable nestedRootCause = null;
while (rootCause != null) {
stackTrace = JdkCompat.getJdkCompat()
.getPartialServletStackTrace(rootCause);
@@ -239,8 +240,12 @@
sb.append("</pre></p>");
// In case root cause is somehow heavily nested
try {
- rootCause = (Throwable)IntrospectionUtils.getProperty
+ nestedRootCause = (Throwable)IntrospectionUtils.getProperty
(rootCause, "rootCause");
+ if (rootCause == nestedRootCause)
+ rootCause = null;
+ else
+ rootCause = nestedRootCause;
} catch (ClassCastException e) {
rootCause = null;
}
Modified: tomcat/container/tc5.5.x/webapps/docs/changelog.xml
URL:
http://svn.apache.org/viewvc/tomcat/container/tc5.5.x/webapps/docs/changelog.xml?view=diff&rev=496117&r1=496116&r2=496117
==============================================================================
--- tomcat/container/tc5.5.x/webapps/docs/changelog.xml (original)
+++ tomcat/container/tc5.5.x/webapps/docs/changelog.xml Sun Jan 14 11:43:00 2007
@@ -74,6 +74,10 @@
Context filename. (markt)
</fix>
<fix>
+ <bug>39088</bug>: Prevent infinte loops when an exception is thrown
+ that returns itself for getRootCause(). (markt)
+ </fix>
+ <fix>
<bug>39436</bug>: Correct MIME type for SVG. (markt)
</fix>
<fix>
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]