From 7bf520fa8d42391915ab80488baeaf452c98836c Mon Sep 17 00:00:00 2001 From: Sam Brannen Date: Sat, 16 Sep 2023 18:38:24 +0200 Subject: [PATCH] Make utility methods consistently static in DispatcherServlet See gh-31244 --- .../org/springframework/web/servlet/DispatcherServlet.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/spring-webmvc/src/main/java/org/springframework/web/servlet/DispatcherServlet.java b/spring-webmvc/src/main/java/org/springframework/web/servlet/DispatcherServlet.java index 109fd4ca5a41..d7542ae6a9fb 100644 --- a/spring-webmvc/src/main/java/org/springframework/web/servlet/DispatcherServlet.java +++ b/spring-webmvc/src/main/java/org/springframework/web/servlet/DispatcherServlet.java @@ -1244,7 +1244,7 @@ else if (hasMultipartException(request)) { /** * Check "jakarta.servlet.error.exception" attribute for a multipart exception. */ - private boolean hasMultipartException(HttpServletRequest request) { + private static boolean hasMultipartException(HttpServletRequest request) { Throwable error = (Throwable) request.getAttribute(WebUtils.ERROR_EXCEPTION_ATTRIBUTE); while (error != null) { if (error instanceof MultipartException) { @@ -1478,7 +1478,7 @@ protected View resolveViewName(String viewName, @Nullable Map mo return null; } - private void triggerAfterCompletion(HttpServletRequest request, HttpServletResponse response, + private static void triggerAfterCompletion(HttpServletRequest request, HttpServletResponse response, @Nullable HandlerExecutionChain mappedHandler, Exception ex) throws Exception { if (mappedHandler != null) {