Skip to content

Allow unsafe in tests to declutter build logs - #8973

Merged
jack-berg merged 1 commit into
open-telemetry:mainfrom
jack-berg:allow-unsafe-in-tests
Oct 21, 2026
Merged

jack-berg merged 1 commit into
open-telemetry:mainfrom
jack-berg:allow-unsafe-in-tests

Conversation

@jack-berg

@jack-berg jack-berg commented Oct 21, 2026 •

Copy link
Copy Markdown
Member

Allow unsafe in test tasks in java 24+, where unsafe is terminally deprecated and usage produces noisy logs like:

   WARNING: A terminally deprecated method in sun.misc.Unsafe has been called                                                                                                                                                                                                                                                                                                                                                                                  
   WARNING: sun.misc.Unsafe::objectFieldOffset has been called by net.bytebuddy.dynamic.loading.ClassInjector$UsingUnsafe$Dispatcher$CreationAction (file:.../byte-buddy-1.18.3.jar)                                                                                                                                                                                                                                                                           
   WARNING: Please consider reporting this to the maintainers of class net.bytebuddy.dynamic.loading.ClassInjector$UsingUnsafe$Dispatcher$CreationAction                                                                                                                                                                                                                                                                                                       
   WARNING: sun.misc.Unsafe::objectFieldOffset will be removed in a future release

Unsafe is used by mockito (via bytebuddy) and assertj. By allowing, we declutter the build logs.

@jack-berg
jack-berg requested a review from a team as a code owner October 21, 2026 18:04
@opentelemetry-pr-dashboard

opentelemetry-pr-dashboard Bot commented Oct 21, 2026 •

Copy link
Copy Markdown

Pull request dashboard status

Merged · refreshed 2026-10-21 20:28 UTC

Status above doesn't look right?
  • Anything look wrong? Report it with what you expected; it helps us improve the dashboard.

@codecov

codecov Bot commented Oct 21, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 90.42%. Comparing base (7647e49) to head (99638ea).
⚠️ Report is 1 commits behind head on main.

Additional details and impacted files
@@             Coverage Diff              @@
##               main    #8973      +/-   ##
============================================
- Coverage     90.43%   90.42%   -0.02%     
- Complexity    10908    10954      +46     
============================================
  Files          1015     1018       +3     
  Lines         29854    29987     +133     
  Branches       3901     3913      +12     
============================================
+ Hits          26998    27115     +117     
- Misses         1907     1920      +13     
- Partials        949      952       +3     

☔ View full report in Codecov by Harness.
📢 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
jack-berg merged commit 4af0e70 into open-telemetry:main Oct 21, 2026
34 checks passed
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