Skip to content
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

Prefer constructor over builder if present in introspections #11481

Merged
merged 1 commit into from
Jan 3, 2025

Conversation

graemerocher
Copy link
Contributor

@graemerocher graemerocher commented Jan 2, 2025

Currently if there is a builder then it is preferred over the constructor. This is a regression from 4.6.x behaviour. This alters the behaviour to prefer the constructor if one is present when returning getConstructorArguments()

Fixes micronaut-projects/micronaut-data#3267

@graemerocher graemerocher added type: bug Something isn't working type: regression A breaking change was introduced in a minor or patch release labels Jan 2, 2025
@graemerocher graemerocher requested a review from dstepanov January 2, 2025 13:41
@graemerocher graemerocher changed the title if a class has a constructor default to it in introspection instead of builder Prefer constructor over builder if present in introspections Jan 2, 2025
@graemerocher graemerocher requested a review from sdelamo January 2, 2025 14:36
@graemerocher graemerocher merged commit d8f3154 into 4.7.x Jan 3, 2025
22 checks passed
@graemerocher graemerocher deleted the issue-3267 branch January 3, 2025 18:46
* @since 4.7.11
*/
protected boolean hasConstructor() {
return false;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Would be nice to have some default that is compatible with previously compiled beans

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: bug Something isn't working type: regression A breaking change was introduced in a minor or patch release
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

3 participants