You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by ma...@apache.org on 2022/11/18 16:16:18 UTC

[tomcat] branch 9.0.x updated: Formatting, no functional change.

This is an automated email from the ASF dual-hosted git repository.

markt pushed a commit to branch 9.0.x
in repository https://gitbox.apache.org/repos/asf/tomcat.git


The following commit(s) were added to refs/heads/9.0.x by this push:
     new 3720b3d6cc Formatting, no functional change.
3720b3d6cc is described below

commit 3720b3d6cca6488f9001946ffc8f1ca0e0b508dd
Author: Mark Thomas <ma...@apache.org>
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 0383d592b5..9f7ebd13de 100644
--- a/java/org/apache/catalina/core/StandardHostValve.java
+++ b/java/org/apache/catalina/core/StandardHostValve.java
@@ -225,27 +225,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 {
@@ -271,8 +266,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;
@@ -290,9 +284,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;
         }
@@ -305,25 +297,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: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org