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

Unclear javadoc in Instrumentation regarding return value #2806

Closed
andimarek opened this issue Apr 20, 2022 · 1 comment
Closed

Unclear javadoc in Instrumentation regarding return value #2806

andimarek opened this issue Apr 20, 2022 · 1 comment

Comments

@andimarek
Copy link
Member

The Instrumentation docs seem to imply that you can return null InstrumentationContext, while in fact it will cause a NPE.

We should reference the

    private static final InstrumentationContext<Object> NO_OP = new SimpleInstrumentationContext<>();

as the preferred return value if you don't need a context.

@andimarek
Copy link
Member Author

Related to that: #2769

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

No branches or pull requests

1 participant