Skip to content
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

Allow disabling muzzle checks for specific methods #7289

Merged
merged 4 commits into from
Dec 12, 2022

Conversation

laurit
Copy link
Contributor

@laurit laurit commented Nov 23, 2022

Resolves #2556
#7265 made me wonder whether it would help when we could sometimes skip muzzle checks.

@laurit laurit marked this pull request as ready for review November 30, 2022 10:22
@laurit laurit requested a review from a team as a code owner November 30, 2022 10:22
Copy link
Member

@mateuszrzeszutek mateuszrzeszutek left a comment

Choose a reason for hiding this comment

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

This is related to #2556 - I'd say it resolves that, you can do the conditional part in the annotated code, the most important thing it that muzzle gets skipped.

MethodVisitor target =
skip ? methodVisitor : new AdviceReferenceMethodVisitor(methodVisitor);
if (target != null) {
accept(target);
Copy link
Member

Choose a reason for hiding this comment

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

wow, that's some tricky chaining👍

@trask trask added this to the v1.21.0 milestone Dec 8, 2022
@trask trask enabled auto-merge (squash) December 12, 2022 19:18
@trask trask merged commit f3a21e8 into open-telemetry:main Dec 12, 2022
@laurit laurit deleted the no-muzzle branch July 6, 2023 17:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Muzzle can allow declaring code blocks as requiring certain classes
3 participants