- Update method order
- Do not automatically create MessageSource arguments in
WebExchangeBindException constructor as they're more likely to be
created via getDetailMessageArguments with MessageSource passed in.
See gh-30644
@ -64,16 +64,6 @@ public class MethodArgumentNotValidException extends BindException implements Er
@@ -64,16 +64,6 @@ public class MethodArgumentNotValidException extends BindException implements Er
}
@Override
publicHttpStatusCodegetStatusCode(){
returnHttpStatus.BAD_REQUEST;
}
@Override
publicProblemDetailgetBody(){
returnthis.body;
}
/**
*Returnthemethodparameterthatfailedvalidation.
*/
@ -82,59 +72,40 @@ public class MethodArgumentNotValidException extends BindException implements Er
@@ -82,59 +72,40 @@ public class MethodArgumentNotValidException extends BindException implements Er
}
@Override
publicStringgetMessage(){
StringBuildersb=newStringBuilder("Validation failed for argument [")
.append(this.parameter.getParameterIndex()).append("] in ")
@ -144,12 +115,6 @@ public class MethodArgumentNotValidException extends BindException implements Er
@@ -144,12 +115,6 @@ public class MethodArgumentNotValidException extends BindException implements Er
@ -170,4 +135,33 @@ public class MethodArgumentNotValidException extends BindException implements Er
@@ -170,4 +135,33 @@ public class MethodArgumentNotValidException extends BindException implements Er
@ -49,15 +49,35 @@ public class WebExchangeBindException extends ServerWebInputException implements
@@ -49,15 +49,35 @@ public class WebExchangeBindException extends ServerWebInputException implements
@ -65,14 +85,31 @@ public class WebExchangeBindException extends ServerWebInputException implements
@@ -65,14 +85,31 @@ public class WebExchangeBindException extends ServerWebInputException implements
@ -285,6 +322,7 @@ public class WebExchangeBindException extends ServerWebInputException implements
@@ -285,6 +322,7 @@ public class WebExchangeBindException extends ServerWebInputException implements
@ -302,38 +340,6 @@ public class WebExchangeBindException extends ServerWebInputException implements
@@ -302,38 +340,6 @@ public class WebExchangeBindException extends ServerWebInputException implements