From e0423fbdc2ffa16e929d80c4d38ac35803dd843e Mon Sep 17 00:00:00 2001 From: Juergen Hoeller Date: Tue, 30 Apr 2019 18:42:53 +0200 Subject: [PATCH] Revise inline comment for logException call Closes gh-22794 --- .../servlet/handler/AbstractHandlerExceptionResolver.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/spring-webmvc/src/main/java/org/springframework/web/servlet/handler/AbstractHandlerExceptionResolver.java b/spring-webmvc/src/main/java/org/springframework/web/servlet/handler/AbstractHandlerExceptionResolver.java index 8222bb15de..32e88d04ce 100644 --- a/spring-webmvc/src/main/java/org/springframework/web/servlet/handler/AbstractHandlerExceptionResolver.java +++ b/spring-webmvc/src/main/java/org/springframework/web/servlet/handler/AbstractHandlerExceptionResolver.java @@ -109,7 +109,7 @@ public abstract class AbstractHandlerExceptionResolver implements HandlerExcepti * @see java.util.logging.Logger#getLogger(String) */ public void setWarnLogCategory(String loggerName) { - this.warnLogger = !StringUtils.isEmpty(loggerName) ? LogFactory.getLog(loggerName) : null; + this.warnLogger = (!StringUtils.isEmpty(loggerName) ? LogFactory.getLog(loggerName) : null); } /** @@ -138,11 +138,11 @@ public abstract class AbstractHandlerExceptionResolver implements HandlerExcepti prepareResponse(ex, response); ModelAndView result = doResolveException(request, response, handler, ex); if (result != null) { - // Print warn message when warn logger is not enabled... + // Print debug message when warn logger is not enabled. if (logger.isDebugEnabled() && (this.warnLogger == null || !this.warnLogger.isWarnEnabled())) { logger.debug("Resolved [" + ex + "]" + (result.isEmpty() ? "" : " to " + result)); } - // warnLogger with full stack trace (requires explicit config) + // Explicitly configured warn logger in logException method. logException(ex, request); } return result;