Skip to content

Comments

Replace Xlint deprecation check with custom errorprone check#16122

Merged
trask merged 7 commits intoopen-telemetry:mainfrom
trask:improve-deprecating-experience
Feb 10, 2026
Merged

Replace Xlint deprecation check with custom errorprone check#16122
trask merged 7 commits intoopen-telemetry:mainfrom
trask:improve-deprecating-experience

Conversation

@trask
Copy link
Member

@trask trask commented Feb 9, 2026

@trask trask closed this Feb 9, 2026
@trask trask reopened this Feb 9, 2026
@trask trask force-pushed the improve-deprecating-experience branch from 0f37e36 to d63aa88 Compare February 9, 2026 22:53
* This class is internal and is hence not for public use. Its APIs are unstable and can change at
* any time.
*/
@SuppressWarnings("OtelDeprecatedApiUsage") // SPDY_3 is deprecated but still used in okhttp 3.x
Copy link
Member Author

Choose a reason for hiding this comment

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

it's slightly stricter than javac here, but this does align with Intellij's warnings, so seems good

@trask trask force-pushed the improve-deprecating-experience branch from c105f8d to b458328 Compare February 10, 2026 01:31
@trask trask force-pushed the improve-deprecating-experience branch 4 times, most recently from 64e62a0 to 10e50f5 Compare February 10, 2026 01:40
@trask trask force-pushed the improve-deprecating-experience branch from 10e50f5 to 3f8d39b Compare February 10, 2026 02:11
@trask trask marked this pull request as ready for review February 10, 2026 03:29
@trask trask requested a review from a team as a code owner February 10, 2026 03:29
io.opentelemetry.instrumentation.api.internal.HttpRouteState agentRouteState =
io.opentelemetry.instrumentation.api.internal.HttpRouteState.fromContextOrNull(
agentContext);
HttpRouteState agentRouteState = HttpRouteState.fromContextOrNull(agentContext);
Copy link
Contributor

Choose a reason for hiding this comment

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

I think that in bridging instrumentation the convention is that agent versions of the classes use fqn and application classes are imported. I guess it is fine to import the agent class when application class is not used.

Copy link
Member Author

Choose a reason for hiding this comment

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

oh yeah, I thought I reverted all of these, but missed this

I'm considering following up and flipping the convention to use fqcn for the application.* classes which would allow us to set up a custom errorprone check to enforce it

@trask trask merged commit a2135e2 into open-telemetry:main Feb 10, 2026
85 checks passed
@trask trask deleted the improve-deprecating-experience branch February 10, 2026 17:15
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.

2 participants