Skip to content

Add missing @Deprecated.forRemoval for removed in 7.0#36562

Closed
seregamorph wants to merge 1 commit intospring-projects:6.2.xfrom
seregamorph:forRemoval7
Closed

Add missing @Deprecated.forRemoval for removed in 7.0#36562
seregamorph wants to merge 1 commit intospring-projects:6.2.xfrom
seregamorph:forRemoval7

Conversation

@seregamorph
Copy link
Copy Markdown

@seregamorph seregamorph commented Mar 30, 2026

We should distinguish just @Deprecated and these which are removed already in the spring-framework 7.0 to prioritize addressing these cases.
Also, for our specific scenario, we have arch-unit test that checks all @Deprecated annotated classes/constructors/methods and prohibits its usage in the project and library code if forRemoval=true (otherwise it's more lenient).

@spring-projects-issues spring-projects-issues added the status: waiting-for-triage An issue we've not yet triaged or decided on label Mar 30, 2026
@bclozel
Copy link
Copy Markdown
Member

bclozel commented Mar 30, 2026

Hello @seregamorph , happy to merge those changes but can you sign your commits first for the DCO? Thanks.

@bclozel bclozel added the status: waiting-for-feedback We need additional information before we can continue label Mar 30, 2026
@seregamorph
Copy link
Copy Markdown
Author

@bclozel I've updated my commit and force pushed it. Does it look correct now?

@spring-projects-issues spring-projects-issues added status: feedback-provided Feedback has been provided and removed status: waiting-for-feedback We need additional information before we can continue labels Mar 30, 2026
@bclozel
Copy link
Copy Markdown
Member

bclozel commented Mar 30, 2026

@seregamorph I think your commit signature doesn’t align with your GitHub profile (I redacted your email in the message)

Summary

Commit sha: 3d21099, Author: seregamorph, Committer: seregamorph; Expected "seregamorph […]@gmail.com", but got "Sergey Chernov[ …]@gmail.com".

@seregamorph
Copy link
Copy Markdown
Author

Well, I see what you mean. Will update in a sec.

@seregamorph
Copy link
Copy Markdown
Author

🟢

@seregamorph
Copy link
Copy Markdown
Author

@bclozel I see more cases. E.g. deprecated constructors of HttpMessageNotReadableException (while javadoc does not claim it explicitly) are also deleted in 7.0. Should I add more cases in scope of this PR?

@bclozel
Copy link
Copy Markdown
Member

bclozel commented Mar 30, 2026

Yes please. If you don't have time you can point them to me and I'll take care of those

@seregamorph
Copy link
Copy Markdown
Author

Updated HttpMessageNotReadableException. Let's go ahead with merging this, will let you know if I find something else.

@seregamorph
Copy link
Copy Markdown
Author

seregamorph commented Mar 30, 2026

Will now add one more case: ContentCachingRequestWrapper(HttpServletRequest request) which is even not marked as deprecated (🟢 done)

Signed-off-by: seregamorph <serega.morph@gmail.com>
@seregamorph
Copy link
Copy Markdown
Author

seregamorph commented Mar 30, 2026

@bclozel I've created a simple code analysis tool to discover non-marked deprecated for deletion. So far there are more than 20 classes.
I'd like to close this PR and instead submit an issue listing all these:

  • public classes that were removed and lack of @Deprecated(forRemoval)
  • public/protected constructors that were removed
  • public/protected methods that were removed
  • public fields being removed (not marked properly)

Maybe additionally default constructors that are not available to be called anymore (if there was only a default constructor)

What do you think?

I can submit such issues not only for spring-framework, but also other spring projects that I use (boot, data, hateoas, kafka, security)

@bclozel
Copy link
Copy Markdown
Member

bclozel commented Apr 1, 2026

Thanks @seregamorph - please create a new issue for Spring Framework listing your findings and we'll review discrepancies one by one. Please hold off for now on other projects, I've asked project leads because I'm not sure the. "forRemoval" flag is consistently used in Spring projects.

I'll close this PR for now then.

@bclozel bclozel closed this Apr 1, 2026
@bclozel bclozel added status: declined A suggestion or change that we don't feel we should currently apply and removed status: waiting-for-triage An issue we've not yet triaged or decided on status: feedback-provided Feedback has been provided labels Apr 1, 2026
@bclozel
Copy link
Copy Markdown
Member

bclozel commented Apr 3, 2026

@seregamorph I've asked other Spring projects leads and they would be happy to get issues similar to #36591. Please proceed, if you have time. Thanks a lot!

@seregamorph
Copy link
Copy Markdown
Author

Thanks. Will try to find time for this soon.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

status: declined A suggestion or change that we don't feel we should currently apply

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants