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

Update to 4.1.1 & Rewrite MessageBodyWriter #1217

Closed
wants to merge 3 commits into from

Conversation

sdelamo
Copy link
Contributor

@sdelamo sdelamo commented Sep 20, 2023

I had to rewrite the DatedResponseBodyWriter and PageBodyWriter when upgrading to Micronaut Framework 4.1.1

Was the previous usage of createSpecific API a correct usage of the API?.

@sdelamo sdelamo mentioned this pull request Sep 20, 2023
@sdelamo sdelamo changed the title Rewrite MessageBodyWriter Update to 4.1.1 & Rewrite MessageBodyWriter Sep 20, 2023
@sonarqubecloud
Copy link

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

0.0% 0.0% Coverage
0.0% 0.0% Duplication

} else {
throw new ConfigurationException("No JSON message writer present");
Argument<T> bt = type.getTypeParameters()[0];
MessageBodyWriter<T> writer = registry.findWriter(bt, List.of(MediaType.APPLICATION_JSON_TYPE))
Copy link
Member

Choose a reason for hiding this comment

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

findWriter should be cached using createSpecific instead of doing it inside writeTo.

@altro3 altro3 closed this Oct 25, 2023
@sdelamo sdelamo deleted the upgrade-to-four-one branch January 8, 2024 09:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

3 participants