Include argument name in MethodArgumentTypeMismatchException message
Closes gh-33573
This commit is contained in:
@@ -45,7 +45,6 @@ public class MethodArgumentTypeMismatchException extends TypeMismatchException {
|
||||
initPropertyName(name);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Return the name of the method argument.
|
||||
*/
|
||||
@@ -60,4 +59,9 @@ public class MethodArgumentTypeMismatchException extends TypeMismatchException {
|
||||
return this.parameter;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getMessage() {
|
||||
return "Method parameter '" + getName() + "': " + super.getMessage();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user