-
Notifications
You must be signed in to change notification settings - Fork 353
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
Handle EnsuresCalledMethods.List when checking field ownership #6180
Conversation
checker/src/main/java/org/checkerframework/checker/resourceleak/ResourceLeakVisitor.java
Outdated
Show resolved
Hide resolved
I'm not aware of an appropriate helper method, and the existence of I think such a helper method could be useful. I would put it in one of the subclasses of
The implementation could be patterned on the code in this PR for @smillst does this helper method sound reasonable to you? Is there an existing alternative that I'm unaware of? |
I copy-pasted this from a similar method, and sure enough I forgot to rename the local variables to match their new use.
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.
I couldn't find a helper method that looked for a specific repeatable annotation. AnnotatedTypeFactory#getDeclAnnotationWithMetaAnnotation
looks for repeated annotations with a specific meta annotation. We could copy the functionality for repeated annotations into a more general helper method like @kelloggm suggests. But implementing that helper method doesn't need to hold up this PR.
…ools#6180) Co-authored-by: Martin Kellogg <martin.kellogg@njit.edu>
Fixes #5911.
Please let me know if there is a shorter or more canonical way to write
getEnsuresCalledMethodsAnnotations
; this seems like something a lot of checkers have to do, but I couldn't find an appropriate helper method.