Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[eclipse-dev] Overhaul of how JDT handles Deprecation

Hi all,

If you are dealing with deprecated code, please read this:

A few days ago we realized that JDT had some bugs and misconceptions relating to deprecation warnings. Bugs that existed since the day the annotation @Deprecated was introduced.

The primary message is: Annotating a type as @Deprecated does not automatically mark its members as deprecated, too. Since deprecation warnings are specified in JLS, we no choice but to fix our implementation to comply to the spec.

As you may have gotten used to the long-standing behavior, please have a look at the summary of all changes in this area as documented in this News entry:
	https://eclipse.dev/eclipse/markdown/?f=news/4.38/jdt.md#changes-concerning-deprecation-warnings

For those interested in the details of issues and PRs we have a summary in
	https://github.com/eclipse-jdt/eclipse.jdt.core/issues/4572

I am confident that the state achieved today is stable and more correct :)

thanks,
Stephan

PS: We hadn't planned this overhaul, so how did all this surface just now?

It started with what could be characterized as an accidental but incomplete bug fix. A fix that wasn't meant to affect deprecation at all, made some deprecation warnings disappear. That's when we realized that those warnings had been wrong in the first place. But other wrong warnings were still raised. So step by step the issue escalated, new warnings appeared in builds. Fixes started piling up.



Back to the top