Repository navigation
Conversation
A named, reusable stand-in for @SuppressPerfContract(value = NoEscape.class, reason = "...") for the recurring shape where a field's own scope is bounded the same way the retained value's would have been -- e.g. a container whose lifetime is tied to a single operation. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Contributor
Author
|
Closing -- decided the generic |
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.
What Does This Do
Adds
@Borrowedtodatadog.trace.api.function: a named, reusable "canned exception" for the recurring@NoEscaperetention shape where a field's own scope is bounded the same way the retained value's would have been (e.g. a container whose lifetime is tied to a single operation). It's meta-annotated@SuppressPerfContract(value = NoEscape.class, reason = "..."), so annotating a field@Borrowedsatisfies@NoEscape's Checker contract the same way a direct@SuppressPerfContractuse or a// Retained on purpose: <reason>comment would.Stacked on #12647 (
@PerfContract/@SuppressPerfContract) -- this is the first real usage of the meta-annotation pattern that PR introduces.Motivation
Gives call sites a one-word way to express the specific, recurring "this retention is fine because the field's scope is itself bounded" justification, instead of writing out the same
@SuppressPerfContract/comment explanation every time.Additional Notes
Documentation-and-tooling only; changes no behavior.
Jira ticket: APMLP-1873