-
Notifications
You must be signed in to change notification settings - Fork 21
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
Fix converter regression #777
Conversation
b3fd8e7
to
9579962
Compare
)); | ||
} | ||
setters.get(name).invoke(builder, argument); | ||
var convertedArgument = tryConvertObjectInner( |
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 is the fix
setters.get(name).getName(), | ||
Nullable.class.getTypeName() | ||
)); | ||
} | ||
try { |
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.
made try...catch
more narrow
@@ -396,33 +396,45 @@ private Object tryConvertObjectInner( | |||
// call setters for all arguments | |||
var setters = processSetters(builderType, Function.identity()); | |||
argumentsMap.forEach((name, argument) -> { | |||
if (!setters.containsKey(name)) { |
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.
moved from inside the try catch
TypeShape.extract(extractSetterParameter(setters.get(name))) | ||
); | ||
setters.get(name).invoke(builder, convertedArgument); | ||
} catch (IllegalArgumentException e) { |
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.
added info to IAE for debugging, previously got only "type mismatch error" in this case
6201d7d
to
432c858
Compare
merged with #782 |
Description
Unit tests in separate PR: #782 on top of this one
Fixes #774
Checklist