From 2a87fe4c14d4dddaa51ece4cd5ded73ac0efa983 Mon Sep 17 00:00:00 2001
From: remm
Date: Mon, 15 Jan 2007 15:41:36 +0000
Subject: [PATCH] - Simplify the code.
git-svn-id: https://svn.apache.org/repos/asf/tomcat/tc6.0.x/trunk@496373 13f79535-47bb-0310-9956-ffa450edef68
---
java/org/apache/catalina/valves/ErrorReportValve.java | 10 +---------
1 file changed, 1 insertion(+), 9 deletions(-)
diff --git a/java/org/apache/catalina/valves/ErrorReportValve.java b/java/org/apache/catalina/valves/ErrorReportValve.java
index 793bc13a2..45780d9e7 100644
--- a/java/org/apache/catalina/valves/ErrorReportValve.java
+++ b/java/org/apache/catalina/valves/ErrorReportValve.java
@@ -163,15 +163,6 @@ public class ErrorReportValve
if ((statusCode < 400) || (response.getContentCount() > 0))
return;
- Throwable rootCause = null;
-
- if (throwable != null) {
-
- if (throwable instanceof ServletException)
- rootCause = ((ServletException) throwable).getRootCause();
-
- }
-
String message = RequestUtil.filter(response.getMessage());
if (message == null)
message = "";
@@ -227,6 +218,7 @@ public class ErrorReportValve
sb.append("
");
int loops = 0;
+ Throwable rootCause = throwable.getCause();
while (rootCause != null && (loops < 10)) {
stackTrace = getPartialServletStackTrace(rootCause);
sb.append("");
--
2.11.0