-
Notifications
You must be signed in to change notification settings - Fork 1k
Use UnaryOperator<X> instead of Function<X, X> where it simplifies things #15101
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
Conversation
87e4f74 to
6c92a1d
Compare
...api/src/main/java/io/opentelemetry/instrumentation/api/instrumenter/InstrumenterBuilder.java
Show resolved
Hide resolved
...e/src/main/java/io/opentelemetry/instrumentation/apachedubbo/v2_7/DubboTelemetryBuilder.java
Show resolved
Hide resolved
📋 Deprecation NoticeThis PR has been labeled as a deprecation. Please ensure you provide the following information: 📝 Deprecation Details RequiredPlease add details to help users understand:
📋 Checklist
Your deprecation notes will be included in the release notes to help users prepare for future changes. This comment was automatically generated because the |
|
🔧 The result from spotlessApply was committed to the PR branch. |
...e/src/main/java/io/opentelemetry/instrumentation/apachedubbo/v2_7/DubboTelemetryBuilder.java
Show resolved
Hide resolved
| @CanIgnoreReturnValue | ||
| @SuppressWarnings("unchecked") // safe cast from Function to UnaryOperator | ||
| public GrpcTelemetryBuilder setClientSpanNameExtractor( | ||
| Function<SpanNameExtractor<GrpcRequest>, ? extends SpanNameExtractor<? super GrpcRequest>> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think it's ok to simplify these generics, similar to #12858
By using UnaryOperator instead of Function<X, X>.
Resolves #14891