Safety analysis detects annotations on superclasses and their interfaces#2271
Merged
bulldozer-bot[bot] merged 3 commits intodevelopfrom May 13, 2022
Merged
Conversation
Previously it would detect direct interfaces and supertypes, but not interfaces on supertypes.
Generate changelog in
|
carterkozak
commented
May 13, 2022
| return Safety.UNKNOWN; | ||
| } | ||
|
|
||
| public static Safety getDirectSafety(@Nullable Symbol symbol, VisitorState state) { |
Contributor
Author
There was a problem hiding this comment.
Extracted to avoid duplicating effort between ASTHelpers.hasAnnotation and our annotation search. ASTHelpers.hasAnnotation searches supertypes, but not their interfaces, and there's no sense doing it twice.
I took the opportunity to use an error-prone supplier for names, which should reduce overhead a bit.
fawind
approved these changes
May 13, 2022
Collaborator
|
Released 4.135.0 |
This was referenced May 13, 2022
Merged
bulldozer-bot Bot
pushed a commit
to palantir/witchcraft-api
that referenced
this pull request
May 13, 2022
###### _excavator_ is a bot for automating changes across repositories. Changes produced by the roomba/latest-baseline-oss check. # Release Notes ## 4.135.0 | Type | Description | Link | | ---- | ----------- | ---- | | Improvement | Safety analysis detects annotations on superclasses and their interfaces | palantir/gradle-baseline#2271 | To enable or disable this check, please contact the maintainers of Excavator.
This was referenced May 13, 2022
This was referenced May 13, 2022
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Previously it would detect direct interfaces and supertypes, but
not interfaces on supertypes.
After this PR
==COMMIT_MSG==
Safety analysis detects annotations on superclasses and their interfaces
==COMMIT_MSG==
Possible downsides?
More work at build time!