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

Remove the pure attribute from @Contract #33820

Closed
sdeleuze opened this issue Oct 30, 2024 · 0 comments
Closed

Remove the pure attribute from @Contract #33820

sdeleuze opened this issue Oct 30, 2024 · 0 comments
Assignees
Labels
in: core Issues in core modules (aop, beans, core, context, expression) type: enhancement A general enhancement
Milestone

Comments

@sdeleuze
Copy link
Contributor

sdeleuze commented Oct 30, 2024

The @Contract annotation introduced via #32475 has a pure attribute that is coming from its org.jetbrains.annotations.Contract counterpart. It was historically used to trigger warnings when the return value is not used, but it looks like it is not the case anymore with IDEA 2023.1+ and the @CheckReturnValue annotation introduced in #33818 provides a more explicit signal, so we prefer to remove the pure attribute from @Contract in Spring Framework 6.2.0, letting to door open to a future reintroduction only if strong use cases arise.

@sdeleuze sdeleuze added in: core Issues in core modules (aop, beans, core, context, expression) type: enhancement A general enhancement labels Oct 30, 2024
@sdeleuze sdeleuze added this to the 6.2.0 milestone Oct 30, 2024
@sdeleuze sdeleuze self-assigned this Oct 30, 2024
sdeleuze added a commit to sdeleuze/spring-framework that referenced this issue Oct 30, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
in: core Issues in core modules (aop, beans, core, context, expression) type: enhancement A general enhancement
Projects
None yet
Development

No branches or pull requests

1 participant