Skip to content

Conversation

@trask
Copy link
Member

@trask trask commented Feb 8, 2026

Motivated by #8060 (well, that and the many PRs in the instrumentation repo where this has plagued me recently)

Context:

When compiling with --release 8, javac's -Xlint:deprecation warns on imports of deprecated classes (JDK-8032211). Since @SuppressWarnings cannot suppress import-level warnings, this forced us to use fully-qualified class names as a workaround.

}

@SuppressWarnings("unchecked")
@SuppressWarnings({"unchecked", "deprecation"}) // deprecation: EXTENDED_ATTRIBUTES
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 more strict than javac here, but this does align with Intellij's warnings, so seems good

@trask trask force-pushed the deprecate-with-errorprone branch 5 times, most recently from e79ae1d to cfd48d7 Compare February 8, 2026 05:18
@codecov
Copy link

codecov bot commented Feb 8, 2026

Codecov Report

❌ Patch coverage is 27.27273% with 8 lines in your changes missing coverage. Please review.
✅ Project coverage is 90.22%. Comparing base (73d0833) to head (afc0f01).

Files with missing lines Patch % Lines
...ntelemetry/sdk/testing/logs/TestLogRecordData.java 0.00% 3 Missing ⚠️
...sting/logs/internal/TestExtendedLogRecordData.java 0.00% 3 Missing ⚠️
...entelemetry/sdk/logs/ExtendedSdkLogRecordData.java 0.00% 1 Missing ⚠️
...va/io/opentelemetry/sdk/logs/SdkLogRecordData.java 0.00% 1 Missing ⚠️

❌ Your patch check has failed because the patch coverage (27.27%) is below the target coverage (80.00%). You can increase the patch coverage or adjust the target coverage.

Additional details and impacted files
@@             Coverage Diff              @@
##               main    #8061      +/-   ##
============================================
+ Coverage     90.18%   90.22%   +0.03%     
- Complexity     7591     7592       +1     
============================================
  Files           841      841              
  Lines         22911    22903       -8     
  Branches       2288     2288              
============================================
+ Hits          20663    20664       +1     
+ Misses         1531     1523       -8     
+ Partials        717      716       -1     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@jack-berg
Copy link
Member

This requirement to avoid importing deprecating classes has annoyed me for a while. I'm supportive if you can get the build to pass on java 21, 25 😛

@trask trask force-pushed the deprecate-with-errorprone branch from 6ebdc89 to 86e4227 Compare February 10, 2026 21:22
@trask trask force-pushed the deprecate-with-errorprone branch from 86e4227 to afc0f01 Compare February 10, 2026 21:23
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