From 30e4a0a30009848b3b8ed526a26ecd76401932e7 Mon Sep 17 00:00:00 2001 From: rstoyanchev Date: Thu, 2 Nov 2023 16:18:16 +0000 Subject: [PATCH] Polishing as a result of discussion under gh-31529 --- .../method/annotation/ResponseEntityExceptionHandler.java | 5 +++-- .../method/annotation/ResponseEntityExceptionHandler.java | 5 +++-- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/spring-webflux/src/main/java/org/springframework/web/reactive/result/method/annotation/ResponseEntityExceptionHandler.java b/spring-webflux/src/main/java/org/springframework/web/reactive/result/method/annotation/ResponseEntityExceptionHandler.java index 07bb9d02194..4bcdd58fe46 100644 --- a/spring-webflux/src/main/java/org/springframework/web/reactive/result/method/annotation/ResponseEntityExceptionHandler.java +++ b/spring-webflux/src/main/java/org/springframework/web/reactive/result/method/annotation/ResponseEntityExceptionHandler.java @@ -353,8 +353,9 @@ public abstract class ResponseEntityExceptionHandler implements MessageSourceAwa * @param status the status to associate with the exception * @param defaultDetail default value for the "detail" field * @param detailMessageCode the code to use to look up the "detail" field - * through a {@code MessageSource}, falling back on - * {@link ErrorResponse#getDefaultDetailMessageCode(Class, String)} + * through a {@code MessageSource}; if {@code null} then + * {@link ErrorResponse#getDefaultDetailMessageCode(Class, String)} is used + * to determine the default message code to use * @param detailMessageArguments the arguments to go with the detailMessageCode * @return the created {@code ProblemDetail} instance */ diff --git a/spring-webmvc/src/main/java/org/springframework/web/servlet/mvc/method/annotation/ResponseEntityExceptionHandler.java b/spring-webmvc/src/main/java/org/springframework/web/servlet/mvc/method/annotation/ResponseEntityExceptionHandler.java index cc9e510bd62..d591d0248e4 100644 --- a/spring-webmvc/src/main/java/org/springframework/web/servlet/mvc/method/annotation/ResponseEntityExceptionHandler.java +++ b/spring-webmvc/src/main/java/org/springframework/web/servlet/mvc/method/annotation/ResponseEntityExceptionHandler.java @@ -603,8 +603,9 @@ public abstract class ResponseEntityExceptionHandler implements MessageSourceAwa * @param status the status to associate with the exception * @param defaultDetail default value for the "detail" field * @param detailMessageCode the code to use to look up the "detail" field - * through a {@code MessageSource}, falling back on - * {@link ErrorResponse#getDefaultDetailMessageCode(Class, String)} + * through a {@code MessageSource}; if {@code null} then + * {@link ErrorResponse#getDefaultDetailMessageCode(Class, String)} is used + * to determine the default message code to use * @param detailMessageArguments the arguments to go with the detailMessageCode * @param request the current request * @return the created {@code ProblemDetail} instance