-
Notifications
You must be signed in to change notification settings - Fork 350
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
Suppress new Error Prone warning #6120
Conversation
…hecker-framework into renovate/versions.errorprone
// Error Prone is warning on calls to classSym.getEnclosedElements() | ||
// which can cause a crash when code is complied using JDK 17 -source 11 -target 11 and then | ||
// run using JDK 11. The Checker Framework is compiled using -source 8 -target 8, so this | ||
// is not currently a problem. See https://github.com/google/error-prone/issues/3895. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
NullAway is compiled using -source 8 -target 8
and this is still a problem. I tried to explain what is going on here: uber/NullAway#795 (comment)
Thanks for pointing this out and the further explanation. We do build the release with JDK 17, so I fixed it so that all the calls to |
@@ -517,7 +521,7 @@ private List<Symbol> getMethodSymbolsfor( | |||
List<Symbol> result = new ArrayList<>(); | |||
ClassSymbol classSym = (ClassSymbol) sym; | |||
while (classSym != null) { | |||
for (Symbol s : classSym.getEnclosedElements()) { | |||
for (Symbol s : sym.getEnclosedElements()) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It looks like classSym
gets updated on each loop iteration? Not sure this will behave the same as the previous code.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Now LGTM. If I get time, I may try to improve the Error Prone check so that you don't need to suppress in cases like this one (as calls to Symbol.getEnclosedElements()
are ok).
@msridhar Thanks for your insight on this issue. |
@mernst sure, sorry about that. If you like, there are new defaults that we can set for the project when it comes to squashed commit messages. See below, which is under the Settings for the repo: ![]() My preference is "Default to pull request title and description." Then, the PR description (if any) will be used as the body of the commit message. |
@msridhar I changed the default to "Default to pull request title and description." Thanks for pointing out this option! |
* Update versions.errorprone to v2.21.0 * Update versions.errorprone to v2.21.0 * Suppress warning. * Add comment. * Tweak comment. * Fix bug. --------- Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
No description provided.