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
Mark reified varargs parameter @Deprecated #3319
base: main
Are you sure you want to change the base?
Conversation
Discourage use of reified argument
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #3319 +/- ##
=============================================
- Coverage 85.33% 12.52% -72.81%
+ Complexity 2924 429 -2495
=============================================
Files 336 336
Lines 8907 8907
Branches 1109 1109
=============================================
- Hits 7601 1116 -6485
- Misses 1013 7577 +6564
+ Partials 293 214 -79 ☔ View full report in Codecov by Sentry. |
How does this show up in your Idea? I understand we rely on the magic of the compiler to determine the type of the generic argument, but I didn't know you could annotate individual arguments as deprecated. Can you share a screenshot of a usage to show the UX? |
Currently IntelliJ IDEA and Eclipse IDE simply ignore the @deprecated annotation when used on parameters. But the intention to keep end users from passing a parameter value still applies.
More information in this SO answer. What do you think? :) |
Since this annotation will not show up in either tooling or the compiler itself, I don't see a lot of use for adding it. When the compiler does emit a warning when a parameter is passed into such a method, I do see the value in adding it. For now, I am inclined to not merge this change. WDYT? |
Could you please wait for the outcome of IDEA-352253? If it is implemented then the use of avoiding user errors is increased. Otherwise this PR has no real added value. |
see title