ex.getPropertyName()
is not initialized in ResponseEntityExceptionHandler#handleTypeMismatch
#29959
Milestone
https://github.com/spring-projects/spring-framework/blob/main/spring-webmvc/src/main/java/org/springframework/web/servlet/mvc/method/annotation/ResponseEntityExceptionHandler.java
Method:handleTypeMismatch
If exception type is MethodArgumentTypeMismatchException,
return value of "ex.getPropertyName()" is null.
Therefore "defaultDetail" is "Failed to convert 'null' with value: 'val'";
But, return value of "ex.getName()" is correct property name.
Probably "TypeMismatchException#initPropertyName()" is not called.
The text was updated successfully, but these errors were encountered: