This is an automated email from the ASF dual-hosted git repository.
markt pushed a commit to branch 10.1.x
in repository https://gitbox.apache.org/repos/asf/tomcat.git
The following commit(s) were added to refs/heads/10.1.x by this push:
new 0fb8c17e43 Formatting, no functional change.
0fb8c17e43 is described below
commit 0fb8c17e434091b862134603145e9e441abd895a
Author: Mark Thomas <[email protected]>
AuthorDate: Fri Nov 18 16:10:58 2022 +0000
Formatting, no functional change.
---
.../apache/catalina/core/StandardHostValve.java | 43 +++++++---------------
1 file changed, 14 insertions(+), 29 deletions(-)
diff --git a/java/org/apache/catalina/core/StandardHostValve.java
b/java/org/apache/catalina/core/StandardHostValve.java
index 76c4171f34..75ae889a95 100644
--- a/java/org/apache/catalina/core/StandardHostValve.java
+++ b/java/org/apache/catalina/core/StandardHostValve.java
@@ -209,27 +209,22 @@ final class StandardHostValve extends ValveBase {
}
if (errorPage != null && response.isErrorReportRequired()) {
response.setAppCommitted(false);
- request.setAttribute(RequestDispatcher.ERROR_STATUS_CODE,
- Integer.valueOf(statusCode));
+ request.setAttribute(RequestDispatcher.ERROR_STATUS_CODE,
Integer.valueOf(statusCode));
String message = response.getMessage();
if (message == null) {
message = "";
}
request.setAttribute(RequestDispatcher.ERROR_MESSAGE, message);
- request.setAttribute(Globals.DISPATCHER_REQUEST_PATH_ATTR,
- errorPage.getLocation());
- request.setAttribute(Globals.DISPATCHER_TYPE_ATTR,
- DispatcherType.ERROR);
+ request.setAttribute(Globals.DISPATCHER_REQUEST_PATH_ATTR,
errorPage.getLocation());
+ request.setAttribute(Globals.DISPATCHER_TYPE_ATTR,
DispatcherType.ERROR);
Wrapper wrapper = request.getWrapper();
if (wrapper != null) {
- request.setAttribute(RequestDispatcher.ERROR_SERVLET_NAME,
- wrapper.getName());
+ request.setAttribute(RequestDispatcher.ERROR_SERVLET_NAME,
wrapper.getName());
}
- request.setAttribute(RequestDispatcher.ERROR_REQUEST_URI,
- request.getRequestURI());
+ request.setAttribute(RequestDispatcher.ERROR_REQUEST_URI,
request.getRequestURI());
if (custom(request, response, errorPage)) {
response.setErrorReported();
try {
@@ -255,8 +250,7 @@ final class StandardHostValve extends ValveBase {
* @param throwable The exception that occurred (which possibly wraps
* a root cause exception
*/
- protected void throwable(Request request, Response response,
- Throwable throwable) {
+ protected void throwable(Request request, Response response, Throwable
throwable) {
Context context = request.getContext();
if (context == null) {
return;
@@ -274,9 +268,7 @@ final class StandardHostValve extends ValveBase {
// If this is an aborted request from a client just log it and return
if (realError instanceof ClientAbortException ) {
if (log.isDebugEnabled()) {
- log.debug
- (sm.getString("standardHost.clientAbort",
- realError.getCause().getMessage()));
+ log.debug(sm.getString("standardHost.clientAbort",
realError.getCause().getMessage()));
}
return;
}
@@ -289,25 +281,18 @@ final class StandardHostValve extends ValveBase {
if (errorPage != null) {
if (response.setErrorReported()) {
response.setAppCommitted(false);
- request.setAttribute(Globals.DISPATCHER_REQUEST_PATH_ATTR,
- errorPage.getLocation());
- request.setAttribute(Globals.DISPATCHER_TYPE_ATTR,
- DispatcherType.ERROR);
+ request.setAttribute(Globals.DISPATCHER_REQUEST_PATH_ATTR,
errorPage.getLocation());
+ request.setAttribute(Globals.DISPATCHER_TYPE_ATTR,
DispatcherType.ERROR);
request.setAttribute(RequestDispatcher.ERROR_STATUS_CODE,
Integer.valueOf(HttpServletResponse.SC_INTERNAL_SERVER_ERROR));
- request.setAttribute(RequestDispatcher.ERROR_MESSAGE,
- throwable.getMessage());
- request.setAttribute(RequestDispatcher.ERROR_EXCEPTION,
- realError);
+ request.setAttribute(RequestDispatcher.ERROR_MESSAGE,
throwable.getMessage());
+ request.setAttribute(RequestDispatcher.ERROR_EXCEPTION,
realError);
Wrapper wrapper = request.getWrapper();
if (wrapper != null) {
- request.setAttribute(RequestDispatcher.ERROR_SERVLET_NAME,
- wrapper.getName());
+ request.setAttribute(RequestDispatcher.ERROR_SERVLET_NAME,
wrapper.getName());
}
- request.setAttribute(RequestDispatcher.ERROR_REQUEST_URI,
- request.getRequestURI());
- request.setAttribute(RequestDispatcher.ERROR_EXCEPTION_TYPE,
- realError.getClass());
+ request.setAttribute(RequestDispatcher.ERROR_REQUEST_URI,
request.getRequestURI());
+ request.setAttribute(RequestDispatcher.ERROR_EXCEPTION_TYPE,
realError.getClass());
if (custom(request, response, errorPage)) {
try {
response.finishResponse();
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]