-
Notifications
You must be signed in to change notification settings - Fork 1.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fixes #9577 #9580
base: 4.0.x
Are you sure you want to change the base?
fixes #9577 #9580
Conversation
@@ -176,6 +177,9 @@ protected TypeConverter<Map, Object> mapToObjectConverter() { | |||
} | |||
ArgumentBinder binder = this.beanPropertyBinder.get(); | |||
ArgumentBinder.BindingResult result = binder.bind(conversionContext, correctKeys(map)); | |||
conversionContext.getLastError().ifPresent(error -> { | |||
throw new ConversionErrorException(conversionContext.getArgument(), error); | |||
}); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this will modify universally for all type conversions that use this type converter which is a breaking change.
We need to modify only the place where the conversion happens to throw this error
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@n0tl3ss can you address @graemerocher PR feedback? thanks.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@sdelamo Offline I told Graeme that I think this is the right place where I should expect error to be thrown. He told me that he will take a look how better to do it.
Kudos, SonarCloud Quality Gate passed! |
|
ConversionErrorException
will be thrown.Message from a provided example: