Skip to content

Safety analysis detects annotations on superclasses and their interfaces#2271

Merged
bulldozer-bot[bot] merged 3 commits intodevelopfrom
ckozak/detect_annotated_superclass_ifaces
May 13, 2022
Merged

Safety analysis detects annotations on superclasses and their interfaces#2271
bulldozer-bot[bot] merged 3 commits intodevelopfrom
ckozak/detect_annotated_superclass_ifaces

Conversation

@carterkozak
Copy link
Copy Markdown
Contributor

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!

Previously it would detect direct interfaces and supertypes, but
not interfaces on supertypes.
@changelog-app
Copy link
Copy Markdown

changelog-app Bot commented May 13, 2022

Generate changelog in changelog/@unreleased

Type

  • Feature
  • Improvement
  • Fix
  • Break
  • Deprecation
  • Manual task
  • Migration

Description

Safety analysis detects annotations on superclasses and their interfaces

Check the box to generate changelog(s)

  • Generate changelog entry

return Safety.UNKNOWN;
}

public static Safety getDirectSafety(@Nullable Symbol symbol, VisitorState state) {
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

@bulldozer-bot bulldozer-bot Bot merged commit b3f6180 into develop May 13, 2022
@bulldozer-bot bulldozer-bot Bot deleted the ckozak/detect_annotated_superclass_ifaces branch May 13, 2022 08:33
@svc-autorelease
Copy link
Copy Markdown
Collaborator

Released 4.135.0

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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants