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 this-escape compiler warnings #141

Closed
jmehrens opened this issue Mar 5, 2024 · 0 comments · Fixed by #142
Closed

Remove this-escape compiler warnings #141

jmehrens opened this issue Mar 5, 2024 · 0 comments · Fixed by #142
Assignees
Labels
enhancement New feature or request

Comments

@jmehrens
Copy link
Contributor

jmehrens commented Mar 5, 2024

The compiler is report multiple "this-escape" warnings under JDK 21. The warning is especially chatty because it can be reported against the constructor and a calling method resulting in multiple warnings per site. This extra noise can make it a challenge to find other warnings.

The approach taken will be to:

  1. Fix or update code to make it less vulnerable. Easy examples are using a different super constructor or using a super instance method call instead of this instance method call.
  2. Suppress warning when dealing with classes that are designed to throw or invoke an method that can be overridden. These classes would not be updated to value types anyway.
  3. Add at override annotations that are missing for classes that are modified.
  4. Suppress terminal digit warning on module name for pop3 as that is the name of the protocol.
  5. Suppress warning for fall through that are missing for classes that are modified and comment fall through cases.
  6. Add at deprecated to methods that are deprecated via javadoc for classes that are modified.
  7. Add serial ids to demo classes to get rid of those warnings.
  8. Fix some raw type warnings for classes that are modified.
@jmehrens jmehrens self-assigned this Mar 5, 2024
@jmehrens jmehrens added the enhancement New feature or request label Mar 5, 2024
jmehrens added a commit to jmehrens/angus-mail that referenced this issue Mar 5, 2024
@jmehrens jmehrens linked a pull request Mar 5, 2024 that will close this issue
jmehrens added a commit that referenced this issue Mar 7, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant